real time kernel on pi?

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

Re: real time kernel on pi?

Postby moonman » Thu Jun 06, 2013 4:37 am

Hope it boots :) to get the patch. First git clone the kernel into some directory, then create a copy of it either by cloning it again, or by cp -a. Then apply the patch to the second one, make all the changes necessary and diff -ruN [dir 1] [dir 2] > newpatch.patch
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: real time kernel on pi?

Postby novitsky » Thu Jun 06, 2013 6:33 am

Hi,
I must say didn't understand what you wrote, sorry.Did you mean to get a corrected patch after boot?

Well, I'm sorry to say, it didn't boot. It got stuck.
after the compilation finished, I copied the PKGBUILDs directory to my desktop and run:
$this->bbcode_second_pass_code('', '# pacman -U linux-headers-raspberrypi-3.6.11-11-armv6h.pkg.tar.xz linux-raspberrypi-3.6.11-11-armv6h.pkg.tar.xz')

and reboot.

now it is stuck and I get different messages if I disconnect the keyboard and/or network.
what went wrong?
novitsky
 
Posts: 19
Joined: Mon Jun 03, 2013 5:17 am

Re: real time kernel on pi?

Postby moonman » Thu Jun 06, 2013 7:07 am

I meant to get the patch patch so you can rebuild the kernel later. Copied to desktop? You have to compile and run the kernel on the pi, not on the desktop.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: real time kernel on pi?

Postby novitsky » Thu Jun 06, 2013 7:15 am

Ho, no, I compiled the kernel, no errors on the PI. Then I copied the PKGBUILDs directory as a backup so I don't need to recompile if something goes wrong. I installed the RT kernel using packman -U, but now it doesn't start. the boot freezes.
should I do something else other than pacman -U <new build>.pkg.tar.xz ? change anything in the boot?
novitsky
 
Posts: 19
Joined: Mon Jun 03, 2013 5:17 am

Re: real time kernel on pi?

Postby moonman » Thu Jun 06, 2013 7:19 am

No, likely it just won't work.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: real time kernel on pi?

Postby novitsky » Thu Jun 06, 2013 7:25 am

:o
won't work? ARGGGG!
I won't loos hop yet :ugeek:
have YOU tried to do that? has it worked for you?
any suggestions on how to know what went wrong?
so much effort from you to get this far, sorry dude.
novitsky
 
Posts: 19
Joined: Mon Jun 03, 2013 5:17 am

Re: real time kernel on pi?

Postby moonman » Thu Jun 06, 2013 7:54 am

No I haven't. I don't think it will be beneficial to have an RT RPI kernel and I already had a feeling it would break something. Many things are pretty fragile in Raspberry - some drivers - especially usb support. It is getting better though.
Don't be sorry, you've tried -you've learned. Next time you will spend less time because you'll know what to do. What are the error messages that you get?
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: real time kernel on pi?

Postby novitsky » Thu Jun 06, 2013 8:18 am

The only error I can see on the screen (it runs too fast) is:
BUG: scheduling while atomic: swapper/1/0x00000002
and a bunch of what looks to me as details of the bug. is there a way to extract this error list (other than write down what's on the screen)?

it looks like something to do with the SD:
mmc0: SDHCI controller on BCM2700_Arasan (platform) using platform's DMA...
initcall sdhci_drv_init+x/xc returned with preemption imbalance...

why do you say you don't think it will be beneficial to have an RT RPI kernel?
I have a usb device I want to sample at a regular rate (50-500Hz), I use sigalarm to set the sampling run, but I have delays and I thought a RT-kernel will solve this problem.
novitsky
 
Posts: 19
Joined: Mon Jun 03, 2013 5:17 am

Re: real time kernel on pi?

Postby moonman » Thu Jun 06, 2013 8:35 am

LIkely not. R Pi is known to lose USB packets. Example: sometimes it misses or repeats keyboard keys or mousr freezes for a second or two. Try the fiqsplit kernel, it may/ or may not solve your problems.

Take this PKGBUILD and patches: https://github.com/archlinuxarm/PKGBUIL ... ypi-latest and make it use fiq_split git branch. I.E. change --branch=rpi-${_basekernel}.y to --branch=fiq_split and kernel version to 3.8.13
from 3.9.4

RT patch patches many aspects of the kernel, but I bet I does not patch some drivers that R Pi uses hence the OOPS
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: real time kernel on pi?

Postby novitsky » Thu Jun 06, 2013 9:33 am

OK. I cloned the PKGBUILDs and edited the PKGBUILD of linux-raspberrypi-latest:
$this->bbcode_second_pass_code('', '
_basekernel=3.8
pkgver=${_basekernel}.13

and in build():
git clone --branch=fiq_split --depth=1 https://github.com/raspberrypi/linux.git
')
Now, do I need the RT patch as well? from what you say I don't so I simply go ahead and build the kernel.

BTW: I get similar delays of USB readings if I connect the usb device to my desktop (i5 quad).
novitsky
 
Posts: 19
Joined: Mon Jun 03, 2013 5:17 am

PreviousNext

Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 12 guests