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.

AM3358: Can't find arm-linux-gnueabihf-gcc

Part Number: AM3358


Tool/software:

I've started going through the custom board port, specifically I'm stuck at building the custom defconfig file, compiler reports the following:

bmcdaniel@system76-pc:~/Projects/Embedded/Build/ti-sdk-am335x-evm-09.01.00.001/board-support/ti-u-boot-2023.04+gitAUTOINC+d74d0993e2-gd74d0993e2$ make ARCH=ARM CROSS_COMPILE=arm-linux-gnueabihf- am335x_hdmi_defconfig
/bin/sh: 1: arm-linux-gnueabihf-gcc: not found
./scripts/gcc-version.sh: 26: arm-linux-gnueabihf-gcc: not found
./scripts/gcc-version.sh: 27: arm-linux-gnueabihf-gcc: not found
./scripts/gcc-version.sh: 29: arm-linux-gnueabihf-gcc: not found
./scripts/gcc-version.sh: 26: arm-linux-gnueabihf-gcc: not found
./scripts/gcc-version.sh: 27: arm-linux-gnueabihf-gcc: not found
./scripts/gcc-version.sh: 29: arm-linux-gnueabihf-gcc: not found
Kconfig:66: syntax error
Kconfig:65: invalid option
./scripts/clang-version.sh: 15: arm-linux-gnueabihf-gcc: not found
make[1]: *** [scripts/kconfig/Makefile:96: am335x_hdmi_defconfig] Error 1
make: *** [Makefile:575: am335x_hdmi_defconfig] Error 2

The following shows the PATH, which includes the location of arm-gnu-none-linux-gnueabihf

bmcdaniel@system76-pc:~/Projects/Embedded/Build/ti-sdk-am335x-evm-09.01.00.001/board-support/ti-u-boot-2023.04+gitAUTOINC+d74d0993e2-gd74d0993e2$ echo $PATH
/home/bmcdaniel/Downloads/arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-linux-gnueabihf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin

I've also tried setting the PATH to use SDK_LOCATION/linux-devkit/sysroots/x86_x64-arago-linux

Neither PATH option works in terms of finding arm-linux-gnueabihf-gcc

Is there something that needs to be done beyond setting the PATH location in order to fine the compiler?

Thanks,

Brian

  • Hi Brian,

    Your cross compile is defined as arm-linux-gnueabihf- but you are using the 13.3.rel1-x86_64-arm-none-linux-gnueabihf gcc compiler. If you go to the directory /home/bmcdaniel/Downloads/arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-linux-gnueabihf/bin, the compiler should be called something like arm-none-linux-gnueabihf-.

    Regards,
    Krunal

     

  • Hi Krunal,

    That worked for building the defconfig, thank you, I had tried using "none-lin.." before but I must have missed typed it etc, thank you for clarifying.

    When I try to build u-boot though I'm getting the following (I've tried with CC and without)

    The following is w/out including CC

    bmcdaniel@system76-pc:~/Projects/Embedded/Build/ti-sdk-am335x-evm-09.01.00.001/board-support/ti-u-boot-2023.04+gitAUTOINC+d74d0993e2-gd74d0993e2$ make u-boot
    scripts/kconfig/conf  --syncconfig Kconfig
      CFG     u-boot.cfg
      GEN     include/autoconf.mk
      GEN     include/autoconf.mk.dep
      CFG     spl/u-boot.cfg
      GEN     spl/include/autoconf.mk
      UPD     include/generated/timestamp_autogenerated.h
      ENVC    include/generated/env.txt
      ENVP    include/generated/env.in
      ENVT    include/generated/environment.h
      CC      lib/asm-offsets.s
    cc1: error: bad value (‘generic-armv7-a’) for ‘-mtune=’ switch
    cc1: note: valid arguments to ‘-mtune=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client rocketlake icelake-server cascadelake tigerlake cooperlake sapphirerapids alderlake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm intel x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 znver3 btver1 btver2 generic native
    make[1]: *** [scripts/Makefile.build:146: lib/asm-offsets.s] Error 1..
    make: *** [Makefile:1906: prepare0] Error 2

    And using CC flags

    bmcdaniel@system76-pc:~/Projects/Embedded/Build/ti-sdk-am335x-evm-09.01.00.001/board-support/ti-u-boot-2023.04+gitAUTOINC+d74d0993e2-gd74d0993e2$ make ARCH=ARM CROSS_COMPILE=arm-none-linux-gnueabihf- u-boot
    Makefile:632: arch/ARM/Makefile: No such file or directory
    make: *** No rule to make target 'arch/ARM/Makefile'.  Stop.

    I am trying to build it from within ti-sdk../board-support/ti-u-boot... directory and not from the root of the SDK, I think that's where the build is supposed to be done for in this instance.

  • So I removed make ARCH and did the make with just CC instead, i.e. make CROSS_COMPILE.. u-boot and that got things further along, is there a general rule for when ARCH and /or CROSS_COMPILE flags are required during builds?