32bit and 64bit Linux-3.14 RTAI Now Working

More
06 Sep 2014 07:35 #50824 by Bari
32b and 64b Linux 3.14 RTAI is now working with Linuxcnc. We have been running it the past week using all cores. Linuxcnc has RTAI affinity set to use the highest cpu core. Non RT runs on the remaining cores. We are getting very good latency results and very smooth video playback and rendering while running Linuxcnc on AMD64 APU's using the integrated graphics.

github.com/NTULINUX/RTAI

Only tested and confirmed working on AMD64 platforms.

This is for those that know how to build kernels and RTAI from scratch.

Anyone is welcome to build .deb packages for testing before we get to that in the next few weeks.
The following user(s) said Thank You: ArcEye

Please Log in or Create an account to join the conversation.

More
06 Sep 2014 09:50 #50828 by Todd Zuercher
This is good to hear.

Don't know If I'll have time to try it out on anything real soon.

Please Log in or Create an account to join the conversation.

More
06 Sep 2014 15:23 #50837 by ArcEye
Thanks

I have built the repo on an amd64 machine and built Linuxcnc against it.

I'll do another pull and hopefully next week I can try on an i386

regards

Please Log in or Create an account to join the conversation.

More
11 Sep 2014 21:37 #51086 by rythmnbls
Tested on a core i5, working just fine. I haven't played with isolcpus yet I'll get to it soon
[  134.110208] I-pipe: head domain RTAI registered.
[  134.110213] RTAI[hal]: compiled with gcc version 4.8.1 (GCC for Cross-LFS 4.8.1.20131001) .
[  134.113304] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[  134.113307] SYSINFO: CPUs 4, LINUX APIC IRQ 4353, TIM_FREQ 8312879, CLK_FREQ 2660018000, CPU_FREQ 2660018000
[  134.113309] RTAI_APIC_TIMER_IPI: RTAI DEFINED 4354, VECTOR 4355; LINUX_APIC_TIMER_IPI: RTAI DEFINED 4353, VECTOR 4353
[  134.113311] TIMER NAME: lapic; VARIOUSLY FOUND APIC FREQs: 8312879, 8312879, 8312000
[  134.117048] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[  134.119294] , kstacks pool size = 524288 bytes.
[  134.119296] RTAI[sched]: hard timer type/freq = APIC/8312879(Hz); default timing: oneshot; linear timed lists.
[  134.119302] RTAI[sched]: Linux timer freq = 1000 (Hz), TimeBase freq = 2660018000 hz.
[  134.119305] RTAI[sched]: timer setup = 120 ns, resched latency = 3823 ns.
[  134.136795] RTAI[math]: loaded.

Thanks.

Please Log in or Create an account to join the conversation.

More
11 Sep 2014 22:39 #51090 by Bari
With the latest scheduler in that tree you shouldn't have to be concerned with having to use isolcpus. Let us know if you see much difference if you try setting isolcpus.
The following user(s) said Thank You: rythmnbls

Please Log in or Create an account to join the conversation.

More
11 Sep 2014 23:35 #51094 by rythmnbls

With the latest scheduler in that tree you shouldn't have to be concerned with having to use isolcpus. Let us know if you see much difference if you try setting isolcpus.


I removed isolcpus from grub and from the rtai_hal modprobe.conf entry and the latency tests are about the same. Very nice, one less thing to worry about.

Thanks.

Please Log in or Create an account to join the conversation.

More
12 Sep 2014 21:17 - 12 Sep 2014 21:20 #51120 by ArcEye
Hi

I have now attempted to build against an x86 installation ( the wheezy distro with 3.4.9-rtai kernel, because that was what was easily available)

Had an error compiling hal_32.c
make[4]: Nothing to be done for `all'.
make -C /usr/src/linux-headers-3.4-9-rtai-686-pae \
KBUILD_SRC=/usr/src/linux-headers-3.4-9-common-rtai \
KBUILD_EXTMOD="/usr/src/RTAI/base/arch/x86/hal" -f /usr/src/linux-headers-3.4-9-common-rtai/Makefile \
modules
  CC [M]  /usr/src/RTAI/base/arch/x86/hal/hal_32.o
/usr/src/RTAI/base/arch/x86/hal/hal_32.c:1574:1: error: duplicate ‘static’
/usr/src/RTAI/base/arch/x86/hal/hal_32.c:1574:12: error: two or more data types in declaration specifiers
/usr/src/RTAI/base/arch/x86/hal/hal_32.c:1575:1: warning: parameter names (without types) in function declaration [enabled by default]
/usr/src/RTAI/base/arch/x86/hal/hal_32.c:1574:12: error: ‘rtai_read_proc’ declared as function returning a function
/usr/src/RTAI/base/arch/x86/hal/hal_32.c:1632:1: warning: data definition has no type or storage class [enabled by default]
/usr/src/RTAI/base/arch/x86/hal/hal_32.c:1632:1: warning: type defaults to ‘int’ in declaration of ‘PROC_READ_OPEN_OPS’ [-Wimplicit-int]
/usr/src/RTAI/base/arch/x86/hal/hal_32.c:1632:1: warning: parameter names (without types) in function declaration [enabled by default]
/usr/src/RTAI/base/arch/x86/hal/hal_32.c: In function ‘rtai_proc_register’:
/usr/src/RTAI/base/arch/x86/hal/hal_32.c:1638:61: error: ‘rtai_hal_proc_fops’ undeclared (first use in this function)
/usr/src/RTAI/base/arch/x86/hal/hal_32.c:1638:61: note: each undeclared identifier is reported only once for each function it appears in
make[10]: *** [/usr/src/RTAI/base/arch/x86/hal/hal_32.o] Error 1
make[9]: *** [_module_/usr/src/RTAI/base/arch/x86/hal] Error 2
make[8]: *** [sub-make] Error 2
make[7]: *** [all] Error 2
make[6]: *** [rtai_hal.ko] Error 2
make[5]: *** [rtai_hal.ko] Error 2
make[4]: *** [rtai_sched.ko] Error 2
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

I only really looked at the first error

That appears to be because the macro #define of PROC_READ_FUN is
#else /* LINUX_VERSION_CODE <= KERNEL_VERSION(3,10,0) */

#define PROC_READ_FUN \
		static int rtai_read_proc (char *page, char **start, off_t off, int count, int *eof, void *data)

but the usage in hal_32.c is
static int PROC_READ_FUN(rtai_read_proc)

hence the 'error duplicate static'
and 'error: two or more data types in declaration specifiers'

The #define macro is without the static int prepend for kernels > 3.10 so it probably worked fine with a later kernel

regards
Last edit: 12 Sep 2014 21:20 by ArcEye.

Please Log in or Create an account to join the conversation.

More
12 Sep 2014 21:45 #51122 by Bari
Little effort was made to include 3.4. If you care to do so, we will be happy to merge it into the new tree.

Please Log in or Create an account to join the conversation.

More
12 Sep 2014 23:15 #51125 by ArcEye

Little effort was made to include 3.4. If you care to do so, we will be happy to merge it into the new tree.


Not much point, there is a perfectly good rtai with that kernel already.

What kernel version does support start at? ( I think OTTOMH there are just 3.10 and 3.14 in the patches)

I think I built 3.8.13-rtai-amd64 OK against the earlier pull

regards

Please Log in or Create an account to join the conversation.

More
11 Nov 2014 12:11 - 11 Nov 2014 12:12 #53006 by accuartisans
I have a few questions, I have successfully built a linux kernel 3.14 RTAI kernel running on Debian "Jessie" 64bit. I built linuxcnc with a fresh git pull on the master branch but it did not build hm2_eth library in the rtlib folder. Can someone point me to what I need to change to get this to build?

The only other problem I have is the latency-test numbers look weird, but found the thread were it was a kernel config issue so, I'll try that tomorrow evening, however linuxcnc does not complain at all, in fact it runs better than I have ever had it run on the Gigabyte J1800 motherboard.

It's been a while since I've gotten to work on my machine as I've been out of pocket for the last 6 months due to work load. Hopefully, that won't get in the way for a while. I finally gave up on the Xenomai kernel as I could never get the RTNet drivers to work.
Last edit: 11 Nov 2014 12:12 by accuartisans. Reason: Changed OS flavor

Please Log in or Create an account to join the conversation.

Time to create page: 0.166 seconds
Powered by Kunena Forum