Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally working

Moderators: mdrjr, odroid

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby adbensi » Sat Mar 14, 2015 7:29 pm

Woohoo...
and vibrating drums... :)

if you make any application to exchange 32bits at once, please, I would like to understand how, may be in another place.

Best regards
adbensi
 
Posts: 80
Joined: Fri Apr 18, 2014 10:29 am
Location: Brazil
languages_spoken: Português
ODROIDs: U3 and C1

Re: Real time kernel 3.10.67-rt71 (PREEMPT_RT), testing requ

Unread postby kinsa » Sun Mar 15, 2015 12:12 am

Clx wrote:Could you please pull it so we would both be working on the same and fresh version?

Clx,

You need to edit kernel/sched/core.c, line 7492, https://github.com/Clouded/linux-rt-odr ... re.c#L7492

Cheers
42
kinsa
 
Posts: 40
Joined: Fri Sep 26, 2014 4:32 pm
languages_spoken: english
ODROIDs: U3 C1

Re: Real time kernel 3.10.67-rt71 (PREEMPT_RT), testing requ

Unread postby Clx » Mon Mar 16, 2015 11:08 pm

kinsa wrote:Clx,

You need to edit kernel/sched/core.c, line 7492, https://github.com/Clouded/linux-rt-odr ... re.c#L7492

Cheers


Yep, fixed. Thanks!
Clx
 
Posts: 50
Joined: Fri Jan 16, 2015 9:23 pm
languages_spoken: english
ODROIDs: ODROID-C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby Clx » Tue Mar 17, 2015 1:31 am

kinsa wrote:I've packaged the RT kernel and the debs can be found here: http://0ptr.link/C1/pool/main/l/linux-upstream/

It contains the full configuration and can also be used under Arch linux.

Cheers!

PS: did you made a progress on RPi2? :)


Kinsa, what command did you use to build the packages?
Even though I applied your "Modified deb-pkg for rt build" and "Add dtb file to debian package" patches I get an error when running "make deb-pkg":
Code: Select all
...
  CC      sound/usb/snd-usb-audio.mod.o
  LD [M]  sound/usb/snd-usb-audio.ko
  CC      sound/usb/snd-usbmidi-lib.mod.o
  LD [M]  sound/usb/snd-usbmidi-lib.ko
  BUILDDEB
cp: omitting directory ‘arch/arm/boot/dts/’
/home/clouded/Workspace/linux-rt-odroid-c1/scripts/package/Makefile:90: recipe for target 'deb-pkg' failed
make[1]: *** [deb-pkg] Error 1
Makefile:1080: recipe for target 'deb-pkg' failed
make: *** [deb-pkg] Error 2
Clx
 
Posts: 50
Joined: Fri Jan 16, 2015 9:23 pm
languages_spoken: english
ODROIDs: ODROID-C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby kinsa » Tue Mar 17, 2015 7:29 am

There's a typo and I've updated the repo :)

Here's the command I've used:
Code: Select all
make NAME=<your name> EMAIL=<your email> KDEB_PKGVERSION=<version> KBUILD_IMAGE=uImage BOARD_DTB=meson8b_odroidc.dtb deb-pkg
42
kinsa
 
Posts: 40
Joined: Fri Sep 26, 2014 4:32 pm
languages_spoken: english
ODROIDs: U3 C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby kinsa » Tue Mar 17, 2015 7:33 am

The dwc_otg driver is the source of the >500 usec spikes. Disabling the driver causes it to go away.

This is not acceptable for my application :(
42
kinsa
 
Posts: 40
Joined: Fri Sep 26, 2014 4:32 pm
languages_spoken: english
ODROIDs: U3 C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby Clx » Tue Mar 17, 2015 8:41 pm

kinsa wrote:There's a typo and I've updated the repo :)

Here's the command I've used:
Code: Select all
make NAME=<your name> EMAIL=<your email> KDEB_PKGVERSION=<version> KBUILD_IMAGE=uImage BOARD_DTB=meson8b_odroidc.dtb deb-pkg


Thanks! :)

kinsa wrote:The dwc_otg driver is the source of the >500 usec spikes. Disabling the driver causes it to go away.

This is not acceptable for my application :(


Try limiting the USB speed to FS by adding dwc_otg.speed=1 argument to the kernel command line. It may help.
Clx
 
Posts: 50
Joined: Fri Jan 16, 2015 9:23 pm
languages_spoken: english
ODROIDs: ODROID-C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby Clx » Wed Mar 18, 2015 10:14 pm

kinsa wrote:There's a typo and I've updated the repo :)

Here's the command I've used:
Code: Select all
make NAME=<your name> EMAIL=<your email> KDEB_PKGVERSION=<version> KBUILD_IMAGE=uImage BOARD_DTB=meson8b_odroidc.dtb deb-pkg


Hmm, it does build okay and meson8b_odroidc.dtb is in the deb packet, but when the package is installed dtb is only installed to /boot and not /media/boot.
Last edited by Clx on Wed Mar 18, 2015 11:06 pm, edited 1 time in total.
Clx
 
Posts: 50
Joined: Fri Jan 16, 2015 9:23 pm
languages_spoken: english
ODROIDs: ODROID-C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby kinsa » Wed Mar 18, 2015 10:27 pm

You have to manually copy it, same with the uImage.

Safety feature :)
42
kinsa
 
Posts: 40
Joined: Fri Sep 26, 2014 4:32 pm
languages_spoken: english
ODROIDs: U3 C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby Clx » Wed Mar 18, 2015 11:56 pm

kinsa wrote:You have to manually copy it, same with the uImage.

Safety feature :)


I just tried on a fresh system - uImage does get installed. And during the installation previous dtb file has been removed, while the new one wasn't installed. So after installing the package the system does not boot as there is no dtb file in the /media/boot. I copied the dtb file and the system booted with "SMP PREEMPT RT" in uname (I did not copy the uImage manually).
Clx
 
Posts: 50
Joined: Fri Jan 16, 2015 9:23 pm
languages_spoken: english
ODROIDs: ODROID-C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby kinsa » Thu Mar 19, 2015 12:19 am

I think it's something to do with the Ubuntu post install script. The resulting deb doesn't overwrite the old uImage file.

I'm actually using debian on a single partition (no /media/boot directory).
42
kinsa
 
Posts: 40
Joined: Fri Sep 26, 2014 4:32 pm
languages_spoken: english
ODROIDs: U3 C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby kinsa » Thu Mar 19, 2015 11:41 am

Clx wrote:Try limiting the USB speed to FS by adding dwc_otg.speed=1 argument to the kernel command line. It may help.

Didn't work.

I think it has something to do with thermal issues. I've disabled CONFIG_THERMAL and added a fan.

Simultaneous stress testing on both SD card and USB HD were made and so far (2 hrs) it's holding up, the max values are all below 100 for the 4 cores.

The only downside with disabling CONFIG_THERMAL is that it also disables cpufreq, so no overclocking.
42
kinsa
 
Posts: 40
Joined: Fri Sep 26, 2014 4:32 pm
languages_spoken: english
ODROIDs: U3 C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby adbensi » Thu Mar 19, 2015 8:22 pm

Hello,

I put on the boot.ini
setenv m "1080p"
setenv m_bpp "16"
setenv hpd "0"
# setenv disableuhs "disableuhs"
[...]
setenv bootargs "[...] dwc_otg.speed=1 dwc_otg.fiq_fix_enable=1 dwc_otg.microframe_schedule=1 dwc_otg.nak_holdoff_enable=1"

and latency is nice for me, I will start many times yet to confirm..

14 hours:
root@odroid:~# cyclictest -D1d -m -n -a0 -t -p90 -i1000 --smp
WARN: -a ignored due to --smp
# /dev/cpu_dma_latency set to 0us
policy: fifo: loadavg: 0.77 0.74 0.75 2/234 1838

T: 0 ( 1686) P:90 I:1000 C:50905035 Min: 6 Act: 13 Avg: 13 Max: 77
T: 1 ( 1687) P:90 I:1500 C:33936672 Min: 6 Act: 12 Avg: 13 Max: 63
T: 2 ( 1688) P:90 I:2000 C:25452492 Min: 6 Act: 21 Avg: 13 Max: 61
T: 3 ( 1689) P:90 I:2500 C:20361984 Min: 6 Act: 18 Avg: 13 Max: 67

Linux odroid 3.10.70-rt74 #2 SMP PREEMPT RT Wed Mar 18 23:46:42 ACDT 2015 armv7l armv7l armv7l GNU/Linux
driver: meson_cpufreq
maximum transition latency: 200 us.
hardware limits: 24.0 MHz - 1.73 GHz
available cpufreq governors: performance
current CPU frequency is 1.73 GHz (asserted by call to hardware).

No cooler, thermal enabled

Best Regards
adbensi
 
Posts: 80
Joined: Fri Apr 18, 2014 10:29 am
Location: Brazil
languages_spoken: Português
ODROIDs: U3 and C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby kinsa » Thu Mar 19, 2015 8:28 pm

Your load average is too low.
Code: Select all
policy: fifo: loadavg: 0.77 0.74 0.75 2/234 1838


Try running stress test:
Code: Select all
stress --cpu 16 --io 8 --vm 4 --hdd 4 --vm-bytes 128M


I've updated the kernel debs.

BTW, what's your room temp? Mine is around 28-30 degC with no heatsink. ;)
42
kinsa
 
Posts: 40
Joined: Fri Sep 26, 2014 4:32 pm
languages_spoken: english
ODROIDs: U3 C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby kinsa » Fri Mar 20, 2015 7:31 am

Here's the results after a 12hr run:
results.png
results.png (43.13 KiB) Viewed 7699 times

Code: Select all
root@machinekit:~# cyclictest -D1d -m -n -a0 -t -p90 -i1000 --smp -H1000
# /dev/cpu_dma_latency set to 0us
policy: fifo: loadavg: 35.89 35.90 35.86 23/299 3483         

T: 0 ( 2712) P:90 I:1000 C:44198357 Min:      9 Act:   17 Avg:   15 Max:      85
T: 1 ( 2713) P:90 I:1000 C:44198194 Min:      9 Act:   18 Avg:   19 Max:      84
T: 2 ( 2714) P:90 I:1000 C:44198017 Min:      9 Act:   17 Avg:   16 Max:      60
T: 3 ( 2715) P:90 I:1000 C:44197824 Min:      8 Act:   19 Avg:   17 Max:      72

# Total: 044198365 044198203 044198026 044197832
# Min Latencies: 00009 00009 00009 00008
# Avg Latencies: 00015 00019 00016 00017
# Max Latencies: 00085 00084 00060 00072
# Histogram Overflows: 00000 00000 00000 00000


Here's the load that I've used:
Code: Select all
stress --cpu 16 --io 8 --vm 4 --hdd 4 --vm-bytes 128M
42
kinsa
 
Posts: 40
Joined: Fri Sep 26, 2014 4:32 pm
languages_spoken: english
ODROIDs: U3 C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby adbensi » Fri Mar 20, 2015 8:45 am

This is with dwc_otg changed? My test still running...
adbensi
 
Posts: 80
Joined: Fri Apr 18, 2014 10:29 am
Location: Brazil
languages_spoken: Português
ODROIDs: U3 and C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby kinsa » Fri Mar 20, 2015 8:52 am

The is the latest kernel with a bunch of changes.

There's no dwc_otg entry in the boot args.
42
kinsa
 
Posts: 40
Joined: Fri Sep 26, 2014 4:32 pm
languages_spoken: english
ODROIDs: U3 C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby adbensi » Fri Mar 20, 2015 12:32 pm

then with or without dwc_otg is similar because my system is load now, and the results are closed
adbensi
 
Posts: 80
Joined: Fri Apr 18, 2014 10:29 am
Location: Brazil
languages_spoken: Português
ODROIDs: U3 and C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby kinsa » Fri Mar 20, 2015 1:23 pm

yes, dwc_otg have no effect on the latency.
42
kinsa
 
Posts: 40
Joined: Fri Sep 26, 2014 4:32 pm
languages_spoken: english
ODROIDs: U3 C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby adbensi » Sat Mar 21, 2015 11:23 pm

My test fail,
with load 30, I get 204 us latency. I am not considered cooler.

Kinsa, did You get great results with cooler or thermal disabled?
adbensi
 
Posts: 80
Joined: Fri Apr 18, 2014 10:29 am
Location: Brazil
languages_spoken: Português
ODROIDs: U3 and C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby kinsa » Sun Mar 22, 2015 6:52 am

Disabling CONFIG_THERMAL made a big difference. I also used a small fan to keep the board cool.

Which kernel version are you using?
42
kinsa
 
Posts: 40
Joined: Fri Sep 26, 2014 4:32 pm
languages_spoken: english
ODROIDs: U3 C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby adbensi » Sun Mar 22, 2015 7:15 am

The last one, Linux odroid 3.10.70-rt74 #2 SMP PREEMPT RT Wed Mar 18 23:46:42 ACDT 2015 armv7l armv7l armv7l GNU/Linux

Did You try without overclock, with thermal enabled?
then.. if the focus is thermal and not the overclock, may be cool rebuild the boot to assert clock to 1.72GHz without cpufreq, it is possible?
adbensi
 
Posts: 80
Joined: Fri Apr 18, 2014 10:29 am
Location: Brazil
languages_spoken: Português
ODROIDs: U3 and C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby kinsa » Sun Mar 22, 2015 8:14 am

CONFIG_THERMAL will throttle the clock when cpu reaches a certain threshold, I think the transition is the cause for the delay.

My latest kernal is dated Mar 19.
42
kinsa
 
Posts: 40
Joined: Fri Sep 26, 2014 4:32 pm
languages_spoken: english
ODROIDs: U3 C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby kinsa » Sun Mar 22, 2015 8:21 am

You'll need a good cooling if you want to overclock without CONFIG_THERMAL. I think the processor will just shutdown if it reached the critical temperature.

I'm sure you can overclock it without using cpufreq. You just need to find out the register settings.
42
kinsa
 
Posts: 40
Joined: Fri Sep 26, 2014 4:32 pm
languages_spoken: english
ODROIDs: U3 C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby adbensi » Sun Mar 22, 2015 8:28 am

Thanks, I will cooling it and try manipulate the registers
adbensi
 
Posts: 80
Joined: Fri Apr 18, 2014 10:29 am
Location: Brazil
languages_spoken: Português
ODROIDs: U3 and C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby Elektron » Sun Mar 22, 2015 1:35 pm

kinsa is your real time kernel ready for use? I was thinking of trying my cnc stuff on it to cut out the use of a separate AVR board. All I need is to be able to control some stepper moors without any interruption to the stepping pulses. From what you have written I need to install your Debs dated Mar 19 on top of a standard Odroid install? I have a spare C1 to try this on. How did you attach the cooling fan? Mine has the standard Odroid heatsink. Does not matter if it is not yet perfect as this is an experiment. Do not need any over clocking as the C1 is fast enough as it comes.
Elektron
 
Posts: 23
Joined: Fri Dec 05, 2014 7:44 pm
languages_spoken: english
ODROIDs: 1 x XU3-Lite,5 x C-1, 5 x C1+, 1 x XU4

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby kinsa » Sun Mar 22, 2015 3:58 pm

Yes it's ready to use on any debian based distro.

But take note of what Clx had observed: make sure to copy the dtb file to /media/boot if you're using ubuntu.

I think the heatsink will do. I don't have any so I've used a normal 40mm fan hanging over the board.
42
kinsa
 
Posts: 40
Joined: Fri Sep 26, 2014 4:32 pm
languages_spoken: english
ODROIDs: U3 C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby Elektron » Mon Mar 23, 2015 12:47 pm

kinsa wrote:Yes it's ready to use on any debian based distro.

But take note of what Clx had observed: make sure to copy the dtb file to /media/boot if you're using ubuntu.

I think the heatsink will do. I don't have any so I've used a normal 40mm fan hanging over the board.


Very good and thank you kinsa.

I will be trying my own Gcode interpreter which currently works via my own AVR Mega128 board through RS232C. Obviously it will be simpler to ditch the 8 bit AVR board and go native! :)

I will use an infra-red thermometer to record the heatsink temperature.

I am planning on using the ODROID C1 Tinkering Kit for the interface to a commercial 2 axis stepper driver board.

Yes, using Ubuntu 14.10 as the OS.
Elektron
 
Posts: 23
Joined: Fri Dec 05, 2014 7:44 pm
languages_spoken: english
ODROIDs: 1 x XU3-Lite,5 x C-1, 5 x C1+, 1 x XU4

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby Clx » Tue Mar 24, 2015 9:01 pm

New version of RT kernel for Odroid-C1. Built with make-kpkg, installs smoothly on Ubuntu (dtbs included and installed automatically) and should work on other distros too.

Download links for debs of kernel with modules and headers:
linux-image-3.10.72-rt77_20150319_armhf.deb
linux-headers-3.10.72-rt77_20150319_armhf.deb

To install download the package and run:
Code: Select all
sudo dpkg -i linux-image-3.10.72-rt77_20150319_armhf.deb


Patched source code is available here:
https://github.com/Clouded/linux-rt-odr ... 10.72-rt77
Clx
 
Posts: 50
Joined: Fri Jan 16, 2015 9:23 pm
languages_spoken: english
ODROIDs: ODROID-C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby adbensi » Wed Mar 25, 2015 7:18 am

I am still running of the stress and latency test in the version -74. Without thermal is going very very well, I will update to -77 :)

Thanks a lot CLx
adbensi
 
Posts: 80
Joined: Fri Apr 18, 2014 10:29 am
Location: Brazil
languages_spoken: Português
ODROIDs: U3 and C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby adbensi » Thu Mar 26, 2015 8:10 am

Without CONFIG_THERMAL and CONFIG_WATCHDOG, very regular latency, test restarted many times. Congradulations Kinsa,

loadavg: 18.87 18.78 18.78 13/252 1884
T: 0 ( 1595) P:90 I:1000 C:86399880 Min: 7 Act: 11 Avg: 15 Max: 104
T: 1 ( 1596) P:90 I:1500 C:57599858 Min: 7 Act: 13 Avg: 14 Max: 64
T: 2 ( 1597) P:90 I:2000 C:43199824 Min: 6 Act: 9 Avg: 15 Max: 57
T: 3 ( 1598) P:90 I:2500 C:34559827 Min: 6 Act: 12 Avg: 15 Max: 53

CLx, Your linux-image deb file have the feature CONFIG_THERMAL ?
adbensi
 
Posts: 80
Joined: Fri Apr 18, 2014 10:29 am
Location: Brazil
languages_spoken: Português
ODROIDs: U3 and C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby markwinger » Tue Apr 14, 2015 9:13 pm

I am only a week or so into the odroid-c1 experience. I am trying to get low latency audio with jack. The best I can do with the standard kernel is 256 blocks. It works well at that but too high on latency. If I set 128, it works for a few seconds with xruns that stops. WIthin a few seconds the entire system lock. Power off seems to be the only way out. I assumed I would need a rt kernel anyway so I tried this one. A little better but as soon as I get xruns, system hangs. I also notice that the ethernet communication is slower than than slow. I plan to use netjack and I don't think 100base-t is enough.

This thread talked about some kernel lock ups.
Question 1:Was that solved or am I hitting that same problem?
Question 2:Was the network performance issue completely resolved?


I tried this on a banana pro with almost identical performance results, but no lockups. But the banana does not currently have any rt kernels available. I have no experience with kernel work and was hoping I would not have to tackle that, which is why I am at the odroid-c1. Both the banana and odroid seem like they have sufficient power to do what I want if I can get a good rt kernel on one of them.
markwinger
 
Posts: 26
Joined: Tue Apr 07, 2015 12:56 am
languages_spoken: english
ODROIDs: c1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby adbensi » Wed Apr 15, 2015 7:43 am

Hello,
Question 1, If You use sd-card it will be very stable
Question 2, not, yet.. but You can use one usb-ethernet adapter. I will try to fix it
adbensi
 
Posts: 80
Joined: Fri Apr 18, 2014 10:29 am
Location: Brazil
languages_spoken: Português
ODROIDs: U3 and C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby markwinger » Wed Apr 15, 2015 10:27 pm

I am using and sd card. It seems to perform pretty well.

I did some testing by starting with the ubuntu distribution image. After install, I installed jack2d and nothing else. Fire it up a play some music using Audacious. Jack default settings of 1024 buffers and it works flawlessly, not xruns. If I lower the number of buffers to 256 it will play for a while, then suddenly it gets one xrun and the status show hundred of xruns per second. I cannot stop jackd from qjackctl. To get everything terminated I need to kill -9 some of them. If I start qjactctl again, it displays the dialog but the center window is blank and then the entire system freezes. The exact same test on a banana-pro has troubles with xruns at 256 buffers but I can stop things and the system does not lock.

So it is clear to me that the odroid-c1 os has some kind of a deadlock occurring.

Now I tried to install the rt77 kernel but I cannot. It fails to install. I have tries several time with no success and the it is not boot-able. I used apt-get distro-upgrade after the last kernel install failure to get it to boot. I did not capture the output for the failed install but next time I will.

I then tried the minimum ubuntu image and was able to install the rt77 kernel on that. But I don't understand why it fails in the first case. I have not tried to take the minimal install far enough to see if that works better or not.

Any ideas on what the problem is, please let me know.

Thanks,
Mark
markwinger
 
Posts: 26
Joined: Tue Apr 07, 2015 12:56 am
languages_spoken: english
ODROIDs: c1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby pasdesignal » Thu Apr 16, 2015 6:12 am

Am I doing something really stupid here?

Can't replace the kernel following the instructions on the first post....using C1 Ubuntu 14.04.2 LTS image (v1.4.1) downloaded from here:
http://odroid.com/dokuwiki/doku.php?id= ... nux_ubuntu

odroid@odroid:/tmp$ sudo dpkg -i linux-image-3.10.72-rt77_20150319_armhf.deb
(Reading database ... 159458 files and directories currently installed.)
Preparing to unpack linux-image-3.10.72-rt77_20150319_armhf.deb ...
Examining /etc/kernel/preinst.d/
run-parts: executing /etc/kernel/preinst.d/remove-old-on-upgrade 3.10.72-rt77 /boot/uImage-3.10.72-rt77
Done.
Unpacking linux-image-3.10.72-rt77 (20150319) ...
dpkg: error processing archive linux-image-3.10.72-rt77_20150319_armhf.deb (--install):
trying to overwrite '/boot/meson8b_odroidc.dtb', which is also in package linux-image-3.10.72-78 20150323
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.10.72-rt77 /boot/vmlinuz-3.10.72-rt77
Errors were encountered while processing:
linux-image-3.10.72-rt77_20150319_armhf.deb
pasdesignal
 
Posts: 13
Joined: Fri Dec 26, 2014 3:51 pm
languages_spoken: english
ODROIDs: C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby adbensi » Thu Apr 16, 2015 7:46 am

You can extract header / image package and copy manually.
adbensi
 
Posts: 80
Joined: Fri Apr 18, 2014 10:29 am
Location: Brazil
languages_spoken: Português
ODROIDs: U3 and C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby markwinger » Thu Apr 16, 2015 8:14 am

What do files I copy and where?
markwinger
 
Posts: 26
Joined: Tue Apr 07, 2015 12:56 am
languages_spoken: english
ODROIDs: c1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby adbensi » Thu Apr 16, 2015 8:44 am

Use dpkg -x to extract the files,
You need image pkg and head pkg.

Copy uImage, meson8b_odroidc.dtb and uInitrd to /boot
firmeware to /lib/firmeware
and modules to /lib/modules

I didn't know if these kernel have thermal control disabled. Tomorrow I can upload my kernel if You want.
adbensi
 
Posts: 80
Joined: Fri Apr 18, 2014 10:29 am
Location: Brazil
languages_spoken: Português
ODROIDs: U3 and C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby markwinger » Thu Apr 16, 2015 11:12 am

Thanks,

I'll give it a try.
markwinger
 
Posts: 26
Joined: Tue Apr 07, 2015 12:56 am
languages_spoken: english
ODROIDs: c1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby markwinger » Thu Apr 16, 2015 10:51 pm

I tried 2 things.
1-After installing the rt77 kernel on the minimal ubuntu image, I tried to use that. But the ethenet performance of the rt kernel is so bad, I could not even to and apt-get install of a xfce, but was very slow and time outs made down loads failed. So I abandoned this path.
2-Tried to in install the rt77 kernel manually on top of the standard distribution image. After extracting the .deb files, I could not find the file ulnitrd file. I copied the uImage and meson89b_odroidc.dtb files firmware and moludes directories as you specified. I tried to reboot without the updated uInitrc file, but it complains about failing to mount /media/boot if I want to Skip or Manually recover. Skip doent work, but I somehow got past this, it boots. /mount/boot appears to be mounted and the desktop opens but jack does not work at all.

You said I needed the header package, but no files in that package are consumed (unless the uInitrc is supposed to be in there somewhere) What did I miss?
markwinger
 
Posts: 26
Joined: Tue Apr 07, 2015 12:56 am
languages_spoken: english
ODROIDs: c1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby kinsa » Fri Apr 17, 2015 12:26 am

pasdesignal wrote:Unpacking linux-image-3.10.72-rt77 (20150319) ...
dpkg: error processing archive linux-image-3.10.72-rt77_20150319_armhf.deb (--install):
trying to overwrite '/boot/meson8b_odroidc.dtb', which is also in package linux-image-3.10.72-78 20150323



Just move /boot/meson8b_odroidc.dtb to a safe place and run
Code: Select all
sudo dpkg -i linux-image-3.10.72-rt77_20150319_armhf.deb
again
42
kinsa
 
Posts: 40
Joined: Fri Sep 26, 2014 4:32 pm
languages_spoken: english
ODROIDs: U3 C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby adbensi » Fri Apr 17, 2015 8:15 am

Hello Markwinger,

I can not upload the uInitrd, the forum is limited at 2MB. But if you send one PV messagem I can share my google drive with You,

I have the kernel with Thermal disabled if You want.
adbensi
 
Posts: 80
Joined: Fri Apr 18, 2014 10:29 am
Location: Brazil
languages_spoken: Português
ODROIDs: U3 and C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby odroid » Fri Apr 17, 2015 11:11 am

adbensi wrote: I can not upload the uInitrd, the forum is limited at 2MB.

We've just increased the limitation to 10MB from 3MB.
Do you need more?
User avatar
odroid
Site Admin
 
Posts: 28532
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby markwinger » Fri Apr 17, 2015 11:06 pm

I decided to continue in parallel working with the odroid-c1 and the banana-pro. I am getting no responses from the banana forum, so if I try to do a rt kernel it looks like no one else is interested. I am attempting now just to build a kernel for the first time and we'll see how that goes. The steps in doing that seem pretty straight forward, but how to configure/patch it for realtime or low latency is not clear.

I assume doing it for the banana would be very similar to a raspberry or the odriod. Since you have already done this for the odriod, can you give me and advice as I start down this path?

thanks.
Mark.
markwinger
 
Posts: 26
Joined: Tue Apr 07, 2015 12:56 am
languages_spoken: english
ODROIDs: c1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby pasdesignal » Sat Apr 18, 2015 7:29 am

kinsa wrote:
pasdesignal wrote:Unpacking linux-image-3.10.72-rt77 (20150319) ...
dpkg: error processing archive linux-image-3.10.72-rt77_20150319_armhf.deb (--install):
trying to overwrite '/boot/meson8b_odroidc.dtb', which is also in package linux-image-3.10.72-78 20150323



Just move /boot/meson8b_odroidc.dtb to a safe place and run
Code: Select all
sudo dpkg -i linux-image-3.10.72-rt77_20150319_armhf.deb
again


Thanks for the suggestion Kinsa. Unfortunately this didn't make any difference.

I had to use --force-all option to get any further. That seemed to work fine and I can now boot using RT kernel.

However network connectivity through the eth0 adaptor is indeed painfully slow. I'll keep following with interest.
pasdesignal
 
Posts: 13
Joined: Fri Dec 26, 2014 3:51 pm
languages_spoken: english
ODROIDs: C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby adbensi » Sat Apr 18, 2015 7:32 am

It is wonderfull odroid, thanks! but I still get these error:
"The attachment’s file size is too large, the maximum upload size is 2 MB.
Please note this is set in php.ini and cannot be overridden."

Markwinger, odroid-C1 is quadrcore 1.7GHz and SDHC, kernel 3.10 ;)
You can build it,

Get the Kernel RT
git clone https://github.com/adbensi/linux-rt-odroid-c1

Copy the config
cd linux-rt-odroid-c1
cp arch/arm/configs/odroidc_rt_defconfig .config

Build Modules
make -j4 modules

Build Kernel
make uImage

Install Modules
kernelversion=`cat ./include/config/kernel.release`
rm -rf /lib/modules/$kernelversion
sync
make modules_install

Backup your kernel and create uInitrd files
kernelversion=`uname -r`
mv /boot/uInitrd /boot/uInitrd-$kernelversion
mv /boot/uImage /boot/uImage-$kernelversion

kernelversion=`cat ./include/config/kernel.release`
cp .config /boot/config-$kernelversion
mkinitramfs -c gzip -o ./initramfs-$kernelversion $kernelversion
sync

Create uInitrd
mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d ./initramfs-$kernelversion ./uInitrd

Build meson8b_odroidc
make dtbs

Build firmeware
make firmeware

And copy the compiled elements to the boot folder
mv /media/boot /media/boot.old
ln -s /boot /media/boot2
cp ./arch/arm/boot/uImage /boot
cp ./arch/arm/boot/dts/meson8b_odroidc.dtb /boot
cp ./uInitrd /boot
copy ./firmeware/* to /lib/firmeware
adbensi
 
Posts: 80
Joined: Fri Apr 18, 2014 10:29 am
Location: Brazil
languages_spoken: Português
ODROIDs: U3 and C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby kinsa » Sat Apr 18, 2015 7:36 am

pasdesignal wrote:However network connectivity through the eth0 adaptor is indeed painfully slow. I'll keep following with interest.

Yup, this is a big bummer.
You must use a usb adaptor if you want RT with C1.
42
kinsa
 
Posts: 40
Joined: Fri Sep 26, 2014 4:32 pm
languages_spoken: english
ODROIDs: U3 C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby markwinger » Sat Apr 18, 2015 11:20 am

Yes, the c1 is quad core, but so is a raspberry pi rev2. The banana pi is dual core and supposedly slightly faster that the quad core raspberry. I would love to get the c1 work but the networking is so slow right now that even the raspberry pi dual single would work better for my ap. Plus, the kernel freezing up I get even with the standard kernel, I believe the banana is a safer starting point stability wize.

I am learning to build a kernel by doing one for the banana pi I have built a basic kernel but have not tried to patch it yet. My problem there getting the matching rt patch for the kernel version. I built a basic kernel and am about to try booting it. If it works I will move on and try patching up to RT assuming I find the right patch version.
markwinger
 
Posts: 26
Joined: Tue Apr 07, 2015 12:56 am
languages_spoken: english
ODROIDs: c1

Re: Real time kernel 3.10.67-rt71 (PREEMPT_RT), testing requ

Unread postby adbensi » Sat Apr 18, 2015 9:14 pm

mlinuxguy wrote:Unless you go into the amlogic ethernet driver and fix all the spin_lock calls appropriately I'm not surprised.
As an example you might have to do this:
Function qla2x00_poll does local_irq_save() before calling qla24xx_intr_handler
which has a spinlock. Since spinlocks are sleepable on rt, it is not allowed
to call them with interrupts disabled. Therefore we use local_irq_save_nort()
instead which saves flags without disabling interrupts.


So you would need to check the poll function to see if it calls the intr handler, or check your spin_locks to see if any have disabled interrupts.


I will try this
adbensi
 
Posts: 80
Joined: Fri Apr 18, 2014 10:29 am
Location: Brazil
languages_spoken: Português
ODROIDs: U3 and C1

Re: Real time kernel 3.10.70-rt74 (PREEMPT_RT), finally work

Unread postby markwinger » Tue Apr 21, 2015 9:13 am

Working back and forth between banana and odroid. I am currently trying build your kernel and I can get nowhere. I started with the ubuntu distribution, expanded the file system then tried to clone you source.

The system would keep freezing when trying to clone your source. I have several 2.1 amp power supplies so I tried swithing to another. It hangs every time while resolving deltas (about 21%).
I even tries powering the microusb port for more power, but still hangs.

Going to download it on a pc to see if I can copy via thumb drive.

With these freezes, I'm not sure it's worth the effort.
markwinger
 
Posts: 26
Joined: Tue Apr 07, 2015 12:56 am
languages_spoken: english
ODROIDs: c1

PreviousNext

Return to Ubuntu

Who is online

Users browsing this forum: No registered users and 6 guests