Raspberry Pi - The Linux Kernel
Raspberry Pi - The Linux Kernel
Raspberry Pi - The Linux Kernel
Raspberry Pi
Documentation
Computers
Accessories
Microcontrollers
Services
Pico C SDK
Kernel
Edit this on GitHub
Choosing Sources
Kernel ConIguration
cd linux
KERNEL=kernel
make bcmrpi_defconfig
cd linux
KERNEL=kernel7
make bcm2709_defconfig
cd linux
KERNEL=kernel7l
make bcm2711_defconfig
cd linux
KERNEL=kernel8
make bcm2711_defconfig
CONFIG_LOCALVERSION="-v7l-MY_CUSTOM_KERNEL"
NOTE
Build sources
32-bit ConIgs
cd linux
KERNEL=kernel
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- b
cd linux
KERNEL=kernel7
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- b
cd linux
KERNEL=kernel7l
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- b
64-bit ConIgs
cd linux
KERNEL=kernel8
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- b
NOTE
NOTE
sdb
sdb1
sdb2
mkdir mnt
mkdir mnt/fat32
mkdir mnt/ext4
sudo mount /dev/sdb1 mnt/fat32
sudo mount /dev/sdb2 mnt/ext4
NOTE
For 32-bit
For 64-bit
Finally, copy the kernel and Device Tree blobs onto the SD
card, making sure to back up your old kernel:
For 32-bit
For 64-bit
kernel=kernel-myconfig.img
Finally, plug the card into the Raspberry Pi and boot it!
Preparing to ConIgure
The menuconfig tool requires the ncurses development
headers to compile properly. These can be installed with
the following command:
Using menuconfig
Once you’ve got everything set up and ready to go, you
can compile and run the menuconfig utility as follows:
make menuconfig
Version IdentiIcation
It’s important to check what version of the kernel you
have when downloading and applying patches. In a kernel
source directory, running head Makefile -n 3 will
show you the version the sources relate to:
VERSION = 3
PATCHLEVEL = 10
SUBLEVEL = 25
Applying Patches
How you apply patches depends on the format in which
the patches are made available. Most patches are a
single Vle, and applied with the patch utility. For example,
let’s download and patch our example kernel version with
the real-time kernel patches:
wget https://www.kernel.org/pub/linux/kernel/proj
gunzip patch-3.10.25-rt23.patch.gz
cat patch-3.10.25-rt23.patch | patch -p1
git am -3 /path/to/patches/*
Kernel Headers
Edit this on GitHub
NOTE
Follow us
Sign up to newsletter
Mastodon
YouTube
About Raspberry Pi
News
Contact us
Trademark
About us