Rock5b how to run custom kernel build

Hi,

I’m currently diagnosing a kernel issue for this reason I’m repeatedly building the kernel myself according to this guide:
https://wiki.radxa.com/Rock5/guide/build-kernel-on-5b

There are three sections (building, packaging, installing packages). Unfortunately, the build/pack-kernel.sh script appears to run make distclean in the kernel directory and rebuild everything from scratch. Afterwards, it compresses everything into a .deb package, and then I can install it and boot into my new kernel. All in all, this takes around an hour, which is too long.

Is there a simpler, quicker way to do an incremental rebuild, skip the packaging step and just boot into the new image? I’m currently using Ubuntu 20.04.

The simplest way to use your own compiled kernel is to put it (and DTB/DTBO if required) in /boot directory, create additional section in /boot/extlinux/extlinux.conf and make this section to be a default one. If you kernel version is the same as currently running, then you can use the same DTB, DTBO and modules.

I have several kernels and sections in extlinux.conf and switch the default one by editing this file. Make sure you have a rescue bootable SD card to restore old settings if board doesn’t boot with new settings :slight_smile:

Also check is your /boot directory is the real “boot” directory :slight_smile:. On my board depending on boot type (from SD-card, eMMC, NVMe) in some cases wrong “boot” directory is mounted to /boot.

1 Like