Raspberry Pi: Building the Kernel¶
Todo jjj¶
https://www.raspberrypi.org/documentation/linux/kernel/building.md
(Story is not quite up to date)
Toolchain (on Fedora)
# dnf install binutils-arm-linux-gnu gcc-arm-linux-gnu
Kernel source
$ uname -r 5.4.83-v7+
$ git clone https://github.com/raspberrypi/linux $ cd linux/ $ git checkout --track remotes/origin/rpi-5.4.y
Fix
EXTRAVERSION
VERSION = 5 PATCHLEVEL = 4 SUBLEVEL = 83 EXTRAVERSION = -v7
Build
Use config from running Pi kernel
# modprobe configs # ls -l /proc/config.gz
Copy and unzip that into kernel root, as
.config
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnu- oldconfig
Build
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnu- zImage modules dtbs