Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

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.

AM6411: Boot loader compilation error with sdk-linux-am64xx-evm-10.00.07.04

Part Number: AM6411

Tool/software:

Hello,

I am building sdk-linux-am64xx-evm-10.00.07.04, first I built tiboot3.bin and then building tispl.bin and u-boot.img but unfortunately, I am getting error, it seems it is linker error. 

$ make am64x_evm_a53_defconfig O=build/a53
make[1]: Entering directory '/home/admin/ti-processor-sdk-linux-am64xx-evm-10.00.07.04/board-support/ti-u-boot-2024.04+git/build/a53'
GEN Makefile
generated_defconfig:201:warning: override: reassigning to symbol SPL_MTD
#
# configuration written to .config
#
make[1]: Leaving directory '/home/admin/ti-processor-sdk-linux-am64xx-evm-10.00.07.04/board-support/ti-u-boot-2024.04+git/build/a53'

$ make -j8 CROSS_COMPILE=$CROSS_COMPILE BINMAN_INDIRS=$(pwd)/../prebuilt-images BL31=../prebuilt-images/bl31.bin TEE=../prebuilt-images/bl32.bin O=build/a53
make[1]: Entering directory '/home/admin/ti-processor-sdk-linux-am64xx-evm-10.00.07.04/board-support/ti-u-boot-2024.04+git/build/a53'
GEN Makefile
UPD include/generated/timestamp_autogenerated.h
Using /home/admin/ti-processor-sdk-linux-am64xx-evm-10.00.07.04/board-support/ti-u-boot-2024.04+git as source for U-Boot
CC common/version.o
AR common/built-in.o
LD u-boot
/home/admin/ti-processor-sdk-linux-am64xx-evm-10.00.07.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/aarch64-oe-linux/aarch64-oe-linux-ld.bfd: cannot find -lgcc: No such file or directory
make[1]: *** [/home/admin/ti-processor-sdk-linux-am64xx-evm-10.00.07.04/board-support/ti-u-boot-2024.04+git/Makefile:1766: u-boot] Error 1
make[1]: Leaving directory '/home/admin/ti-processor-sdk-linux-am64xx-evm-10.00.07.04/board-support/ti-u-boot-2024.04+git/build/a53'
make: *** [Makefile:177: sub-make] Error 2

I have downloaded SDK from TI page: PROCESSOR-SDK-AM64X Software development kit (SDK) | TI.com with below link,

https://dr-download.ti.com/software-development/software-development-kit-sdk/MD-yXgchBCk98/10.00.07.04/ti-processor-sdk-linux-am64xx-evm-10.00.07.04-Linux-x86-Install.bin

 and following TI link for u-boot building: Build U-Boot

Thanks,

Mukesh Prajapati

  • Hello, 

    What is the variable CROSS_COMPILE set to?

    Check Setting up the toolchain paths section in the link below:
    3.1.1.1. General Information — Processor SDK AM64X Documentation

    Regards,
    Aparna

  • Hello,

    I have set CROSS_COMPILE variable as below ad as per Rules.make file that is along with SDK. 

    TI_SDK_PATH=/home/admin/ti-processor-sdk-linux-am64xx-evm-10.00.07.04

    CROSS_COMPILE=${LINUX_DEVKIT_PATH}/sysroots/x86_64-arago-linux/usr/bin/aarch64-oe-linux/aarch64-oe-linux-

    Thanks,

    Mukesh Prajapati

  • Have you tried build using make u-boot command from top-level SDK directory?

  • Hello, 

    I have not used Makefile top-level SDK directory to build it but used Makefile u-boot top level as below,

    Set Toolchain Path

    Using  Rules.make

    Compile R5 Image

    $ cd <UBOOT_DIR>/
    $ export ARCH=arm
    $ make CROSS_COMPILE=$CROSS_COMPILE_ARMV7 am64x_evm_r5_defconfig O=build/r5
    $ make -j8 CROSS_COMPILE=$CROSS_COMPILE_ARMV7 BINMAN_INDIRS=$(pwd)../prebuilt-images O=build/r5

    Compile ARM64 Image

    $ cd <UBOOT_DIR>/
    $ export ARCH=arm
    $ make am64x_evm_a53_defconfig O=build/a53
    $ make -j8 BINMAN_INDIRS=$(pwd)/../prebuilt-images BL31=../prebuilt-images/bl31.bin TEE=../prebuilt-images/bl32.bin O=build/a53

    Thanks,

    Mukesh Prajapati

  • Hi, 

    Looks like there are some variables missing. 

    Please refer the attached file and create one with AM64 build commands.

    Regards,
    Aparna

    U-boot_build_am62p

  • Hello,

    After seeing your previous reply, I added variables as below and compilation worked fine.


    export SDK_INSTALL_DIR=<SDK Installation Path>

    export CROSS_COMPILE_64="${SDK_INSTALL_DIR}/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/aarch64-oe-linux/aarch64-oe-linux-"

    export SYSROOT_64="${SDK_INSTALL_DIR}/linux-devkit/sysroots/aarch64-oe-linux"

    export CC_64="${CROSS_COMPILE_64}gcc --sysroot=${SYSROOT_64}"

    export CROSS_COMPILE_32="${SDK_INSTALL_DIR}/k3r5-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-oe-eabi/arm-oe-eabi-"

    export UBOOT_DIR=${SDK_INSTALL_DIR}/board-support/ti-u-boot*

    export TI_LINUX_FW_DIR=${SDK_INSTALL_DIR}/board-support/prebuilt-images/am64xx-evm

    export UBOOT_ATF=${SDK_INSTALL_DIR}/board-support/prebuilt-images/am64xx-evm/bl31.bin

    export UBOOT_TEE=${SDK_INSTALL_DIR}/board-support/prebuilt-images/am64xx-evm/bl32.bin

    cd $UBOOT_DIR

    ---------R5-----------------
    make ARCH=arm CROSS_COMPILE="$CROSS_COMPILE_32" am64x_evm_r5_defconfig O=$UBOOT_DIR/out/r5
    make ARCH=arm CROSS_COMPILE="$CROSS_COMPILE_32" O=$UBOOT_DIR/out/r5 BINMAN_INDIRS=$TI_LINUX_FW_DIR

    ---------a53----------------
    make ARCH=arm CROSS_COMPILE="$CROSS_COMPILE_64" am64x_evm_a53_defconfig O=$UBOOT_DIR/out/a53 BINMAN_INDIRS=$TI_LINUX_FW_DIR
    make ARCH=arm CROSS_COMPILE="$CROSS_COMPILE_64" CC="$CC_64" BL31=$UBOOT_ATF TEE=$UBOOT_TEE O=$UBOOT_DIR/out/a53 BINMAN_INDIRS=$TI_LINUX_FW_DIR

    Thanks,

    Mukesh Prajapati