Quantcast
Viewing all articles
Browse latest Browse all 4871

Beginners • Help me,how do I compile a specific version of the Raspberry Pi Kernel?

How do I compile a specific version of the Raspberry Pi kernel? For example, the kernel version I want to compile is "6.6.20+rpt-rpi-v8" ;

I'm cross-compiling on Ubuntu 20.04 for Raspberry Pi 5 and Raspberry Pi 4, with the systems being Bookworm and Bullseye.

I'm cross-compiling the Raspberry Pi kernel on Ubuntu 20.04 and following these step:

Code:

cd linuxKERNEL=kernel8sudo make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- bcm2711_defconfigmake ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- Image modules dtbssudo mkdir mntsudo mkdir mnt/fat32sudo mkdir mnt/ext4sudo mount /dev/sdb1 mnt/fat32sudo mount /dev/sdb2 mnt/ext4sudo env PATH=$PATH make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_MOD_PATH=mnt/ext4 modules_installsudo cp mnt/fat32/$KERNEL.img mnt/fat32/$KERNEL-backup.imgsudo cp arch/arm64/boot/Image mnt/fat32/$KERNEL.isudo cp arch/arm64/boot/dts/broadcom/*.dtb mnt/fat32/sudo cp arch/arm64/boot/dts/overlays/*.dtb* mnt/fat32/overlays/sudo cp arch/arm64/boot/dts/overlays/README mnt/fat32/overlays/sudo umount mnt/fat32sudo umount mnt/ext4
The kernel compiled in this way for the 32-bit system can indeed be used, but when I use the "sudo uname -a" command to view the system kernel, it display "Linux raspberrypi 6.6.30-v8 #1 SMP PREEMPT Fri May 3 22:04:21 CST 2024 aarch64 GNU/Linux".

I want to cross-compile the "6.6.20+rpt-rpi-v8" version of the Raspberry Pi system kernel instead of the "6.6.30-v8" version.
How should I proceed to compile the "6.6.20+rpt-rpi-v8" version of the system kernel correctly?

Statistics: Posted by jieweizero — Sat May 04, 2024 9:47 pm



Viewing all articles
Browse latest Browse all 4871

Trending Articles