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

More
24 Oct 2014 16:32 #52350 by cncbasher
are you building with root permissions ?
does the user have root permission etc

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

More
24 Oct 2014 16:36 #52351 by cncbasher
i will be looking at this over the next few days all being well
i presume your building on a virtual system by the comments you made
am i correct ?
and that your building on the wheezy hybrid.iso ?

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

More
24 Oct 2014 19:43 #52356 by ww34ww34

are you building with root permissions ?
does the user have root permission etc

yes

i will be looking at this over the next few days all being well
i presume your building on a virtual system by the comments you made
am i correct ?
and that your building on the wheezy hybrid.iso ?


Yes i have two virtual machine
1)wheezy hybrid.iso
2) fresh install debian wheezy

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

More
24 Oct 2014 22:22 #52357 by ww34ww34

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

More
25 Oct 2014 21:28 - 26 Oct 2014 13:58 #52388 by ArcEye
Hi

Now had time to build the kernel and test it, don't know why you are having problems.

1) fetch kernel-3.4.55 from kernel.org to /usr/src/linux-3.4.55

1a) clone rtai
cd /usr/src && git clone github.com/SebKuzminsky/rtai RTAI && cd RTAI && git checkout old-3.9-debs

2) create symlink to kernel sources /usr/src/linux-3.4.55 at /usr/src/~linux

3) patch kernel with RTAI/base/arch/x86/patches/hal-linux-3.4.55-x86-1.patch

4) copy config-3.4-9.rtai-686-pae to /usr/src/linux/.config

5) make menuconfig and set local version suffix to -rtai and processor cores to match

6) make -jN && make modules_install && make install

7) discard the rubbish that GRUB produces and simply have an entry that reads similar to this with disc numbers and UUIDs amended to suit in /boot/grub/grub.cfg
menuentry "sda3 3.4.55-rtai" --class gnu-linux --class gnu --class os {
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos3)'
    search --no-floppy --fs-uuid --set=root 135dd1b1-0c8b-46f5-9748-94eb75c21eae
    linux /boot/vmlinuz-3.4.55-rtai root=UUID=135dd1b1-0c8b-46f5-9748-94eb75c21eae
    initrd /boot/initrd.img-3.4.55-rtai
}

Reboot and select kernel 3.4.55-rtai

8) cd /usr/src/RTAI && ./autogen.sh && ,/configure && make menuconfig

Select correct number of cores, enable C99 support

9) make && make install

10) Fetch the latest version of the master
git clone git://git.linuxcnc.org/git/linuxcnc.git linuxcnc-dev

11) Build it
cd /usr/src/linuxcnc-dev/src && ./autogen.sh && ./configure && make && make setuid && cd ../ && . ./scripts/rip-enviroment && linuxcnc

result




regards
Attachments:
Last edit: 26 Oct 2014 13:58 by ArcEye.
The following user(s) said Thank You: ww34ww34

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

More
26 Oct 2014 18:37 #52403 by ArcEye
I have now combined all the sources, configs, patch etc with build instructions in a github repo

git clone github.com/ArcEye/3.4.55-rtai.git

will clone to your current directory

regards

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

More
27 Oct 2014 15:23 #52420 by ww34ww34
WOW. What a wonderful job.

I understand my mistake.

I mixed a lot and when i use 3.4.55 i use the wrong config.

config-3.4-9.rtai-686-pae work for me too.

I suppose you use a linuxcnc debian iso.
But i'm trying to use a fresh debian iso.
The only difference is the dependency package to install but all goes right.
But in the last step:
cd /usr/src/linuxcnc-dev/src && ./autogen.sh && ./configure && make && make setuid && cd ../ && . ./scripts/rip-enviroment && linuxcnc

The make give me a issue.
make[1]: Leaving directory `/usr/src/linux-3.4.55'
/usr/src/linuxcnc-dev/src/emc/kinematics/5axiskins.c: In function ‘s2r’:
/usr/src/linuxcnc-dev/src/emc/kinematics/5axiskins.c:32:18: error: SSE register return with SSE disabled
make[2]: *** [/usr/src/linuxcnc-dev/src/emc/kinematics/5axiskins.o] Error 1
make[1]: *** [_module_/usr/src/linuxcnc-dev/src] Error 2
make: *** [modules] Error 2
make: Leaving directory `/usr/src/linuxcnc-dev/src'

N.B.
I set thelocal version suffix to -ww34ww34, just for fun. Maybe this hurt the compile process?

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

More
27 Oct 2014 16:27 - 27 Oct 2014 17:41 #52423 by ArcEye
Hi

This is what you said you were doing

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.


My repo is for modifying the debian.hybrid.iso distro install as you indicated, but you seem to be doing something else now.

The error you are getting is related to RTAI.
The only thing that comes to mind immediately is that you forgot to checkout the old-3.9-debs branch, the SSE problem was one thing that branch was to avoid.
Or you did not set maths support enabled and C99 enabled in the rtai config

Additionally someone else has reported strange problems, using the same files as I did.
The difference is that I used gcc/g++ 4.6 not the 4.7 which ships with Wheezy.

4.7 is completely flakey, if you look at dmesg for wheezy, you will find that all the stock kernels were built with 4.6
I had lots of problems some while back with a x86 bug in 4.7 and then later again when building Qt5 programs, they simply would not build
All problems disappeared when I reverted back to 4.6

So I would recommend that you install gcc-4.6 cpp-4.6 g++-4.6 and change the symlinks in /usr/bin to ensure that those 4.6 versions are used

regards
Last edit: 27 Oct 2014 17:41 by ArcEye.

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

More
28 Oct 2014 03:09 #52456 by ww34ww34

My repo is for modifying the debian.hybrid.iso distro install as you indicated, but you seem to be doing something else now.


I've done a lot of test. One of this test was made with fresh new install of debian. Now i want to try to build all from shratch.
I really appreciate your help. Is valuable.

I'm doing some test with gcc 4.6.
But when run
./configure
the process stop when check boost::python
checking whether the Boost::Python headers are available... no
configure: error: boost::python is required to build LinuxCNC
but all libs was installed.

here you can check if you want:
dpkg --get-selections

....
]libboost-chrono1.49-dev				install
libboost-chrono1.49.0				install
libboost-date-time1.49-dev			install
libboost-date-time1.49.0			install
libboost-filesystem1.49-dev			install
libboost-filesystem1.49.0			install
libboost-graph-parallel1.49-dev			install
libboost-graph-parallel1.49.0			install
libboost-graph1.49-dev				install
libboost-graph1.49.0				install
libboost-iostreams1.49-dev			install
libboost-iostreams1.49.0			install
libboost-locale1.49-dev				install
libboost-locale1.49.0				install
libboost-math1.49-dev				install
libboost-math1.49.0				install
libboost-mpi1.49-dev				install
libboost-mpi1.49.0				install
libboost-program-options1.49-dev		install
libboost-program-options1.49.0			install
libboost-python-dev				install
libboost-python1.49-dev				install
libboost-python1.49.0				install
libboost-random1.49-dev				install
libboost-random1.49.0				install
libboost-regex1.49-dev				install
libboost-regex1.49.0				install
libboost-serialization1.49-dev			install
libboost-serialization1.49.0			install
libboost-signals1.49-dev			install
libboost-signals1.49.0				install
libboost-system1.49-dev				install
libboost-system1.49.0				install
libboost-test1.49-dev				install
libboost-test1.49.0				install
libboost-thread1.49-dev				install
libboost-thread1.49.0				install
libboost-timer1.49-dev				install
libboost-timer1.49.0				install
libboost-wave1.49-dev				install
libboost-wave1.49.0				install
libboost1.49-dev				install
libboost1.49-doc				install
...

I try the same ./configure with gcc 4.7...no problem at all.
But fail when run
make
step.

Or you did not set maths support enabled and C99 enabled in the rtai config


I enabled c99 but i don't now how enable math.

thanks
regards.

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

More
28 Oct 2014 18:19 - 28 Oct 2014 18:21 #52489 by ArcEye
Hi

You are hopping about all over the place here.

The sequence has to be
1) Build rtai kernel then boot it
2) Build realtime against the kernel
3) Build Linuxcnc against realtime

There is no point trying to build Linuxcnc yet, it will fail.

You say you have the right libraries installed, where did you get the list?

You need:
build-essential debhelper kernel-package libpth-dev libgtk2.0-dev tcl8.5-dev tk8.5-dev bwidget python-old-doctools python-tk python-dev libglu1-mesa-dev libgtk2.0-dev libgnomeprintui2.2-dev libncurses5-dev libxaw7-dev gettext 
libreadline-gplv2-dev lyx texlive-extra-utils imagemagick texinfo groff libmodbus-dev
libudev-dev libmodbus-dev libboost-python-dev libboost-serialization-dev libboost-thread-dev libtk-img automake autoconf libtool libusb-dev automake1.11 libtool python-setuptools

Can I just suggest that you just build a new version of the rtai kernel on the debian.hybrid install following my guide, because I know it works.

Then you can depart from it and build whatever takes your fancy

I enabled c99 but i don't now how enable math.


It is the checkbox immediately above C99 in the menuconfig, it probably is set because you don't see the C99 option otherwise AFAIR

regards
Last edit: 28 Oct 2014 18:21 by ArcEye.

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

Time to create page: 0.139 seconds
Powered by Kunena Forum