[split] Real Time Kernels discussion
#31
(22-Dec-2023, 08:13 AM)Snoopy8 Wrote: @uglymusic, this my Xmas present which may or may not cause indigestion ?  Think    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 Smile

In the meantime, I'll be doing my prep.

First question: is this for Ubuntu or Raspberry Pi OS?
Reply

#32
(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...
Reply

#33
@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. 
  [Image: angel1.gif]
Snakeoil Operating System - Music, your way!
[-] The following 1 user Likes agent_kith's post:
  • hkphantomgtr
Reply

#34
(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.
Reply

#35
(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 Smile
Reply

#36
(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 Tongue. 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!
[-] The following 2 users Like agent_kith's post:
  • uglymusic, Snoopy8
Reply

#37
(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.
Reply

#38
(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.
[Image: Boot-kernel-2023-12-27-230252.png]

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.
Reply

#39
(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. Tongue
Snakeoil Operating System - Music, your way!
Reply

#40
(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. Tongue
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
Reply



Bookmarks

Possibly Related Threads…
Thread Author Replies Views Last Post
  [split] Install Snakeoil OS on a USB stick cpcat 4 1,247 21-Jan-2023, 02:11 PM
Last Post: cpcat
  Interesting discussion developing over at DIY-Audio re cpu-isolation/jitter/noise etc Bromf 1 701 27-Sep-2022, 02:05 AM
Last Post: mkysimes
  More upsampling antics......This time with SqueezeLite mkysimes 6 3,044 05-May-2020, 07:35 PM
Last Post: mkysimes



Users browsing this thread:
8 Guest(s)

[-]
Our Sponsors

[-]
Welcome
You have to register before you can post on our site.

Username/Email:


Password:





[-]
Latest Threads
Howto setup resampling in Logitech Media...
Last Post: Coacharnold
18-Nov-2024 12:06 AM
» Replies: 7
» Views: 5799
Dropping Measurements, Hello High-End.
Last Post: agent_kith
26-Oct-2024 09:02 AM
» Replies: 12
» Views: 445
Very happy to have Sankeoil......! mpd w...
Last Post: run51
24-Oct-2024 05:35 AM
» Replies: 9
» Views: 1678
SO no soundcard detected - RPI Pi4 snake...
Last Post: run51
21-Oct-2024 10:55 PM
» Replies: 4
» Views: 105
download
Last Post: Snoopy8
19-Oct-2024 05:52 AM
» Replies: 1
» Views: 105
Full proces to instal snakeiol 100% work...
Last Post: audioluthier
11-Oct-2024 02:32 AM
» Replies: 9
» Views: 336
A network protocol designed for CAS
Last Post: hkphantomgtr
10-Oct-2024 09:48 PM
» Replies: 0
» Views: 85
CAS with "Single Core"
Last Post: hkphantomgtr
06-Oct-2024 08:32 AM
» Replies: 2
» Views: 116
MPD player not working
Last Post: Snoopy8
27-Sep-2024 11:54 AM
» Replies: 7
» Views: 218
LMS playing DFF files sampling rate
Last Post: Snoopy8
16-Sep-2024 07:45 PM
» Replies: 5
» Views: 151

[-]
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.


Powered By MyBB, © 2002-2024. Theme © Melroy van den Berg.