Scripts I use to do continuous integration for linuxppc.
Still (and probably always) under heavy development.
Make sure you can run containers.
On Ubuntu the scripts will use docker
, on Fedora they will use podman
.
You need a Linux source tree, which hasn't been built in. You can make sure it's
clean with make mrproper
, or clone a fresh tree.
Clone this repo.
$ cd ci-scripts
$ cd build
$ make pull-image@ppc64le@[email protected]
$ make SRC=~/src/linux kernel@ppc64le@[email protected] JFACTOR=$(nproc)
This will build you a ppc64le_defconfig
using the Ubuntu 21.10 toolchain.
The kernel will be in output/ppc64le@[email protected]/ppc64le_defconfig/vmlinux
.
For more help try make help
.
You can specify a defconfig with DEFCONFIG
.
$ make SRC=~/src/linux kernel@ppc64le@[email protected] DEFCONFIG=powernv_defconfig JFACTOR=$(nproc)
Note that the subarch (eg. ppc64le
) needs to match the defconfig, so to build
ppc64_defconfig
, use ppc64
.
$ make SRC=~/src/linux kernel@ppc64@[email protected] DEFCONFIG=ppc64_defconfig JFACTOR=$(nproc)
There are images for various toolchains, they are encoded in the distro name/version.
- kernel.org gcc 11.1.0
[email protected]
- kernel.org gcc 10.3.0
[email protected]
- kernel.org gcc 9.3.0
[email protected]
- kernel.org gcc 8.1.0
[email protected]
- kernel.org gcc 5.5.0
[email protected]
- Ubuntu 21.10
[email protected]
- Ubuntu 21.04
[email protected]
- Ubuntu 20.10
[email protected]
- Ubuntu 20.04
[email protected]
- Ubuntu 18.04
[email protected]
- Ubuntu 16.04
[email protected]
- Fedora 35
fedora@35
- Fedora 34
fedora@34
- Fedora 33
fedora@33
- Fedora 31
fedora@31
Only the Ubuntu toolchains can build the selftests.
To build the kernel selftests:
$ make SRC=~/src/linux selftests@ppc64le@[email protected] JFACTOR=$(nproc)
Or just the powerpc selftests:
$ make SRC=~/src/linux ppctests@ppc64le@[email protected] JFACTOR=$(nproc)
You can also build the powerpc selftests with all available toolchains using:
$ make SRC=~/src/linux ppctests JFACTOR=$(nproc)
As mentioned above you pass the make -j factor with JFACTOR=n
.
To run sparse use the [email protected]
image and pass SPARSE=1
.
$ make SRC=~/src/linux kernel@ppc64le@[email protected] SPARSE=1 JFACTOR=$(nproc)
The log will be in eg. output/ppc64le@[email protected]/ppc64le_defconfig/sparse.log
.
To build modules pass MODULES=1
To build with clang pass CLANG=1
, only works using the Ubuntu 21.10
images.
For a quiet build pass QUIET=1
, for verbose pass VERBOSE=1
.
By default the script does an incremental build, ie. it doesn't clean. You can
clean before building by passing PRE_CLEAN=1
, or afterward with POST_CLEAN=1
.
Alternately you can clean everything with make clean
.
If you have enough CPU and disk space, you can run multiple builds at once. The output directory is namespaced based on the subarch, distro, version, and defconfig.
If you don't want to pull an untrusted image, you can build it yourself with:
$ make rebuild-image@ppc64le@[email protected]
Note that the build mounts the source tree read-only, so nothing it does can affect your source tree.