Raspberry Pi 3 kernel image builder
10K+
Docker image to build a Raspberry Pi 3 kernel for the arm architecture
Building a kernel using the rpi3-kernel-builder Docker image works according to the following conventions. Configuration is done using environment variables:
/workdir/workdir/build<kernelversion>.tar.gz which contains:
config.txt if available in the sourcescmdline.txt if available in the sourcesdt-blob.bin if dt-blob.dts is available in the sourcesPATCH_DIRS. This is a space separated array of paths.
The patches need to have the extension .patchdefconfig or using all*config. The default is to configure using bcm2709_defconfig
defconfig set DEFCONFIG to the defconfig's name and make sure the defconfig is made available at the correct path.
For example DEFCONFIG=my_defconfig with my_defconfig being available at arch/arm/configs/my_defconfig'all*config set ALLCONFIG to one of the allconfig options allyesconfig, allmodconfig, allnoconfig or randconfig.
To override which config is used as the starting point set KCONFIG_ALLCONFIG to the path of the config file. For example ALLCONFIG=/workdir/configs/myminimalconfignproc.
To override this set the MAKEFLAGS environment variable. For example MAKEFLAGS=-j8.# Checkout kernel sources
$ git clone --single-branch --branch rpi-4.14.y --depth 1 https://www.github.com/raspberrypi/linux
# Build a kernel archive using the docker image
# using a volume mount for the linux sources to /workdir
$ cd linux
$ docker run --rm -ti -v "${PWD}":/workdir simonvanderveldt/rpi3-kernel-builder
# When the build is done the kernel archive is available in the build directory
$ ls -ahl build/
total 28M
drwxr-xr-x 2 simon simon 6 Feb 3 23:21 .
drwxr-xr-x 5 simon simon 6 Feb 3 23:08 ..
-rw-r--r-- 1 root root 178K Feb 3 23:21 kernel-4.9.59-0.0.7-g8172bbc.sha256
-rw-r--r-- 1 root root 11M Feb 3 23:21 kernel-4.9.59-0.0.7-g8172bbc.tar.gz
Based on:
Content type
Image
Digest
Size
348.7 MB
Last updated
about 6 years ago
docker pull simonvanderveldt/rpi3-kernel-builder