LinuxCNC from source - RIP Environment problems
29 Dec 2013 23:38 #42158
by birchy
Replied by birchy on topic LinuxCNC from source - RIP Environment problems
It's never a wasted day, it's just a day of learning...
Thanks for the links. I hadn't seen Seb's website previously. I'll try his 3.4.55 kernel and headers and see how it performs on my PC. Then I should be able to get LinuxCNC via git. Well that's the theory...
Thanks for the links. I hadn't seen Seb's website previously. I'll try his 3.4.55 kernel and headers and see how it performs on my PC. Then I should be able to get LinuxCNC via git. Well that's the theory...
Please Log in or Create an account to join the conversation.
07 Jan 2014 06:56 - 07 Jan 2014 07:14 #42411
by birchy
Have you had any luck with the kernel? I've been trying Seb's kernels but can only get his latest 3.4.55 (December 2013) to work. The others install OK but go into kernel panic at boot-up.
The 3.4.55-rtai-2-3 kernel installs fine, as does LinuxCNC using the git Master (and I've written some nice Bash scripts to auto-install both of these, including dependencies), however I get some nasty 6 figured latency spikes when launching IceWeasel. I didn't get these spikes when using your kernel or the Ubuntu 8.04 version so assume it is related to the power management which is disabled on those but not in Seb's...
Failing that, are there any other rtai kernels available with power management disabled?
Replied by birchy on topic LinuxCNC from source - RIP Environment problems
Let you know when they can be downloaded ( I will have to test them on yet another partition first! )
Have you had any luck with the kernel? I've been trying Seb's kernels but can only get his latest 3.4.55 (December 2013) to work. The others install OK but go into kernel panic at boot-up.
The 3.4.55-rtai-2-3 kernel installs fine, as does LinuxCNC using the git Master (and I've written some nice Bash scripts to auto-install both of these, including dependencies), however I get some nasty 6 figured latency spikes when launching IceWeasel. I didn't get these spikes when using your kernel or the Ubuntu 8.04 version so assume it is related to the power management which is disabled on those but not in Seb's...
Failing that, are there any other rtai kernels available with power management disabled?
Last edit: 07 Jan 2014 07:14 by birchy. Reason: Smelliing Pistakes
Please Log in or Create an account to join the conversation.
07 Jan 2014 15:21 #42427
by ArcEye
Replied by ArcEye on topic LinuxCNC from source - RIP Environment problems
Hi
Yes I rebuilt and everything works fine. I have not tried rebuilding the headers however, lack of time.
In the 'Give man a fish and feed him for a day, teach him to fish and feed him for life...' spirit, I will do a quick resume of building rtai kernel, realtime and linxcnc, later today.
I will also post a working kernel config and a rtai kernel patch that works, because I had trouble with the later one.
The procedure is basically the same as in the link I posted earlier, a bit time consuming but worthwhile.
regards
Yes I rebuilt and everything works fine. I have not tried rebuilding the headers however, lack of time.
In the 'Give man a fish and feed him for a day, teach him to fish and feed him for life...' spirit, I will do a quick resume of building rtai kernel, realtime and linxcnc, later today.
I will also post a working kernel config and a rtai kernel patch that works, because I had trouble with the later one.
The procedure is basically the same as in the link I posted earlier, a bit time consuming but worthwhile.
regards
Please Log in or Create an account to join the conversation.
07 Jan 2014 18:35 - 08 Jan 2014 16:35 #42430
by ArcEye
Replied by ArcEye on topic LinuxCNC from source - RIP Environment problems
Hi
Right try to make it brief as poss
Ensure you have the right gcc version, you can use 4.4 or 4.6 but not 4.7
wget www.kernel.org/pub/linux/kernel/v3.x/linux-3.5.7.tar.bz2
unzip and place in /usr/src
make symlink called linux to linux-3.5.7
Copy attached patch to /usr/src
patch from root of linux-3.5.7
patch -p1 < ../hal-linux-3.5.7-x86-3.patch
Download attached config and rename to linux/.config
From /usr/src/linux run make menuconfig
In 'Processor type and features' change the number of CPUs to suit, then exit and say yes to saving
make
make modules_install
Copy System.map to /boot/System.map-3.5.7-rtai
Copy .config to /boot/config-3.5.7-rtai
Copy arch/x86/boot/bzimage to /boot/vmlinuz-3.5.7-rtai
Run update-initramfs -c -k 3.5.7-rtai
Run update-grub and then reboot into the new kernel
Now download realtime that works
www.mgware.co.uk/debian/RTAI-works-3.5.7-rtai-patch3.tar.gz
unzip into /usr/src
From root dir of RTAI run ./autogen.sh
Now make menuconfig
In 'Machine' set the number of CPUs (same as kernel)
In 'Base system -> Other features' check the Mathsfuns in kernel and C99 support are set
The exit and save
configure will run again
make
make install
You should then have a dir called /usr/realtime with all the rt modules in /modules
Now you build linuxcnc as you previously have done
Just make sure you use the master and preferably one with the ubc-3 branch checked out
I am sure there will be questions, this is all off the top of my head, but I have done it ad nauseum recently so it should be OK
regards
Right try to make it brief as poss
Ensure you have the right gcc version, you can use 4.4 or 4.6 but not 4.7
wget www.kernel.org/pub/linux/kernel/v3.x/linux-3.5.7.tar.bz2
unzip and place in /usr/src
make symlink called linux to linux-3.5.7
Copy attached patch to /usr/src
patch from root of linux-3.5.7
patch -p1 < ../hal-linux-3.5.7-x86-3.patch
Download attached config and rename to linux/.config
From /usr/src/linux run make menuconfig
In 'Processor type and features' change the number of CPUs to suit, then exit and say yes to saving
make
make modules_install
Copy System.map to /boot/System.map-3.5.7-rtai
Copy .config to /boot/config-3.5.7-rtai
Copy arch/x86/boot/bzimage to /boot/vmlinuz-3.5.7-rtai
Run update-initramfs -c -k 3.5.7-rtai
Run update-grub and then reboot into the new kernel
Now download realtime that works
www.mgware.co.uk/debian/RTAI-works-3.5.7-rtai-patch3.tar.gz
unzip into /usr/src
From root dir of RTAI run ./autogen.sh
Now make menuconfig
In 'Machine' set the number of CPUs (same as kernel)
In 'Base system -> Other features' check the Mathsfuns in kernel and C99 support are set
The exit and save
configure will run again
make
make install
You should then have a dir called /usr/realtime with all the rt modules in /modules
Now you build linuxcnc as you previously have done
Just make sure you use the master and preferably one with the ubc-3 branch checked out
I am sure there will be questions, this is all off the top of my head, but I have done it ad nauseum recently so it should be OK
regards
Last edit: 08 Jan 2014 16:35 by ArcEye.
The following user(s) said Thank You: birchy
Please Log in or Create an account to join the conversation.
08 Jan 2014 01:02 #42446
by birchy
Replied by birchy on topic LinuxCNC from source - RIP Environment problems
Thanks Mick. I'll have a play with this over the next few days. Hopefully I'll end up with some bash scripts I can just "click and go". And if they're any good, I'll share them with the community.
Please Log in or Create an account to join the conversation.
08 Jan 2014 01:35 #42448
by birchy
Replied by birchy on topic LinuxCNC from source - RIP Environment problems
So which headers should I use? Your original one?I have not tried rebuilding the headers however, lack of time.
Please Log in or Create an account to join the conversation.
08 Jan 2014 03:18 #42454
by ArcEye
You don't need headers, you will have the full sources from the kernel
Just follow the plan, Stan
Replied by ArcEye on topic LinuxCNC from source - RIP Environment problems
So which headers should I use? Your original one?I have not tried rebuilding the headers however, lack of time.
You don't need headers, you will have the full sources from the kernel
Just follow the plan, Stan
Please Log in or Create an account to join the conversation.
08 Jan 2014 08:27 #42470
by birchy
Replied by birchy on topic LinuxCNC from source - RIP Environment problems
OK....Ollie...time for plan B...
"make modules_install" complains that module support is disabled. I see the option in "make menuconfig" but can't enable it.
It was going so well...
"make modules_install" complains that module support is disabled. I see the option in "make menuconfig" but can't enable it.
It was going so well...
Please Log in or Create an account to join the conversation.
08 Jan 2014 16:40 #42480
by ArcEye
Replied by ArcEye on topic LinuxCNC from source - RIP Environment problems
Mea Culpa
I was rushing and posted the RTAI config file instead of the kernel one
Run make clean, the kernel will remain patched, so no need to do it again.
copy the rtai-kernel-config.txt posted to /usr/src/linux/.config
run make menuconfig and change number of cpus as previous then make and make modules_install and you are back on track
You will need to do it all from a root terminal or use sudo when commands get rejected (probably about the update-initramfs stage)
regards
I was rushing and posted the RTAI config file instead of the kernel one
Run make clean, the kernel will remain patched, so no need to do it again.
copy the rtai-kernel-config.txt posted to /usr/src/linux/.config
run make menuconfig and change number of cpus as previous then make and make modules_install and you are back on track
You will need to do it all from a root terminal or use sudo when commands get rejected (probably about the update-initramfs stage)
regards
Please Log in or Create an account to join the conversation.
09 Jan 2014 05:26 - 09 Jan 2014 05:27 #42529
by birchy
Replied by birchy on topic LinuxCNC from source - RIP Environment problems
Bugger my luck, the kernel has installed and booted OK, however the 'make' command in RTAI throws the attached output. Autogen and 'make menuconfig' appear to run fine. Could this be due to me setting the cpu in kernel menuconfig as AMD K8 (default was Pentium Pro) and cpus = 1? That config is correct for my hardware, but I'm wondering if you've got other configs setup for Intel?
Is this missing deps or have I made some other cock up?
Is this missing deps or have I made some other cock up?
Making all in base
Making all in include
Making all in asm-x86
make[4]: Nothing to be done for `all'.
make[4]: Nothing to be done for `all-am'.
Making all in malloc
make[3]: Nothing to be done for `all'.
Making all in sched
Making all in liblxrt
CC services.lo
CC touchall.lo
CCLD liblxrt.la
CC [M] /usr/src/RTAI/base/arch/x86/hal/hal.o
CC [M] /usr/src/RTAI/base/arch/x86/hal/hal_x86.o
/usr/src/RTAI/base/arch/x86/hal/hal_x86.c: In function ‘rt_eoi_irq’:
/usr/src/RTAI/base/arch/x86/hal/hal_x86.c:410:25: error: ‘struct irq_chip’ has no member named ‘irq_end’
/usr/src/RTAI/base/arch/x86/hal/hal_x86.c: In function ‘__rtai_hal_init’:
/usr/src/RTAI/base/arch/x86/hal/hal_x86.c:1530:1: error: implicit declaration of function ‘ipipe_apic_vector_irq’ [-Werror=implicit-function-declaration]
/usr/src/RTAI/base/arch/x86/hal/hal_x86.c:1531:1: error: implicit declaration of function ‘hal_request_apic_freq’ [-Werror=implicit-function-declaration]
/usr/src/RTAI/base/arch/x86/hal/hal_x86.c:1531:1: error: implicit declaration of function ‘apic_read’ [-Werror=implicit-function-declaration]
/usr/src/RTAI/base/arch/x86/hal/hal_x86.c:1531:1: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘int’ [-Wformat]
/usr/src/RTAI/base/arch/x86/hal/hal_x86.c:1531:1: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘int’ [-Wformat]
cc1: some warnings being treated as errors
make[8]: *** [/usr/src/RTAI/base/arch/x86/hal/hal_x86.o] Error 1
make[7]: *** [_module_/usr/src/RTAI/base/arch/x86/hal] 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
root@linuxcnc:/usr/src/RTAI#
Last edit: 09 Jan 2014 05:27 by birchy.
Please Log in or Create an account to join the conversation.
Time to create page: 0.092 seconds