[split] Real Time Kernels discussion
|
Posts: 129
Threads: 5
Joined: Feb 2020
Reputation:
57
Location: UK
(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???
Thank you, @ Snoopy8. That's fantastic! I'm away for Christmas, so it will probably be New Year indigestion
In the meantime, I'll be doing my prep.
First question: is this for Ubuntu or Raspberry Pi OS?
Posts: 764
Threads: 40
Joined: Mar 2019
Reputation:
203
Location: Melbourne, Australia
(22-Dec-2023, 11:19 PM)uglymusic Wrote: First question: is this for Ubuntu or Raspberry Pi OS?
Raspberry Bookworm OS Lite. Will build a 6.1 RT kernel using Raspberry source. Note that the kernel will run with no problems, but it will blank out the kernel field in SnakeOil / Hardware. This is an interim solution until AK can tell me how to deploy an RT kernel using Grub in Bookworm.
Also, unable to compile using Ubuntu sources.
Have tested this process a few times. Will work as it is, with current 6.1.67-RT20 RT patch. If that changes, please adjust patch number. Have fun, and hopefully will give little indigestion...
Posts: 2,956
Threads: 192
Joined: Feb 2016
Reputation:
644
Location: Perth, WA
@ Snoopy8 If you can, please upload your kernel to the Snakeoil Wiki. Raspberry Pi being Raspberry Pi meaning the kernel you built will be compatible with all Raspberry Pi 4, and so on.
As with @ hkphantomgtr, my intention is to come up with a web application for people to customise their kernel, and if the kernel as they exactly specified exists, go straight to download, or build and send an email to a download link.
If only I won some lottery, such is life I guess.
Snakeoil Operating System - Music, your way!
Posts: 764
Threads: 40
Joined: Mar 2019
Reputation:
203
Location: Melbourne, Australia
23-Dec-2023, 07:37 AM
(This post was last modified: 23-Dec-2023, 09:25 AM by Snoopy8.)
(23-Dec-2023, 07:18 AM)agent_kith Wrote: @Snoopy8 If you can, please upload your kernel to the Snakeoil Wiki. Raspberry Pi being Raspberry Pi meaning the kernel you built will be compatible with all Raspberry Pi 4, and so on. Which kernel? The image file that works, or the deb package that I couldn't get running. Or both?
Also. please create a new 1.3 branch on Wiki (I don't know how!) and I will take it from there.
Posts: 129
Threads: 5
Joined: Feb 2020
Reputation:
57
Location: UK
(23-Dec-2023, 04:32 AM)Snoopy8 Wrote: (22-Dec-2023, 11:19 PM)uglymusic Wrote: First question: is this for Ubuntu or Raspberry Pi OS?
Raspberry Bookworm OS Lite. Will build a 6.1 RT kernel using Raspberry source. Note that the kernel will run with no problems, but it will blank out the kernel field in SnakeOil / Hardware. This is an interim solution until AK can tell me how to deploy an RT kernel using Grub in Bookworm.
Also, unable to compile using Ubuntu sources.
Have tested this process a few times. Will work as it is, with current 6.1.67-RT20 RT patch. If that changes, please adjust patch number. Have fun, and hopefully will give little indigestion...
Brill! Looking forward to trying it
Posts: 2,956
Threads: 192
Joined: Feb 2016
Reputation:
644
Location: Perth, WA
(23-Dec-2023, 07:37 AM)Snoopy8 Wrote: Also. please create a new 1.3 branch on Wiki (I don't know how!) and I will take it from there. Just overwrite the existing sections  . Moving forward to 1.3.x not going to support 1.2.x much. Old entries are all kept in history so we can always revisit the old pages as needed. (This is why I prefer a wiki manual over a more traditional user doc page).
Just woke up around 8am Perth time.. Man I must be so tired past few weeks to sleep in this late! Prepping for 1.3.0 official release soonish.
Snakeoil Operating System - Music, your way!
Posts: 764
Threads: 40
Joined: Mar 2019
Reputation:
203
Location: Melbourne, Australia
(23-Dec-2023, 07:18 AM)agent_kith Wrote: @Snoopy8 If you can, please upload your kernel to the Snakeoil Wiki. Raspberry Pi being Raspberry Pi meaning the kernel you built will be compatible with all Raspberry Pi 4, and so on. The kernel image that I built works only for the machine that it was built on. Cannot copy the files to another instance; it wrecks the audio inputs at the minimum.
So, will postpone this idea of sharing kernels until the issue of using a dpkg to deploy kernels on Bookworm is solved.
Posts: 764
Threads: 40
Joined: Mar 2019
Reputation:
203
Location: Melbourne, Australia
27-Dec-2023, 08:34 PM
(This post was last modified: 28-Dec-2023, 07:27 AM by Snoopy8.)
(23-Dec-2023, 07:18 AM)agent_kith Wrote: @Snoopy8 If you can, please upload your kernel to the Snakeoil Wiki. Raspberry Pi being Raspberry Pi meaning the kernel you built will be compatible with all Raspberry Pi 4, and so on.
I have made 2 RT kernels for Bookworm, one in kernel8.img format, and also a deb package.
The kernel8 method is documented in post #30
https://www.snakeoil-os.net/forums/Threa...98#pid6998
This works on the computer (sd card) that generated the image, but when I swapped sd cards, copied all files, cannot enable new kernel.
With the deb package, can see it in SO but cannot enable it.
For your development work, you can use the 2712 kernel which comes with Bookworm. I will upload my RT kernel to the wiki for your testing when you are ready.
Posts: 2,956
Threads: 192
Joined: Feb 2016
Reputation:
644
Location: Perth, WA
(27-Dec-2023, 08:34 PM)Snoopy8 Wrote: For your development work, you can use the 2712 kernel which comes with Bookworm. I will upload my RT kernel to the wiki for your testing when you are ready. Can do that now as I need more kernels to test. For some reason 2712 don't boot up in the Pi4 that I have, but the v8 one works fine.
Almost certain the existing Linux (PC) kernel detection code don't work properly for aarch64. because while those files are there, the actual kernel image is gzipped and to find the version I'll need to extract the image and then find the version that match.. Still trying to find a good way to do this, so the more kernels I have at hand, the better.
Snakeoil Operating System - Music, your way!
Posts: 764
Threads: 40
Joined: Mar 2019
Reputation:
203
Location: Melbourne, Australia
(28-Dec-2023, 01:55 PM)agent_kith Wrote: Can do that now as I need more kernels to test. For some reason 2712 don't boot up in the Pi4 that I have, but the v8 one works fine. Can't upload tar file to Wiki. Have sent you link to access Google Docs.
(28-Dec-2023, 01:55 PM)agent_kith Wrote: Almost certain the existing Linux (PC) kernel detection code don't work properly for aarch64. because while those files are there, the actual kernel image is gzipped and to find the version I'll need to extract the image and then find the version that match.. Still trying to find a good way to do this, so the more kernels I have at hand, the better.  I suspect that you may be able to use /boot/firmware/config.txt to reference the new kernel but I was not able to find the right fields.
https://www.raspberrypi.com/documentatio...g_txt.html
|
Users browsing this thread: |
1 Guest(s)
|
|
Welcome
|
You have to register before you can post on our site.
|
Latest Threads
|
Normal/Inverted Phase Playback
Last Post: hkphantomgtr
Yesterday 05:05 PM
» Replies: 8
» Views: 3577
|
Snakeoil 1.4.3 (High End U3)
Last Post: Snoopy8
23-Apr-2025 04:13 PM
» Replies: 31
» Views: 1230
|
Work In Progress: 1.4.4
Last Post: agent_kith
23-Apr-2025 11:35 AM
» Replies: 13
» Views: 268
|
Wiki update - need your help!
Last Post: Snoopy8
22-Apr-2025 02:23 PM
» Replies: 7
» Views: 179
|
No audio devices on RPi5 with latests bu...
Last Post: miksi
21-Apr-2025 12:52 AM
» Replies: 16
» Views: 439
|
new install issues
Last Post: Snoopy8
19-Apr-2025 01:08 PM
» Replies: 7
» Views: 189
|
Connecting Spotify to SnakeOil
Last Post: Snoopy8
16-Apr-2025 01:55 PM
» Replies: 10
» Views: 267
|
Misc. sharing for building Raspberry Pi ...
Last Post: hkphantomgtr
13-Apr-2025 12:47 PM
» Replies: 2
» Views: 113
|
[split] Snakeoil 1.4.3 (High End U3)
Last Post: agent_kith
09-Apr-2025 03:45 PM
» Replies: 1
» Views: 77
|
SQ difference - Raspberry Pi vs x86_64?
Last Post: agent_kith
09-Apr-2025 03:41 PM
» Replies: 15
» Views: 1082
|
SnakeoilOS Mission Statement
|
Our mission is to create a free to use computer OS that is easy to install, intuitive to operate and play music that will connect and engage with you emotionally.
SnakeoilOS gives you the freedom to spend more time on listening, enjoying and exploring music. Wasting time on computers is now a thing of the past! Everything is constantly evolving/improving. Please check back often for updates.
If you like this project, do show your support with a small token donation. All donations collected will be used to run this website, and for purchasing new equipment for the project.
|
|
|