Buidroot Cross-Complier Problem

  • Hi F&S people,


    I am currently trying to build my own custom linux kernel using the F&S buildroot toolchain v4.7.2 for a CortexA5. However, I'm having huge troubles when trying to compile even the standard configuration by F&S.


    What did I do? I extracted "fs-toolchain-4.7.2-cortexa5-neonvfpv4.tar.bz2" to "/usr/local/arm/" as is suggested within "Vybrid_FirstSteps_eng.pdf". Thus, the appropiate gcc compiler (arm-linux-gcc) lies at "/usr/local/arm/fs-toolchain-4.7.2-cortexa5-neonvfpv4/bin". The files in this directory are all executeable.


    However, when I call "make" in "~/buildroot-2013.02-f+s-V2.1" the process stops with the following error message

    Code
    1. >>> Checking external toolchain settings
    2. Cannot execute cross-compiler '/usr/local/arm/fs-toolchain-4.7.2-cortexa5-neonvfpv4/bin/arm-linux-gcc'
    3. make: *** [/home/johannes/buildroot-2013.02-f+s-V2.1/output/stamps/ext-toolchain-checked] Error 1


    Why can't the compiler be called? Sorry, I don't get it and I fear it's rather an easy thing. Any help?



    Thanks!

  • Hello,


    normaly, to build an image with contains two stepps.

    • make your-defconfig
    • make

    did you check the compiler settings in your defconfig file?

    Code
    1. # our defconfig for external toolchain
    2. BR2_TOOLCHAIN_EXTERNAL=y
    3. BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
    4. BR2_TOOLCHAIN_EXTERNAL_PATH="/usr/local/arm/fsvybrid/fs-toolchain-4.7.2-cortexa5-neonvfpv4"
    5. BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="$(ARCH)-fs-linux-gnueabi"


    With this Toolachain Path:

    Code
    1. /usr/local/arm/fsvybrid/fs-toolchain-4.7.2-cortexa5-neonvfpv4


    maybe, is this the mistake?
    arm-linux-gcc instead of arm-fs-linux-gnueabi

  • You need to add the path to your PATH variable. Usually this is done by modifying ~/.bashrc. There you should also set variables ARCH=arm and CROSS_COMPILE=arm-linux- to make the compilations run smooth.


    You also have to take care because the toolchain is a 32 bit toolchain. If you are running on a 64 bit Linux, you may have to install some additional 32 bit libraries. For example you may need to install glibc and zlib (and maybe a few more) for i686, not only for x86-64. On Fedora you will also need the package ncurses-devel to be able to run all the make menuconfig commands as this is often not installed by default.


    Your F&S Support Team

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.