DISCLAIMER: Building Linux locally can easily ruin your system. Doing this is at your own risk!
This guide assumes you are using 64bit. If not you have to find the commands that target 32bit for step 3 and 5.
- Install Git and build dependencies
sudo apt install git bc bison flex libssl-dev make
- Clone linux sources
git clone --depth=1 https://github.com/raspberrypi/linux
- Apply default configuration
-
cd linux KERNEL=kernel8 make bcm2711_defconfig
-
- Update the configuration by opening
.config
- Set
CONFIG_BLK_DEV_DRBD=m
- Set
CONFIG_BLK_DEV_RBD=m
- Set
CONFIG_BLK_DEV_NDB=m
- Set
- Build linux (-j4 utilizes all cores)
-
make -j4 Image modules dtbs sudo make modules_install sudo cp arch/arm64/boot/dts/broadcom/*.dtb /boot/ sudo cp arch/arm64/boot/dts/overlays/*.dtb* /boot/overlays/ sudo cp arch/arm64/boot/dts/overlays/README /boot/overlays/ sudo cp arch/arm64/boot/Image /boot/$KERNEL.img
-
- Wait 1-3 hours
- Reboot
sudo reboot now
- Enable RBD module
sudo modprobe rbd
lsmod | grep rbd
- If all went well you should see something like this:
-
rbd 90112 0 libceph 339968 1 rbd
-
- If not you might have ruined your OS 🥹
For thoses who search a solution about getting a kernel
6.6.30-v8-16k+
when you just build a kernel6.6.30-v8+
,Follow theses steps :
First, execute
sudo rpi-update
to get latest kernel (I got updated to kernel3b768c3f4d2b9a275fafdb53978f126d7ad72a1a
, so if you want the same as me just usesudo rpi-update 3b768c3f4d2b9a275fafdb53978f126d7ad72a1a
)Then execute
sudo make install
in the~/linux
directory. Be sure to still have theKERNEL=kernel8
variable.That must show you an error but that normal :
Then run :
Which will show you nothing in the output.
You can simply change your
/boot/firmware/config.txt
line whereauto_initramfs=1
to0
and adding just bellow :You can finalize with a new :
Reboot and that must work now.