xenomai user lib build error
hi,
i wanna build xenomai user libs for powerpc 40x (405GP) cpu. The patching (preparing) of the linux kernel (2.6.36.7) works with the adeos patch.
But when i want to build the user libs, i get the error that e.g. linux/errno.h could not be found. linux/errno.h is in /usr/src/linux-2.6.35.7/include/linux/errno.h so it must be a false setup path i think, but i dont know where i should do that?
i configure and build the stuff like the README.INSTALL tells, just with another cross compile prefix
scripts/prepare-kernel.sh --arch=powerpc \
--adeos=$xenomai_root/ksrc/arch/powerpc/patches/adeos-ipipe-2.6.35.7-ppc-1.5-*.patch \
--linux=$linux_tree
cd $linux_tree
make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- O=$build_root menuconfig
[select the kernel and Xenomai options, save the configuration]
make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- O=$build_root uImage [manually install the kernel image, system map and modules to the proper location] cd $build_root
$xenomai_root/configure --host=powerpc-linux-gnu \
CC=powerpc-linux-gnu-gcc LD=powerpc-linux-gnu-ld
make DESTDIR=$staging_dir install
The kernel builds without errors, but the xenomai stuff doesnt find the missing headers like linux/errno.h, but i dont know why?
thanks for help
flo
Signature · 1 line
inflo <[email protected]>
Quoted 8 lines · inflo
hi, i wanna build xenomai user libs for powerpc 40x (405GP) cpu. The patching (preparing) of the linux kernel (2.6.36.7) works with the adeos patch.
But when i want to build the user libs, i get the error that e.g.
linux/errno.hcould not be found.linux/errno.his in/usr/src/linux-2.6.35.7/include/linux/errno.hso it must be a false setup path i think, but i dont know where i should do that?
No, linux/errno.h is supposed to be found in the toolchain installation directory. If it is not installed there, then your toolchain is not correctly installed.
You can check this without trying and compiling Xenomai:
If the following program:
#include <stdio.h>
#include <errno.h>
int main(void)
{
printf("%d\n", EINVAL);
return 0;
}Does not compile correctly with your toolchain, then your toolchain is not correctly installed.
Signature · 1 line
Gilles.
hi,
the code compiles without errors. I got it once compiled, but after replaying what i have done, it wont work again :(
The prepare-kernel.sh script i can call from whereever i am, i mean, i could go to e.g. /tmp and could call
/usr/src/xenomai-2.5.5.2/scripts/prepare-kernel.sh --arch=powerpc --adeos=/usr/src/xenomai-2.5.5.2/ksrc/arch/powerpc/patches/adeos-ipipe-2.6.35.7-ppc-1.5-*.patch --linux=/usr/src/linux-2.6.35.7
then i could go
cd /usr/src/linux-2.6.35.7 and configure and build the kernel from within this directory ? whats with this linux/ shadow copy ?
After building patched kernel, i need to configure xenomai user libs. This is done from whereever i want? i mean, i could go to e.g. /tmp and call
/usr/src/xenomai-2.5.5.2/configure --host=powerpc-linux-gnu and then also call inside this dir
make
to build xenomai libs?
The user libs build fails mostly with the same procedure deleting linux/
copying linux source to linux/
hanging
my cross tools are prefixed with powerpc-linux-gnu- like powerpc-linux-gnu-gcc
thanks for help
flo
Quoted 33 lines · On Mon, 29 Nov 2010 21:29:55 +0100 Gilles Chanteperdrix…
Quoted 8 lines · inflo
hi, i wanna build xenomai user libs for powerpc 40x (405GP) cpu. The patching (preparing) of the linux kernel (2.6.36.7) works with the adeos patch.
But when i want to build the user libs, i get the error that e.g.
linux/errno.hcould not be found.linux/errno.his in/usr/src/linux-2.6.35.7/include/linux/errno.hso it must be a false setup path i think, but i dont know where i should do that?No,
linux/errno.his supposed to be found in the toolchain installation directory. If it is not installed there, then your toolchain is not correctly installed.You can check this without trying and compiling Xenomai:
If the following program:
#include <
stdio.h>
#include <errno.h>int main(void)
{ printf("%d\n", EINVAL); return 0; }Does not compile correctly with your toolchain, then your toolchain is not correctly installed.
Signature · 1 line
Gilles.
Signature · 1 line
inflo <[email protected]>
Quoted 2 lines · inflo
hi, the code compiles without errors. I got it once compiled, but after replaying what i have done, it wont work again :(
Ok. Send me the result of this code compiled with
powerpc-linux-gnu-gcc -E.
Quoted 11 lines
The
prepare-kernel.shscript i can call from whereever i am, i mean, i could go to e.g. /tmp and could call
/usr/src/xenomai-2.5.5.2/scripts/prepare-kernel.sh--arch=powerpc --adeos=/usr/src/xenomai-2.5.5.2/ksrc/arch/powerpc/patches/adeos-ipipe-2.6.35.7-ppc-1.5-*.patch --linux=/usr/src/linux-2.6.35.7then i could go cd
/usr/src/linux-2.6.35.7and configure and build the kernel from within this directory ? whats with this linux/ shadow copy ?
prepare-kernel does not make a shadow copy, it modifies /usr/src/linux-2.6.35.7 in place. So, if you have linux/ it comes from somewhere else.
Quoted 11 lines
After building patched kernel, i need to configure xenomai user libs. This is done from whereever i want? i mean, i could go to e.g. /tmp and call
/usr/src/xenomai-2.5.5.2/configure--host=powerpc-linux-gnu and then also call inside this dirmake
to build xenomai libs?
Yes, you can do that, though I would recommend to do it in something like /tmp/xenomai-build in order to avoid polluting /tmp with the compilation files.
Quoted 6 lines
The user libs build fails mostly with the same procedure deleting linux/ copying linux source to linux/ hanging
my cross tools are prefixed with powerpc-linux-gnu- like powerpc-linux-gnu-gcc
Yes, and this compilation failure probably has other reasons than installation directories names. This is a problem of what Xenomai source expects and the way your toolchain/libc headers are made.
If in the program I asked you to compile you replace #include <errno.h> with #include <linux/errno.h>, does it still compile?
Signature · 1 line
Gilles.
hi,
i deleted the linux and xenomai sources directories and replayed the whole thing. It worked directly. I dont know what i have done soo wrong last time. I tried it now again and again and it works.
thanks for help and sorry for wasting your time :)
flo
Quoted 55 lines · On Thu, 02 Dec 2010 00:08:28 +0100 Gilles Chanteperdrix…
Quoted 2 lines · inflo
hi, the code compiles without errors. I got it once compiled, but after replaying what i have done, it wont work again :(
Ok. Send me the result of this code compiled with
powerpc-linux-gnu-gcc -E.Quoted 11 lines
The
prepare-kernel.shscript i can call from whereever i am, i mean, i could go to e.g. /tmp and could call
/usr/src/xenomai-2.5.5.2/scripts/prepare-kernel.sh--arch=powerpc --adeos=/usr/src/xenomai-2.5.5.2/ksrc/arch/powerpc/patches/adeos-ipipe-2.6.35.7-ppc-1.5-*.patch --linux=/usr/src/linux-2.6.35.7then i could go cd
/usr/src/linux-2.6.35.7and configure and build the kernel from within this directory ? whats with this linux/ shadow copy ?prepare-kernel does not make a shadow copy, it modifies
/usr/src/linux-2.6.35.7in place. So, if you have linux/ it comes from somewhere else.Quoted 11 lines
After building patched kernel, i need to configure xenomai user libs. This is done from whereever i want? i mean, i could go to e.g. /tmp and call
/usr/src/xenomai-2.5.5.2/configure--host=powerpc-linux-gnu and then also call inside this dirmake
to build xenomai libs?
Yes, you can do that, though I would recommend to do it in something like
/tmp/xenomai-buildin order to avoid polluting /tmp with the compilation files.Quoted 6 lines
The user libs build fails mostly with the same procedure deleting linux/ copying linux source to linux/ hanging
my cross tools are prefixed with powerpc-linux-gnu- like powerpc-linux-gnu-gcc
Yes, and this compilation failure probably has other reasons than installation directories names. This is a problem of what Xenomai source expects and the way your toolchain/libc headers are made.
If in the program I asked you to compile you replace #include <
errno.h> with #include <linux/errno.h>, does it still compile?Signature · 1 line
Gilles.
Signature · 1 line
inflo <[email protected]>