This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM355x openembedded libs

Hi,

i am doing the Sitara Linux Training: Getting Started with Openembedded (http://processors.wiki.ti.com/index.php/Sitara_Linux_Training:_Getting_Started_with_Openembedded)

In the training it i used the external linaro toolchain. I am building the hello world demo in Lab1 (MACHINE=am335x-evm bitbake hello-world)

I would like to know which are the Cross-Compiled Libraries that are being used in the compilation of the example. If i am checking the run.do_compile.1955 file in tisdk/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-vfp-neon-3.2-oe-linux-gnueabi/hello-world-1.0-r0/temp, i see the next values exported to the CC, CPP, LD variables

export CPP="arm-linux-gnueabihf-gcc -E --sysroot=/home/alberto/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am335x-evm -march=armv7-a -marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8"

export CC="arm-linux-gnueabihf-gcc -march=armv7-a -marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 --sysroot=/home/alberto/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am335x-evm"

export LD="arm-linux-gnueabihf-ld --sysroot=/home/alberto/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am335x-evm"

It looks that libs are being searched under =/home/alberto/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am335x-evm instead of searching them in the linaro external toolchain libs in /home/alberto/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/lib

this is the log.do_compile file result:

DEBUG: Executing shell function do_compile NOTE: make -j 1 -e MAKEFLAGS= release arm-linux-gnueabihf-gcc -march=armv7-a -marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 --sysroot=/home/alberto/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am335x-evm -DTIME -O3 -c -isystem/home/alberto/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/include -fstack-protector -D_FORTIFY_SOURCE=1 -O2 -pipe -g -feliminate-unused-debug-types -oRelease/hello-world.o hello-world.c Compiling Release... arm-linux-gnueabihf-gcc -march=armv7-a -marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 --sysroot=/home/alberto/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am335x-evm -o Release/hello-world Release/hello-world.o -L/home/alberto/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/lib -Wl,-rpath-link,/home/alberto/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/lib -Wl,-O1 -Wl,--hash-style=gnu -Wl,-Map,Release/hello-world.map DEBUG: Shell function do_compile finished

Which are the libs searched during the bitbake compilation? Where are the LD, CC and CPP variable settled to /home/alberto/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am335x-evm?

Thanks in advance

Alberto

  • Hello-world is a very simple example application and really only needs the libraries contained within the toolchain to build. However, more complex software depend on libraries and headers beyond what the toolchain can provide. Sysroot is where other software can find any critical files it needs to compile that other software has provided.

    The toolchain  has its own recipe "external-linaro-toolchain" and this recipe places the various libraries and headers that are apart of the toolchain in the sysroot directory also. So no matter what recipe is built there is no reason for OE to look anywhere other than sysroot.

  • Thanks Franklin,

     

    so if i understand well, libraries are first searched in the link pointed by the sysroot variable, in this case:

    sysroot=/home/alberto/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am335x-evm

    If some library is missed then are searched in the external toolchain libs, if i am not wrong:

    /home/alberto/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/lib

    Do you know in which file the sysroot varible gets the value of =/home/alberto/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am335x-evm, i am not able to find it

     

    Thanks in advance

    Alberto