32bit and 64bit Linux-3.14 RTAI Now Working
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.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Away
- Platinum Member
-
- Posts: 5000
- Thank you received: 1409
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.
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.
[ 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.
Please Log in or Create an account to join the conversation.
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.
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
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
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.
- accuartisans
- Offline
- New Member
-
- Posts: 10
- Thank you received: 0
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.
Please Log in or Create an account to join the conversation.