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

More
21 Oct 2014 14:44 #52230 by cncbasher
also check the following it may help
the rtai source used in the wheesy hybrid iso is github.com/SebKuzminsky/rtai/tree/old-3.9-debs
and the kernel was built using github.com/SebKuzminsky/linux-rtai-build
it is complicated but the readme should help you

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

More
21 Oct 2014 14:51 #52232 by ArcEye

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?


That is a very minimalist config and excludes some quite important things.

I thought you would just use the config that was used to build the original kernel and modify it from there
ie /boot/config-3.4.9-rtai686-pae

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

More
22 Oct 2014 21:49 - 22 Oct 2014 21:51 #52277 by ww34ww34
This is my steps.
cd /usr/src
wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.8.13.tar.gz
tar xf linux-3.8.13.tar.gz
ln -sfv linux-3.8.13 linux
cd linux
make mrproper

git clone https://github.com/SebKuzminsky/rtai/ /usr/src/rtai
cd /usr/src/rtai
git checkout old-3.9-debs
cp -prvL /usr/src/rtai/base/arch/x86/patches/hal-linux-3.8.13-x86-1.patch /usr/src/
patch -p1 < ../hal-linux-3.8.13-x86-1.patch
cp -prvL /usr/src/rtai/base/arch/x86/configs/rtai_32_defconfig /usr/src/linux/.config

make menuconfig
make -j$(cat /proc/cpuinfo | grep processor | wc -l)
make modules_install install

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

I can't understand what i'm doing wrong.

I'm also seraching 2.4.9 patch as debian wheeazy....but i can't find it.
:S :S :(
Last edit: 22 Oct 2014 21:51 by ww34ww34.

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

More
22 Oct 2014 23:10 #52282 by ArcEye

wget www.kernel.org/pub/linux/kernel/v3.x/linux-3.8.13.tar.gz


You are using the 3.8.13 kernel, not the 3.4.55/3.4.9 one Seb used

I have actually had a lot of trouble with that kernel, it built as x86 on one computer and amd64 on another, but completely failed to run on a third computer which quite happily ran 3.4.55 and 3.5.7.

If you are not using the same kernel, I don't really see the point in using any of his stuff at all.

I thought the idea was to optimise the same kernel for Intel Atom, whilst using the provided realtime etc from the distro.

If you want to go away from that, you might be better off using the RTAI at github.com/NTULINUX/RTAI and building the 3.14.7-rtai kernel with the patch and def_config in that.
Probably best to build the amd64 version, not sure he is supporting x86, even if there is a def there for it, it (RTAI) would not build when I last tried it due to definition failures.

regards

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

More
22 Oct 2014 23:21 #52283 by ww34ww34
Sorry ArcEye.
My mistake.
I do a lot of confusion with version.
Now i'm going to try
cd /usr/src
wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.4.55.tar.gz
tar xf linux-3.4.55.tar.gz
ln -sfv linux-3.4.55 linux
cd linux
make mrproper

git clone https://github.com/SebKuzminsky/rtai/ /usr/src/rtai
cd /usr/src/rtai
git checkout old-3.9-debs
cp -prvL /usr/src/rtai/base/arch/x86/patches/hal-linux-3.4.55-x86-1.patch /usr/src/
patch -p1 < ../hal-linux-3.4.55-x86-1.patch
cp -prvL /usr/src/rtai/base/arch/x86/configs/rtai_32_defconfig /usr/src/linux/.config
...
or eventually
cp -prvL /boot/config-3.4-9-rtai-686-pae /usr/src/linux/.config
...

Do you think is the right way?

regards

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

More
22 Oct 2014 23:28 #52284 by ArcEye

cd /usr/src/rtai
git checkout old-3.9-debs
cp -prvL /usr/src/rtai/base/arch/x86/patches/hal-linux-3.4.55-x86-1.patch /usr/src/
patch -p1 < ../hal-linux-3.4.55-x86-1.patch


So long as you cd back to /usr/src/linux before you apply the patch or you are patching RTAI with the kernel patch, not the kernel :laugh:

And yes I would try Sebs finished config, it certainly has a fuller set of features and modules etc

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

More
22 Oct 2014 23:50 #52287 by ww34ww34
Sorry again.
bad copy and paste
git clone https://github.com/SebKuzminsky/rtai/ /usr/src/rtai
cd /usr/src/rtai
git checkout old-3.9-debs
cp -prvL /usr/src/rtai/base/arch/x86/patches/hal-linux-3.4.55-x86-1.patch /usr/src/
cd /usr/src/linux
patch -p1 < ../hal-linux-3.4.55-x86-1.patch
cp -prvL /usr/src/rtai/base/arch/x86/configs/rtai_32_defconfig /usr/src/linux/.config

better? :laugh:

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

More
23 Oct 2014 01:13 #52296 by ww34ww34
:pinch:
I miss something...same issue.
unable to mount root fs on unknown-block(0 0)

what i can try to fix it?
I really have no idea.

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

More
23 Oct 2014 23:55 #52337 by ArcEye
Hi

Do a google search on that error and you will get a lot of hits

Main causes that are solved are the initramfs needs rebuilding and then run update-grub, or the /boot directory too full.

Check out the results and see if any fit yours

regards

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

More
24 Oct 2014 15:44 #52349 by ww34ww34
Thanks ArcEye for all the answers.
I'm going crazy.
I have tre option.
1)Wrong config file.
2)Wrong grub config file.
3)both wrong

I'm trying to recompile (whithout modification) the exact kernel that i running on my machine.
I have installed linuxcnc debian wheazy. Kernel version 3.4.9
I explore the build makefile (thanks cncbasher) of github.com/SebKuzminsky/linux-rtai-build .
I use 3.4.55 kernel and github.com/SebKuzminsky/rtai/tree/old-3....x-3.4.55-x86-1.patch

the first time I select
github.com/SebKuzminsky/rtai/tree/old-3....gs/rtai_32_defconfig whitout ANY MODIFY.
but on different virtual machine i have the same issue.
I googled a lot.
1)initramfs fix not work.
2)/boot directory is on the same partition and the hard disk is almost empty. No luck for me.
the log of error say thath i can't mount root partiton.( i attached a screen).


then i use /boot/confing-3.4.9-rtai-686-pae because i want to try the SAME config of debian.hybrid.iso...
but when the compiling goes wrong. Here the message:

WARNING: modpost: Found 10 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'

So i'm thinking...what are che right config file ???? Why whith the same kernel-path-config on iso i can't compile?

Now i can try now to manage rtai_32_defconfig. But what value to change ?
or i can try to force compilation of second config with CONFIG_DEBUG_SECTION_MISMATCH=y.
But i think is really ugly.

Any suggestion?

regards
Attachments:

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

Time to create page: 0.354 seconds
Powered by Kunena Forum