linux – How do I install a custom Raspberry Pi kernel on a Pi4 Board?

I’m building a kernel following the instructions here along with some additional kernel features based on the bcm2711_defconfig.

But attempts so far have failed to run my kernel.

I’m building a 64bit kernel for a Raspberry Pi 4, and replacing the boot/kernel8.img doesn’t seem to do anything, as each time I reboot, I’m seeing the original kernel I’m starting with:

$ uname -a
Linux jamie-rpi 6.6.47+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.47-1+rpt1 (2024-09-02) aarch64 GNU/Linux

and not the kernel I built.

I have even tried creating a debian package, re-using the install and removal scripts provided by inspecting the linux-image-6.6.47+rpt-rpi-v8_1%3a6.6.47-1+rpt1_arm64.deb package. When I install my custom package, I can see an initramfs being generated, but upon reboot, the old kernel still prevails.

How can I debug this effort of understaning how the Raspberry Pi selects the kernel it needs to run, and where I might have deveated from the instructions (cited) – or are they out of date?

Read more here: Source link