* [Xenomai-help] xenomai user lib build error
@ 2010-11-29 18:50 inflo
2010-11-29 20:29 ` Gilles Chanteperdrix
0 siblings, 1 reply; 5+ messages in thread
From: inflo @ 2010-11-29 18:50 UTC (permalink / raw)
To: xenomai@xenomai.org
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
--
inflo <inflo@domain.hid>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai-help] xenomai user lib build error
2010-11-29 18:50 [Xenomai-help] xenomai user lib build error inflo
@ 2010-11-29 20:29 ` Gilles Chanteperdrix
2010-12-01 18:35 ` inflo
0 siblings, 1 reply; 5+ messages in thread
From: Gilles Chanteperdrix @ 2010-11-29 20:29 UTC (permalink / raw)
To: inflo; +Cc: xenomai@xenomai.org
inflo wrote:
> 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?
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.
--
Gilles.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai-help] xenomai user lib build error
2010-11-29 20:29 ` Gilles Chanteperdrix
@ 2010-12-01 18:35 ` inflo
2010-12-01 23:08 ` Gilles Chanteperdrix
0 siblings, 1 reply; 5+ messages in thread
From: inflo @ 2010-12-01 18:35 UTC (permalink / raw)
To: xenomai@xenomai.org
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
On Mon, 29 Nov 2010 21:29:55 +0100
Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> wrote:
> inflo wrote:
> > 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?
>
> 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.
>
>
> --
> Gilles.
--
inflo <inflo@domain.hid>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai-help] xenomai user lib build error
2010-12-01 18:35 ` inflo
@ 2010-12-01 23:08 ` Gilles Chanteperdrix
2010-12-02 18:17 ` inflo
0 siblings, 1 reply; 5+ messages in thread
From: Gilles Chanteperdrix @ 2010-12-01 23:08 UTC (permalink / raw)
To: inflo; +Cc: xenomai@xenomai.org
inflo wrote:
> 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.
>
> 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 ?
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.
>
> 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?
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.
>
> 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?
--
Gilles.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai-help] xenomai user lib build error
2010-12-01 23:08 ` Gilles Chanteperdrix
@ 2010-12-02 18:17 ` inflo
0 siblings, 0 replies; 5+ messages in thread
From: inflo @ 2010-12-02 18:17 UTC (permalink / raw)
To: xenomai@xenomai.org
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
On Thu, 02 Dec 2010 00:08:28 +0100
Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> wrote:
> inflo wrote:
> > 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.
>
> >
> > 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 ?
>
> 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.
>
> >
> > 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?
>
> 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.
>
> >
> > 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?
>
> --
> Gilles.
--
inflo <inflo@domain.hid>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-12-02 18:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-29 18:50 [Xenomai-help] xenomai user lib build error inflo
2010-11-29 20:29 ` Gilles Chanteperdrix
2010-12-01 18:35 ` inflo
2010-12-01 23:08 ` Gilles Chanteperdrix
2010-12-02 18:17 ` inflo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.