Compile RTAI kernel 3.4-9-rtai-686 on deb.wheezy

More
18 Oct 2014 00:55 #52162 by ww34ww34
:)
Hi all,
I'm a new fan of linuxcnc. I'm experiment some feature and i am enthusiastic.
For now I'm trying to re-compile RTAI kernel for optimize it for atom CPU.
Someone can tell me what RTAI version do you use for the hybrid-cd debian wheezy at version of linuxcnc 2.6.3, and what kernel version do you use ?
I wanna try to use the /boot/config-3.4-9-rtai-686-pae for the base of recompiling.
I desire to become an active user in this community.
If i have success I can try to write a guide for the community ( I haven't found it for wheezy).
All suggestion are well accepted.
Thanks

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

More
18 Oct 2014 17:19 - 18 Oct 2014 19:33 #52167 by ArcEye
Hi

The sources etc are on Sebs github repos
github.com/SebKuzminsky?tab=repositories

primarily
github.com/SebKuzminsky/rtai
and
github.com/SebKuzminsky/linux-rtai-debian

His kernel processor type is set for CONFIG_M686. I have not previously found any advantage using the CONFIG_MATOM processor type, but by all means try it out.

It is also has CONFIG_SMP set.
The best latency increase will come from using isolcpus = 1 on the kernel boot line (assuming you have a twin core Atom)

If you have an old single core Atom, it may well run better built as a UP kernel, but you will need to ensure that the appropriate LAPIC switches are enabled or rtai will not build against it.

good luck
Last edit: 18 Oct 2014 19:33 by ArcEye. Reason: Dislexsia - for ACPI read LAPIC
The following user(s) said Thank You: ww34ww34

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

More
18 Oct 2014 20:46 #52169 by ww34ww34
Here I've found the compatible kernel here
github.com/ShabbyX/RTAI/tree/master/base/arch/x86/patches
Any suggestion on the right chose for stablest kernel?
The two option for CPU is Atom dual-core /quad-core
(i have attached a pdf )

Kernel must be patched with some debian-specific patch?
github.com/SebKuzminsky/linux-rtai-debian
Attachments:

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

More
18 Oct 2014 21:34 #52172 by ArcEye

Here I've found the compatible kernel here
github.com/ShabbyX/RTAI/tree/master/base/arch/x86/patches
Any suggestion on the right chose for stablest kernel?
The two option for CPU is Atom dual-core /quad-core
(i have attached a pdf )


It is a 3.4.55 kernel basically, so I expect
github.com/ShabbyX/RTAI/blob/master/base...x-3.4.87-x86-4.patch

Kernel must be patched with some debian-specific patch?
github.com/SebKuzminsky/linux-rtai-debian


At this point I diverge from the way Seb built. He is doing a debian package build and I just build from sources.

All you need is the RTAI patch for the kernel and a RTAI config to build it

If you want to build with kpkg or whatever, you may have to scour his repos further or ask him what other patches were applied to the base kernel

regards

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

More
18 Oct 2014 21:36 - 19 Oct 2014 20:50 #52173 by ArcEye
PS

The only important thing about the number of kernels your processor has, is that you set that number in BOTH the kernel config and the RTAI config.

The RTAI will fail to load if you have more cores than the RTAI config it was built with.
Last edit: 19 Oct 2014 20:50 by ArcEye.

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

More
20 Oct 2014 22:03 - 20 Oct 2014 22:24 #52208 by ww34ww34
I used
github.com/ShabbyX/RTAI/blob/master/base...x-3.4.87-x86-4.patch
with kernel
www.kernel.org/pub/linux/kernel/v3.x/linux-3.4.87.tar.gz

I follow this iscruction
github.com/ShabbyX/RTAI/blob/master/README.INSTALL

ALL GOES RIGHT.

But at step 5:

Update your boot loader. If you are an experienced GRUB user, it is recommended to
modify the grub.cfg or menu.lst file by hand, to remove unncessary bloat from the file,
as grub2-mkconfig -o /boot/grub2/grub.cfg (or whatever you use to automatically generate it)
can cause serious pollution and in rare cases, impact RTAI performance.

Depending on your Linux distribution, one of these commands would do it for you:

# grub2-mkconfig -o /boot/grub2/grub.cfg
# grub2-mkconfig -o /boot/grub/grub.cfg
# update-grub


after rebooting grub show my new kernel .After the selection i have this issue

kernel panic - not syncing vfs unable to mount root fs on unknown-block(0 0)


Do you think is something related grub2 configuration or new kernel?
Last edit: 20 Oct 2014 22:24 by ww34ww34.

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

More
20 Oct 2014 22:53 #52211 by ArcEye

Depending on your Linux distribution, one of these commands would do it for you:

# grub2-mkconfig -o /boot/grub2/grub.cfg
# grub2-mkconfig -o /boot/grub/grub.cfg
# update-grub


So which did you use?

kernel panic - not syncing vfs unable to mount root fs on unknown-block(0 0)

Do you think is something related grub2 configuration or new kernel?


Can you attach your /boot/grub/grub.cfg file as grub.cfg.txt so I can have a look at it.

regards

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

More
20 Oct 2014 23:20 - 20 Oct 2014 23:21 #52215 by ww34ww34
I use
grub-mkconfig -o /boot/grub/grub.cfg
Attachments:
Last edit: 20 Oct 2014 23:21 by ww34ww34.

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

More
20 Oct 2014 23:36 #52217 by ArcEye
The grub.cfg looks OK

I would try rebuilding the initrd.img

delete the old one and use
update-initramfs -c -k 3.4.87-RTAI

Then try a reboot

If that fails, I would build an unpatched version of the kernel, check that builds and runs OK on your machine, then incrementally bring back the changes until it fails again.

Depending exactly what kernel config you have used, you may have unintentionally knocked out something.

It can be a very frustrating process.

I have not built that kernel, but I know the RTAI builds OK, I have used that to produce some extra modules

regards

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

More
21 Oct 2014 04:39 #52225 by ww34ww34
no luck with

update-initramfs -c -k 3.4.87-RTAI


The config file is "untouched".
I basically use this
https://github.com/ShabbyX/RTAI/blob/master/base/arch/x86/configs/rtai_32_defconfig

It's wrong choice?

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

Time to create page: 0.089 seconds
Powered by Kunena Forum