Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: cosminbro on June 16, 2023, 04:16:43 PM

Title: piCore 13 realtime kernel
Post by: cosminbro on June 16, 2023, 04:16:43 PM
How can I configure a realtime kernel in piCore 13.1 64 bit?
Title: Re: piCore 13 realtime kernel
Post by: Paul_123 on June 16, 2023, 07:56:11 PM
You have to build it yourself.  I quit doing it when the rt patches would not cleanly apply nor yield a stable system.  I haven’t looked in a year or so, but perhaps someone is maintaining a rpi rt kernel source.
Title: Re: piCore 13 realtime kernel
Post by: cosminbro on June 30, 2023, 04:19:39 PM
You have to build it yourself.  I quit doing it when the rt patches would not cleanly apply nor yield a stable system.  I haven’t looked in a year or so, but perhaps someone is maintaining a rpi rt kernel source.

The problem is I can't find the realtime patches for kernel 5.10.77 (piCore 64 13.1), nor kernel 6.1.25 (piCore 64 14.0).
https://wiki.linuxfoundation.org/realtime/start
Title: Re: piCore 13 realtime kernel
Post by: cosminbro on July 01, 2023, 04:43:52 AM
The newest piCore 8 with kernel 4.4.39 has realtime patch available, but I think this kernel it's too old....
Title: Re: piCore 13 realtime kernel
Post by: Paul_123 on July 01, 2023, 08:16:06 AM
Start here https://wiki.linuxfoundation.org/realtime/preempt_rt_versions. You will have to apply the rt patches against the rpi kernel tree.   It is not easy.

Title: Re: piCore 13 realtime kernel
Post by: cosminbro on July 01, 2023, 01:42:13 PM
Ok, the latest rt patch for kernel 6.1 is https://cdn.kernel.org/pub/linux/kernel/projects/rt/6.1/patch-6.1.33-rt11.patch.xz

My question is, if piCore 14 64bit has kernel 6.1.25, which patch should by apply from 6.1 folder (https://cdn.kernel.org/pub/linux/kernel/projects/rt/6.1/) ? Should I apply the latest patch, respectivelly patch-6.1.33-rt11.patch.xz ?

Thanks
Title: Re: piCore 13 realtime kernel
Post by: Paul_123 on July 01, 2023, 09:09:10 PM
You are going to have to build the kernel and modules anyway.  Just pull the matching kernel from rpi, Then apply the patch.
Title: Re: piCore 13 realtime kernel
Post by: cosminbro on July 02, 2023, 04:32:23 PM
Everything is ok now, except one thing.

I compile piCore 64 bit with kernel 6.1.25, and, when I try to install alsa.tcz, it get me an error:

Downloading: alsa-modules-6.1.25-rt11-piCore-v8.tcz
Connecting to repo.tinycorelinux.net (128.127.66.77:80)
wget: server returned error: HTTP/1.1 404 Not Found
md5sum: alsa-modules-6.1.25-rt11-piCore-v8.tcz.md5.txt: No such file or directory
Error on alsa-modules-6.1.25-rt11-piCore-v8.tcz

Of course, there is no file with such name. I unsquash the existing alsa-modules-6.1.25-piCore-v8.tcz and I modify the subfolder name from lib/modules to 6.1.25-rt11-piCore-v8.tcz

After reboot, ALSA still doesn't work....
Title: Re: piCore 13 realtime kernel
Post by: Rich on July 02, 2023, 04:39:56 PM
Hi cosminbro
Reread the last post by Paul_123:
You are going to have to build the kernel and modules anyway.  Just pull the matching kernel from rpi, Then apply the patch.
Title: Re: piCore 13 realtime kernel
Post by: cosminbro on July 02, 2023, 05:04:23 PM
I already rebuild the modules. I also rebuild alsa-modules-6.1.25-rt11-piCore-v8.tcz with drivers from new compiled modules one. Still ALSA doesn't work.
Title: Re: piCore 13 realtime kernel
Post by: Paul_123 on July 02, 2023, 05:45:06 PM
Did you build the kernel and modules -6.1.25-rt11-piCore-v8.gz. For the boot partition,   And then alsa-modules extension.

Title: Re: piCore 13 realtime kernel
Post by: cosminbro on July 02, 2023, 06:34:50 PM
Did you build the kernel and modules -6.1.25-rt11-piCore-v8.gz. For the boot partition,   And then alsa-modules extension.

It's something strange here. I'm using config file 6.1.25-piCore-v8_.config.xz and the folder sound is included in generated modules. Isn't the same folder sound from inside the tcz alsa-modules extension?
Title: Re: piCore 13 realtime kernel
Post by: Rich on July 02, 2023, 07:33:55 PM
Hi cosminbro
Is your new kernel finding the ALSA modules? If you run this:
Code: [Select]
modinfo soundcoreDoes it return information about soundcore.ko?
Do the  filename:  and  vermagic:  fields contain  6.1.25-rt11-piCore-v8 ?
Title: Re: piCore 13 realtime kernel
Post by: Paul_123 on July 02, 2023, 09:46:41 PM
That’s just packaging.   Modules in extensions are in /usr/local/lib/modules/xxxxxxxxx

There is a symlink in /lib/modules/ xxxxxx that points there.  If that link isn’t right, depmod won’t find the modules.   Your extensions can use the /lib/modules path.
Title: Re: piCore 13 realtime kernel
Post by: cosminbro on July 03, 2023, 06:11:43 AM
I manage to get all work! Thanks.

Next, I want to repack the picore installation image with these modifications. How can I do this?
Title: Re: piCore 13 realtime kernel
Post by: Paul_123 on July 03, 2023, 07:48:33 AM
Just use an imager program to make an image of your sdcard.

Or Google how to mount images and partitions, then copy the new files.
Title: Re: piCore 13 realtime kernel
Post by: vinceASPECT on July 03, 2023, 08:57:26 AM
that is available for  Rpi music distro...... on some pi arm builds.....RT kernel

thx
c
Title: Re: piCore 13 realtime kernel
Post by: cosminbro on July 07, 2023, 02:37:04 PM
After many tests, I made a conclusion: realtime kernels based on piCore seems to work best on RPI4 or CM4 based machines. Things aren't so stable on older rpi based devices.
Title: Re: piCore 13 realtime kernel
Post by: Paul_123 on July 07, 2023, 03:03:58 PM
That's possible, I quit maintaining a RT kernel due to stability issues right around the time the pi4 came out.