Hi Patrick,

The toolchain and sysroot are behaving correctly,  the x86_64-pokysdk-linux 
contains the cross tools for your development host, whereas 
armv7a-vfp-neon-poky-linux-gnueabi contains your target sysroot, and all your 
target programs should be using files against that sysroot.  By not knowing how 
your compile your package, but if you look at our ADT manual, you should source 
the environment setup script before you try to use the toolchain and you also 
need to pass sysroot option to your compiler and linker for them to go to the 
target sysroot location for headers and libraries.

Thanks,
Jessica

-----Original Message-----
From: yocto-boun...@yoctoproject.org [mailto:yocto-boun...@yoctoproject.org] On 
Behalf Of Patrick Turley
Sent: Thursday, January 10, 2013 2:46 PM
To: yocto@yoctoproject.org
Subject: [yocto] Shouldn't linux/version.h appear in the SDK's host sysroot?

I'm using a Yocto-based SDK, produced by:

    bitbake meta-toolchain-sdk

This creates the file

    poky-eglibc-x86_64-arm-toolchain-gmae-1.3.sh

in the directory

    build/tmp/deploy/sdk

I ran the installation script to install the SDK on my build system. Within the 
SDK installation directory, under "sysroots", I have the following two 
directories:

    armv7a-vfp-neon-poky-linux-gnueabi
    x86_64-pokysdk-linux

Unless I'm mistaken, the first one reflects the target environment, and the 
second one contains what I need to do cross-compilation. Thus, the latter 
contains the cross-compilation tools, and that's the sysroot to which all my 
builds are directed.

I'm compiling the lm_sensors package for my target. As part of its work, it 
tries to discover the version of the target linux kernel. To do this, it 
compiles a very small file (etc/config.c) that includes the header file 
<linux/kernel.h>.

As it happens, <linux/kernel.h> does *not* appear in the cross-compilation 
sysroot, so this simple task fails. That header file *does* appear in the 
target sysroot, but that's of no use to me in the cross-compilation process.

I believe one of the following is true:

1) The lm_sensors package is doing something entirely legitimate, and the file 
<linux/kernel.h> *should* appear in the cross-compilation sysroot to support 
this. The Yocto SDK build target needs a small fix so that <linux/kernel.h> is 
properly added to the cross-compilation sys root. In the meantime, I can work 
around this oversight by creating a symbolic link.

2) I've made a mistake in setting up my build environment because I don't 
understand how cross-compilation *should* be done. If done properly, the 
cross-compilation process will have access to *both* sysroots and get what it 
needs from each. If this is the case, please tell me what I appear to have done 
wrong.

3) Something else.

_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to