Skip to content

Commit 18197b8

Browse files
committed
Merge branch 'master' into deploy
2 parents 8acbd2f + c43de0b commit 18197b8

File tree

11 files changed

+137
-34
lines changed

11 files changed

+137
-34
lines changed

build/allcross/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ RUN apt-get -q -y update && \
1717
dwarves \
1818
file \
1919
flex \
20+
gawk \
2021
gcc \
2122
gcc-powerpc-linux-gnu g++-powerpc-linux-gnu \
2223
gcc-aarch64-linux-gnu g++-aarch64-linux-gnu \

build/fedora/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ RUN dnf -y install --setopt=install_weak_deps=False \
1313
elfutils-libelf-devel \
1414
findutils \
1515
flex \
16+
gawk \
1617
gcc \
1718
gcc-powerpc64le-linux-gnu \
1819
gcc-powerpc64-linux-gnu \

build/korg/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ RUN apt-get -q -y update && \
1818
dwarves \
1919
file \
2020
flex \
21+
gawk \
2122
gcc \
2223
git \
2324
kmod \

build/scripts/image.sh

+8-6
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,22 @@ image="linuxppc/build:$distro-$version"
2020
if [[ "$distro" == "fedora" ]]; then
2121
from="registry.fedoraproject.org/$distro:$version"
2222
elif [[ "$distro" == "docs" ]]; then
23-
from="docker.io/ubuntu:$version"
23+
from="public.ecr.aws/ubuntu/ubuntu:$version"
2424
elif [[ "$distro" == "allcross" ]]; then
25-
from="docker.io/debian:$version"
25+
from="public.ecr.aws/debian/debian:$version"
2626
elif [[ "$distro" == "korg" ]]; then
2727
# Use an older distro for the 5.x toolchains.
2828
if [[ "$version" == 5.* ]]; then
29-
from="docker.io/ubuntu:16.04"
29+
from="public.ecr.aws/docker/library/ubuntu:16.04"
3030
elif [[ "$version" == 13.* ]]; then
31-
from="docker.io/ubuntu:23.04"
31+
from="public.ecr.aws/ubuntu/ubuntu:23.04"
3232
else
33-
from="docker.io/ubuntu:20.04"
33+
from="public.ecr.aws/ubuntu/ubuntu:20.04"
3434
fi
35+
elif [[ "$distro" == "ubuntu" && "$version" == 16.* ]]; then
36+
from="public.ecr.aws/docker/library/ubuntu:16.04"
3537
else
36-
from="docker.io/$distro:$version"
38+
from="public.ecr.aws/$distro/$distro:$version"
3739
fi
3840

3941
if [[ "$task" == "image" ]]; then

build/ubuntu/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ RUN apt-get -q -y update && \
2626
dwarves \
2727
file \
2828
flex \
29+
gawk \
2930
gcc \
3031
gcc-powerpc-linux-gnu \
3132
g++-powerpc-linux-gnu \

etc/configs/elf-abi-v2-n.config

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
CONFIG_EXPERT=y
2+
CONFIG_PPC64_BIG_ENDIAN_ELF_ABI_V2=n

etc/configs/hpt-mmu-n.config

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
CONFIG_POWERPC64_CPU=n
2+
CONFIG_POWER10_CPU=y
3+
CONFIG_KVM_BOOK3S_64=n
4+
CONFIG_CXL=n
5+
CONFIG_PPC_PASEMI=n
6+
CONFIG_PPC_CELL=n
7+
CONFIG_PPC_IBM_CELL_BLADE=n
8+
CONFIG_PPC_PS3=n
9+
CONFIG_PPC_PMAC=n
10+
CONFIG_PPC_MAPLE=n
11+
CONFIG_PPC_RADIX_MMU=y
12+
CONFIG_PPC_64S_HASH_MMU=n

etc/configs/opt-for-size-y.config

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=n
2+
CONFIG_CC_OPTIMIZE_FOR_SIZE=y

etc/configs/pcrel-y.config

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CONFIG_POWERPC64_CPU=n
2+
CONFIG_POWER10_CPU=y
3+
CONFIG_PPC_KERNEL_PCREL=y

etc/tests.py

+101-25
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,37 @@ def clang_image(images):
2525
return None
2626

2727

28+
# Check that `image` is at least as new as one of the images
29+
# in the `versions` list.
30+
def image_at_least(image, versions):
31+
# Split the image into the name and optional version number
32+
parts = image.split('@')
33+
iname = parts[0]
34+
if len(parts) == 2:
35+
iversion = int(parts[1].replace('.', ''))
36+
else:
37+
iversion = None
38+
39+
for version in versions:
40+
vname, vver = version.split('@')
41+
42+
# If the names don't match continue
43+
if iname != vname:
44+
continue
45+
46+
# If the input image has no version it's implicitly the latest, so
47+
# assume it's sufficiently new.
48+
if iversion is None:
49+
return True
50+
51+
# Compare the version numbers
52+
vver = int(vver.replace('.', ''))
53+
if iversion >= vver:
54+
return True
55+
56+
return False
57+
58+
2859
def qemu_coverage(args, suite=None):
2960
images = std_images(args)
3061
if suite is None:
@@ -69,9 +100,6 @@ def qemu_coverage(args, suite=None):
69100
# BOOK3S64 && BIG_ENDIAN
70101
# PSERIES, POWERNV, CELL, PS3, PMAC && PMAC64, PASEMI, MAPLE
71102
k('ppc64_guest_defconfig+lockdep', image, merge_config=guest_configs + ['lockdep-y'])
72-
# As above with 4K page size
73-
k('ppc64le_guest_defconfig+4k', image, merge_config=guest_configs_4k)
74-
k('ppc64_guest_defconfig+4k', image, merge_config=guest_configs_4k)
75103
# G5
76104
k('g5_defconfig', image, merge_config=g5_configs)
77105
# BOOK3E_64
@@ -84,10 +112,19 @@ def qemu_coverage(args, suite=None):
84112
# 8xx
85113
k('mpc885_ads_defconfig', image)
86114

115+
# 4K PAGE_SIZE builds, default builds are 64K
116+
k('ppc64le_guest_defconfig+4k', image, merge_config=guest_configs_4k)
117+
k('ppc64_guest_defconfig+4k', image, merge_config=guest_configs_4k)
118+
k('g5_defconfig+4k', image, merge_config=g5_configs + ['4k-pages'])
119+
87120
# PPC_85xx
88-
if image != "[email protected]":
89-
k('corenet32_smp_defconfig', image, merge_config=['debug-info-n'])
90-
b('qemu-e500mc', 'corenet32_smp_defconfig', image)
121+
ppc85xx_image = image
122+
if not image_at_least(image, ['fedora@31', '[email protected]']):
123+
# The 85xx builds hit gcc segfaults with earlier compilers, so use 8.5.0
124+
ppc85xx_image = '[email protected]'
125+
126+
k('corenet32_smp_defconfig', ppc85xx_image, merge_config=['debug-info-n'])
127+
b('qemu-e500mc', 'corenet32_smp_defconfig', ppc85xx_image)
91128

92129
# PPC_BOOK3S_32
93130
b('qemu-mac99', 'pmac32_defconfig', image)
@@ -102,22 +139,29 @@ def qemu_coverage(args, suite=None):
102139
# G5
103140
b('qemu-g5', 'g5_defconfig', image)
104141
b('qemu-g5+compat', 'g5_defconfig', image)
142+
b('qemu-g5', 'g5_defconfig+4k', image)
143+
b('qemu-g5+compat', 'g5_defconfig+4k', image)
144+
105145
# pseries boots
106146
b('qemu-pseries+p10+tcg', 'ppc64le_guest_defconfig+lockdep', image)
107147
b('qemu-pseries+p10+tcg', 'ppc64_guest_defconfig+lockdep', image)
148+
b('qemu-pseries+p10+tcg', 'ppc64le_guest_defconfig+4k', image)
108149

109150
b(f'qemu-pseries+p8+{accel}', 'ppc64le_guest_defconfig+lockdep', image)
110151
b(f'qemu-pseries+p9+{accel}', 'ppc64le_guest_defconfig+lockdep', image)
111152
b(f'qemu-pseries+p8+{accel}', 'ppc64_guest_defconfig+lockdep', image)
112153
b(f'qemu-pseries+p9+{accel}', 'ppc64_guest_defconfig+lockdep', image)
113154
b(f'qemu-pseries+p9+{accel}+fedora39', 'ppc64le_guest_defconfig+lockdep', image)
155+
b(f'qemu-pseries+p9+{accel}+fedora39', 'ppc64le_guest_defconfig+4k', image)
156+
114157
# powernv boots
115158
b('qemu-powernv+p8+tcg', 'ppc64le_guest_defconfig+lockdep', image)
116159
b('qemu-powernv+p9+tcg', 'ppc64le_guest_defconfig+lockdep', image)
117160
b('qemu-powernv+p10+tcg', 'ppc64le_guest_defconfig+lockdep', image)
118161
b('qemu-powernv+p8+tcg', 'ppc64_guest_defconfig+lockdep', image)
119162
b('qemu-powernv+p9+tcg', 'ppc64_guest_defconfig+lockdep', image)
120163
b('qemu-powernv+p10+tcg', 'ppc64_guest_defconfig+lockdep', image)
164+
b('qemu-powernv+p10+tcg', 'ppc64_guest_defconfig+4k', image)
121165

122166

123167
for image in ['[email protected]', 'ubuntu']:
@@ -171,19 +215,25 @@ def full_compile_test(args, suite=None):
171215
# BOOK3S64 && BIG_ENDIAN
172216
# PSERIES, POWERNV, CELL, PS3, PMAC && PMAC64, PASEMI, MAPLE
173217
k('ppc64_guest_defconfig', image, merge_config=guest_configs)
174-
# As above with 4K page size
175-
k('ppc64le_guest_defconfig+4k', image, merge_config=guest_configs_4k)
176-
k('ppc64_guest_defconfig+4k', image, merge_config=guest_configs_4k)
177218
# PMAC && PMAC64
178219
k('g5_defconfig', image, merge_config=g5_configs)
179220
# BOOK3E_64
180221
k('corenet64_smp_defconfig', image, merge_config=corenet64_configs)
222+
223+
ppc85xx_image = image
224+
if not image_at_least(image, ['fedora@31', '[email protected]']):
225+
# The 85xx builds hit gcc segfaults with earlier compilers, so use 8.5.0
226+
ppc85xx_image = '[email protected]'
227+
181228
# PPC_85xx, PPC_E500MC
182-
k('corenet32_smp_defconfig', image, merge_config=['debug-info-n'])
229+
k('corenet32_smp_defconfig', ppc85xx_image, merge_config=['debug-info-n'])
183230
# PPC_85xx, SMP=y, PPC_E500MC=n
184-
k('mpc85xx_smp_defconfig', image)
231+
k('mpc85xx_smp_defconfig', ppc85xx_image)
185232
# PPC_85xx, SMP=n
186-
k('mpc85xx_defconfig', image)
233+
k('mpc85xx_defconfig', ppc85xx_image)
234+
# PPC_85xx + RANDOMIZE_BASE
235+
k('mpc85xx_smp_defconfig+kaslr', ppc85xx_image, merge_config=['randomize-base-y'])
236+
187237
# PPC_BOOK3S_32
188238
k('pmac32_defconfig', image, merge_config=pmac32_configs)
189239
k('pmac32_defconfig+smp', image, merge_config=pmac32_configs + ['smp-y'])
@@ -206,19 +256,22 @@ def full_compile_test(args, suite=None):
206256
# Doesn't exist
207257
#k('ppc64le_allyesconfig', image)
208258

209-
# GCC 5.5.0 fails on various things for allyes/allmod
210-
tmp_image = image.replace('[email protected]', '[email protected]')
259+
allyesmod_image = image
260+
if not image_at_least(image, ['fedora@31', '[email protected]']):
261+
# GCC 5.5.0 fails on various things for allyes/allmod
262+
allyesmod_image = '[email protected]'
263+
211264
# 64-bit Book3S BE
212-
k('allyesconfig', tmp_image, merge_config=no_gcc_plugins)
265+
k('allyesconfig', allyesmod_image, merge_config=no_gcc_plugins)
213266
# 64-bit Book3S BE
214-
k('allmodconfig', tmp_image, merge_config=no_gcc_plugins)
267+
k('allmodconfig', allyesmod_image, merge_config=no_gcc_plugins)
215268
# 64-bit Book3S LE
216-
k('ppc64le_allmodconfig', tmp_image, merge_config=no_gcc_plugins)
269+
k('ppc64le_allmodconfig', allyesmod_image, merge_config=no_gcc_plugins)
217270
# 32-bit Book3S BE (korg 5.5.0 doesn't build)
218-
k('ppc32_allmodconfig', tmp_image, merge_config=no_gcc_plugins)
271+
k('ppc32_allmodconfig', allyesmod_image, merge_config=no_gcc_plugins)
219272
# 64-bit BOOK3E BE (korg 5.5.0 doesn't build)
220273
# FIXME Broken due to start_text_address problems
221-
# k('ppc64_book3e_allmodconfig', tmp_image, merge_config=no_gcc_plugins)
274+
# k('ppc64_book3e_allmodconfig', allyesmod_image, merge_config=no_gcc_plugins)
222275

223276
#########################################
224277
# specific machine/platform configs
@@ -248,24 +301,47 @@ def full_compile_test(args, suite=None):
248301
# PPC_8xx + PPC16K_PAGES
249302
k('mpc885_ads_defconfig+16k', image, merge_config=['16k-pages'])
250303

304+
# 4K PAGE_SIZE builds, default builds are 64K
305+
k('ppc64le_guest_defconfig+4k', image, merge_config=guest_configs_4k)
306+
k('ppc64_guest_defconfig+4k', image, merge_config=guest_configs_4k)
307+
k('g5_defconfig+4k', image, merge_config=g5_configs + ['4k-pages'])
308+
251309
#########################################
252310
# specific enabled features
253311
#########################################
254-
for feature in ['preempt', 'compat', 'lockdep', 'reltest']:
312+
for feature in ['preempt', 'compat', 'lockdep', 'reltest', 'opt-for-size']:
255313
k(f'ppc64_defconfig+{feature}', image, merge_config=[f'{feature}-y'])
256314
k(f'ppc64le_defconfig+{feature}', image, merge_config=[f'{feature}-y'])
257315

316+
pcrel_image = image
317+
if not image_at_least(image, ['fedora@36', '[email protected]']):
318+
# Only GCC >= 12 can build pcrel because it needs -mcpu=power10
319+
pcrel_image = '[email protected]'
320+
321+
k('ppc64le_defconfig+pcrel', pcrel_image, merge_config=['pcrel-y'])
322+
# FIXME doesn't build
323+
# k('ppc64_defconfig+pcrel', pcrel_image, merge_config=['pcrel-y'])
324+
258325
#########################################
259326
# specific disabled features
260327
#########################################
261-
for feature in ['radix', 'modules']:
328+
for feature in ['radix', 'hpt-mmu']:
329+
feat_image = image
330+
if feature == 'hpt-mmu' and not image_at_least(image, ['fedora@36', '[email protected]']):
331+
# Only GCC >= 12 can build HPT=n because it needs -mcpu=power10
332+
feat_image = '[email protected]'
333+
334+
k(f'ppc64_defconfig+no{feature}', feat_image, merge_config=[f'{feature}-n'])
335+
k(f'ppc64le_defconfig+no{feature}', feat_image, merge_config=[f'{feature}-n'])
336+
k(f'ppc64_defconfig+no{feature}+4k', feat_image, merge_config=[f'{feature}-n', '4k-pages'])
337+
k(f'ppc64le_defconfig+no{feature}+4k', feat_image, merge_config=[f'{feature}-n', '4k-pages'])
338+
339+
k('ppc64_defconfig+noelf-abi-v2', image, merge_config=['elf-abi-v2-n'])
340+
341+
for feature in ['modules']:
262342
k(f'ppc64_defconfig+no{feature}', image, merge_config=[f'{feature}-n'])
263343
k(f'ppc64le_defconfig+no{feature}', image, merge_config=[f'{feature}-n'])
264344

265-
# PPC_85xx + RANDOMIZE_BASE
266-
# This hits gcc segfaults with earlier compilers, so use 8.5.0
267-
k('mpc85xx_smp_defconfig+kaslr', image.replace('[email protected]', '[email protected]'), merge_config=['randomize-base-y'])
268-
269345
#########################################
270346
# selftests
271347
#########################################

external/korg-toolchains/Makefile

+5-3
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ ARCHES := alpha \
5050
x86_64 \
5151
xtensa
5252

53-
VERSIONS := 13.2.0 \
53+
VERSIONS := 14.2.0 \
54+
14.1.0 \
55+
13.2.0 \
5456
13.1.0 \
5557
12.3.0 \
5658
12.2.0 \
@@ -94,8 +96,8 @@ download-all: $(ALL_TARGETS)
9496

9597
CLEAN_DIRS := $(patsubst %,gcc-%-nolibc,$(VERSIONS))
9698

97-
# Only download powerpc 13.2.0 & 5.5.0 by default
98-
download: gcc-13.2.0-nolibc/powerpc64-linux gcc-5.5.0-nolibc/powerpc64-linux
99+
# Only download powerpc 14.2.0 & 5.5.0 by default
100+
download: gcc-14.2.0-nolibc/powerpc64-linux gcc-5.5.0-nolibc/powerpc64-linux
99101

100102
prepare: download
101103

0 commit comments

Comments
 (0)