WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: piCore 13 realtime kernel  (Read 3426 times)

Offline cosminbro

  • Jr. Member
  • **
  • Posts: 68
piCore 13 realtime kernel
« on: June 16, 2023, 04:16:43 PM »
How can I configure a realtime kernel in piCore 13.1 64 bit?

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1225
Re: piCore 13 realtime kernel
« Reply #1 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.

Offline cosminbro

  • Jr. Member
  • **
  • Posts: 68
Re: piCore 13 realtime kernel
« Reply #2 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

Offline cosminbro

  • Jr. Member
  • **
  • Posts: 68
Re: piCore 13 realtime kernel
« Reply #3 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....

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1225
Re: piCore 13 realtime kernel
« Reply #4 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.


Offline cosminbro

  • Jr. Member
  • **
  • Posts: 68
Re: piCore 13 realtime kernel
« Reply #5 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

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1225
Re: piCore 13 realtime kernel
« Reply #6 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.

Offline cosminbro

  • Jr. Member
  • **
  • Posts: 68
Re: piCore 13 realtime kernel
« Reply #7 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....

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11514
Re: piCore 13 realtime kernel
« Reply #8 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.
« Last Edit: July 02, 2023, 04:43:00 PM by Rich »

Offline cosminbro

  • Jr. Member
  • **
  • Posts: 68
Re: piCore 13 realtime kernel
« Reply #9 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.

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1225
Re: piCore 13 realtime kernel
« Reply #10 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.


Offline cosminbro

  • Jr. Member
  • **
  • Posts: 68
Re: piCore 13 realtime kernel
« Reply #11 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?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11514
Re: piCore 13 realtime kernel
« Reply #12 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 ?

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1225
Re: piCore 13 realtime kernel
« Reply #13 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.

Offline cosminbro

  • Jr. Member
  • **
  • Posts: 68
Re: piCore 13 realtime kernel
« Reply #14 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?