(22-Dec-2023, 08:13 AM)Snoopy8 Wrote: @"uglymusic", this my Xmas present which may or may not cause indigestion ?Use these series of commands to create a RT kernel called kernel8.
Code:# based on https://forums.raspberrypi.com/viewtopic.php?t=344994
uname -r # show existing kernel
sudo apt update
sudo apt install git bc bison flex libssl-dev make libncurses5-dev
mkdir kernel
cd kernel/
git clone --depth=1 --branch rpi-6.1.y https://github.com/raspberrypi/linux
# check this website for correct version of RT kernel
# https://wiki.linuxfoundation.org/realtime/start
wget https://mirrors.edge.kernel.org/pub/linux/kernel/projects/rt/6.1/patch-6.1.67-rt20.patch.gz
cd linux/
zcat ../patch-6.1.67-rt20.patch.gz | patch -p1 --dry-run #check the patch fits
zcat ../patch-6.1.67-rt20.patch.gz | patch -p1
make bcm2711_defconfig
make menuconfig #General -> Preemption Model select Fully Preemptible Kernel (Real-Time)
nano .config #add personalised suffix to CONFIG_LOCALVERSION
scripts/config --disable SYSTEM_TRUSTED_KEYS
scripts/config --disable SYSTEM_REVOCATION_KEYS
# ideally run next command on terminal because it takes time; SSH session may reset
make -j4 Image.gz modules dtbs # -j4 uses 4 CPUs, prompted for certificate, enter, cpuset should be turned off
sudo make -j4 modules_install
sudo cp arch/arm64/boot/dts/broadcom/*.dtb /boot/firmware/
sudo cp arch/arm64/boot/dts/overlays/*.dtb* /boot/firmware/overlays/
sudo cp arch/arm64/boot/dts/overlays/README /boot/firmware/overlays/
sudo cp /boot/firmware/kernel8.img /boot/firmware/kernel8old.img
sudo cp arch/arm64/boot/Image.gz /boot/firmware/kernel8.img
sudo reboot
uname -r # confirm new kernel
It will take just over 2 hours to do the compile (make -j4...).
@"hkphantomgtr", you have been testing various kernels for the Pi. Not sure whether you want to try building a RT kernel???
I have played around building RT kernel for CAS 10 years ago. By that time there was a software, I just ticked, unticked, ticked, unticked thru a long menu, then press confirm for several times, after the compilation then the RT kernel is done. But I didn't do it for such long time that I've forgot everything about it.
I'm afraid that, unless I found a similar software, I may not be able to follow those steps in the web.
I'd rather leave this to you and AK.