Skip to content

Commit 5ee9aeb

Browse files
committed
Merge branch 'master' into deploy
2 parents 9c775c5 + f67b730 commit 5ee9aeb

156 files changed

Lines changed: 1958 additions & 773 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,3 +149,72 @@ $ make rebuild-image@ppc64le@ubuntu
149149

150150
Note that the build mounts the source tree read-only, so nothing it does can
151151
affect your source tree.
152+
153+
Bisecting the kernel vs a selftest
154+
----------------------------------
155+
156+
Build the selftests using a version of the test that's known good. Usually
157+
there's no reason to rebuild the tests on every kernel revision.
158+
159+
These examples are run from the kernel directory, not the ci-scripts directory.
160+
It can be done either way, but it's more natural to run from the kernel
161+
directory when bisectting the kernel. This assumes Linux is in `~/linux` and
162+
these scripts are in `~/ci-scripts`, adapt as appropriate.
163+
164+
```
165+
$ cd ~/linux
166+
```
167+
168+
```
169+
$ make SRC=$PWD -C ~/ci-scripts/build QUIET=1 JFACTOR=$(nproc) ppctests@ppc64le@ubuntu@16.04 INSTALL=1
170+
```
171+
172+
:rotating_light: Using an old Ubuntu image uses an older libc, which is more
173+
likely to be present on the guest root filesystem. Another option is to build
174+
the selftests statically.
175+
176+
Tar up the selftests into the current directory, the qemu scripts will detect them:
177+
178+
```
179+
$ tar -czf selftests.tar.gz -C $HOME/ci-scripts/build/output/selftests_powerpc@ppc64le@ubuntu@16.04/ install
180+
```
181+
182+
```
183+
$ ~/ci-scripts/scripts/boot/qemu-pseries+kvm --callback "run_selftests(powerpc/mm:wild_bctr)"
184+
...
185+
INFO: Running 'qemu-system-ppc64 -nographic -vga none -M pseries -smp 8 -m 4G -accel kvm ...
186+
...
187+
/ # INFO: Running individual selftests powerpc/mm:wild_bctr
188+
/var/tmp/selftests/run_kselftest.sh -t powerpc/mm:wild_bctr
189+
[ 2.783761][ T201] kselftest: Running tests in powerpc
190+
TAP version 13
191+
1..1
192+
# timeout set to 300
193+
# selftests: powerpc/mm: wild_bctr
194+
# test: wild_bctr
195+
# tags: git_version:v6.8-rc6-2555-gfe559db
196+
# Everything is OK in here.
197+
...
198+
# success: wild_bctr
199+
ok 1 selftests: powerpc/mm: wild_bctr
200+
/ # poweroff
201+
/ # Stopping network: [ 3.104385][ T274] ip (274) used greatest stack depth: 10912 bytes left
202+
OK
203+
Saving random seed: OK
204+
Stopping klogd: OK
205+
Stopping syslogd: OK
206+
umount: devtmpfs busy - remounted read-only
207+
umount: can't unmount /: Invalid argument
208+
The system is going down NOW!
209+
Sent SIGTERM to all processes
210+
Sent SIGKILL to all processes
211+
Requesting system poweroff
212+
[ 5.152672][ T293] reboot: Power down
213+
INFO: Test completed OK
214+
```
215+
216+
More than one selftest can be run by passing multiple arguments to
217+
`run_selftests` or by passing multiple `--callback` options.
218+
219+
From there the bisection can either be run by hand, or fully automated by
220+
creating a script to build the kernel and run the qemu test.

build/allcross/Dockerfile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ RUN apt-get -q -y update && \
3838
libc-dev \
3939
libelf-dev \
4040
libfuse-dev \
41-
liblz4-tool \
41+
lz4 \
4242
libssl-dev \
4343
lzop \
4444
make \
@@ -52,11 +52,7 @@ RUN apt-get -q -y update && \
5252
xz-utils && \
5353
rm -rf /var/lib/apt/lists/* /tmp/packages.sh /var/cache/* /var/log/dpkg.log
5454

55-
ARG uid
56-
ARG gid
57-
58-
RUN groupadd --gid $gid linuxppc
59-
RUN useradd --uid $uid --gid $gid linuxppc
55+
RUN useradd linuxppc
6056
USER linuxppc
6157

6258
COPY scripts/container-build.sh /bin/container-build.sh

build/docs/Dockerfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,7 @@ RUN apt-get -q -y update && \
2929
&& \
3030
rm -rf /var/lib/apt/lists/* /var/cache/* /var/log/dpkg.log
3131

32-
ARG uid
33-
ARG gid
34-
35-
RUN groupadd --gid $gid linuxppc
36-
RUN useradd --uid $uid --gid $gid linuxppc
32+
RUN useradd linuxppc
3733
USER linuxppc
3834

3935
COPY scripts/container-build.sh /bin/container-build.sh

build/fedora/Dockerfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,7 @@ RUN dnf -y install --setopt=install_weak_deps=False \
4141
COPY fedora/make-links.sh /tmp/make-links.sh
4242
RUN /tmp/make-links.sh ${compiler_version} && rm /tmp/make-links.sh
4343

44-
ARG uid
45-
ARG gid
46-
47-
RUN groupadd --gid $gid linuxppc
48-
RUN useradd --uid $uid --gid $gid linuxppc
44+
RUN useradd linuxppc
4945
USER linuxppc
5046

5147
COPY scripts/container-build.sh /bin/container-build.sh

build/korg/Dockerfile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,7 @@ RUN curl -sSL $base_url/$tar_file > $tar_file && \
5151
COPY korg/make-links.sh /tmp/make-links.sh
5252
RUN /tmp/make-links.sh ${compiler_version} && rm /tmp/make-links.sh
5353

54-
ARG uid
55-
ARG gid
56-
57-
RUN userdel -r ubuntu || true
58-
RUN groupadd --gid $gid linuxppc
59-
RUN useradd --uid $uid --gid $gid linuxppc
54+
RUN useradd linuxppc
6055
USER linuxppc
6156

6257
COPY scripts/container-build.sh /bin/container-build.sh

build/scripts/container-build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ if [[ "$1" == "kernel" ]]; then
124124
rc=$?
125125
if [[ $rc -eq 0 ]]; then
126126
tar -cjf /output/modules.tar.bz2 -C $mod_path lib
127+
tar -czf /output/modules.tar.gz -C $mod_path lib
127128
fi
128129
else
129130
echo "## Modules not configured"

build/scripts/image.sh

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -117,23 +117,13 @@ if [[ -n "$https_proxy" ]]; then
117117
cmd+="--build-arg https_proxy=$https_proxy "
118118
fi
119119

120-
if [[ -z "$UID" ]]; then
121-
UID=$(id -u)
122-
fi
123-
124-
if [[ -z "$GID" ]]; then
125-
GID=$(id -g)
126-
fi
127-
128120
if [[ "$distro" == "korg" ]]; then
129121
cmd+="--build-arg compiler_version=$version "
130122
arch=$(uname -m)
131123
cmd+="--build-arg base_url=https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/${arch}/${version}/ "
132124
cmd+="--build-arg tar_file=${arch}-gcc-${version}-nolibc-powerpc64-linux.tar.xz "
133125
fi
134126

135-
cmd+="--build-arg uid=$UID "
136-
cmd+="--build-arg gid=$GID "
137127
cmd+="--build-arg from=$from "
138128
cmd+="--build-arg apt_mirror=$APT_MIRROR "
139129
cmd+="-t $image ."

build/scripts/prune.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ case "$task" in
2727
mkdir -p "artifacts"
2828
for path in .config vmlinux System.map arch/powerpc/boot/zImage include/config/kernel.release \
2929
arch/powerpc/kernel/asm-offsets.s arch/powerpc/boot/uImage modules.tar.bz2 \
30-
sparse.log log.txt
30+
modules.tar.gz sparse.log log.txt
3131
do
3232
if [[ -e "$path" ]]; then
3333
mv "$path" artifacts/

build/ubuntu/Dockerfile

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ ARG apt_mirror
88
ENV apt_mirror=${apt_mirror}
99
RUN [ -n "$apt_mirror" ] && sed -i -e "s|ports.ubuntu.com|$apt_mirror|" /etc/apt/sources.list || true
1010

11-
# Deal with Ubuntu 21.10 repos moving to old-releases (ppc64le only)
12-
RUN if echo "$from" | grep -q ".*ubuntu:21.10"; then sed -i -e "s|ports.ubuntu.com/ubuntu-ports|old-releases.ubuntu.com/ubuntu|" /etc/apt/sources.list; fi
11+
# Deal with Ubuntu 21/22.10 repos moving to old-releases (ppc64le only)
12+
RUN if echo "$from" | grep -q ".*ubuntu:2[12]\.10"; then sed -i -e "s|ports.ubuntu.com/ubuntu-ports|old-releases.ubuntu.com/ubuntu|" /etc/apt/sources.list; fi
1313

1414
RUN apt-get -q -y update && \
1515
DEBIAN_FRONTEND=noninteractive \
@@ -52,11 +52,7 @@ RUN apt-get -q -y update && \
5252
COPY ubuntu/make-links.sh /tmp/make-links.sh
5353
RUN /tmp/make-links.sh ${compiler_version} && rm /tmp/make-links.sh
5454

55-
ARG uid
56-
ARG gid
57-
58-
RUN groupadd --gid $gid linuxppc
59-
RUN useradd --uid $uid --gid $gid linuxppc
55+
RUN useradd linuxppc
6056
USER linuxppc
6157

6258
COPY scripts/container-build.sh /bin/container-build.sh

build/ubuntu/packages.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ if [[ "$machine" == "ppc64le" ]]; then
2020
PACKAGES+=" libhugetlbfs-dev"
2121
PACKAGES+=" libmnl-dev"
2222
PACKAGES+=" libmount-dev"
23-
PACKAGES+=" liburing-dev"
23+
if [[ "$major" -gt 20 ]]; then
24+
PACKAGES+=" liburing-dev"
25+
fi
2426

2527
# For the x86_64 container
2628
if [[ "$major" -ge 21 ]]; then

0 commit comments

Comments
 (0)