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.

AM6548: U-boot build error

Part Number: AM6548

Hi Champs.

I'm using the SDK6.01,

Building u-boot will lead this error, may I know how to solve it?

BR Rio

make -j 1 -C /opt/ti-processor-sdk-linux-rt-am65xx-evm-06.01.00.08/board-support/u-boot-* CROSS_COMPILE=/opt/ti-processor-sdk-linux-rt-am65xx-evm-06.01.00.08/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/aarch64-linux-gnu- \
am65x_evm_a53_defconfig O=/opt/ti-processor-sdk-linux-rt-am65xx-evm-06.01.00.08/board-support/u-boot_build/a53
make[1]: Entering directory '/opt/ti-processor-sdk-linux-rt-am65xx-evm-06.01.00.08/board-support/u-boot-2019.01+gitAUTOINC+029e4c009a-g029e4c009a'
make[2]: Entering directory '/opt/ti-processor-sdk-linux-rt-am65xx-evm-06.01.00.08/board-support/u-boot_build/a53'
HOSTCC scripts/basic/fixdep
cc1: error: unrecognized command line option ‘-std=gnu11’
scripts/Makefile.host:97: recipe for target 'scripts/basic/fixdep' failed
make[3]: *** [scripts/basic/fixdep] Error 1
/opt/ti-processor-sdk-linux-rt-am65xx-evm-06.01.00.08/board-support/u-boot-2019.01+gitAUTOINC+029e4c009a-g029e4c009a/Makefile:415: recipe for target 'scripts_basic' failed
make[2]: *** [scripts_basic] Error 2
make[2]: Leaving directory '/opt/ti-processor-sdk-linux-rt-am65xx-evm-06.01.00.08/board-support/u-boot_build/a53'
Makefile:148: recipe for target 'sub-make' failed
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory '/opt/ti-processor-sdk-linux-rt-am65xx-evm-06.01.00.08/board-support/u-boot-2019.01+gitAUTOINC+029e4c009a-g029e4c009a'
Makefile:210: recipe for target 'u-boot-a53' failed
make: *** [u-boot-a53] Error 2
root@ubuntu:/opt/ti-processor-sdk-linux-rt-am65xx-evm-06.01.00.08#

  • Hi Rio,

    Do you build uboot from the top level makefile? Please provide your exact steps to build uboot for AM65x device.

    You can also refer to below user guide:

    http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Overview_Getting_Started_Guide.html#top-level-makefile

    Regards,
    Pavel

  • Rio,

    also please see below link for more info on how to build U-Boot for AM654x from scratch without using the top-level SDK makefile. Since on AM654x you are building for two different architectures using two different toolchains (with two different defconfigs, etc.) you will need to build into two different output folders which can be accomplished using the 'O=' make option (or do the build sequentially, but then both from a completely clean U-Boot folder/tree).

    http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Foundational_Components_U-Boot.html?highlight=am654#u-boot-for-am65x-family-of-socs

    Regards, Andreas

  • Hi Andreas:

    #1. Please review my command set for building the R5/A53. in the below, is this right?

    #2. I have a question:

          Why Building R5 / A53 needs to have 2 different command sets? What are the different?

    #3. So, we need to use 2 commands for building R5/A53 respectively?       

          OR we need to build the R5 with 2 commands , and build A53 with 2 commands?

    Please guide me how to do, thanks.

    BR Rio

    R5

    $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am65x_evm_r5_defconfig O=opt/ti-processor-sdk-linux-rt-am65xx-evm-06.01.00.08/Rio_Build_UBoot_Image/r5
    $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=opt/ti-processor-sdk-linux-rt-am65xx-evm-06.01.00.08/Rio_Build_UBoot_Image/r5

    A53

    $ make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- am65x_evm_a53_defconfig O=opt/ti-processor-sdk-linux-rt-am65xx-evm-06.01.00.08/Rio_Build_UBoot_Image/a53
    $ make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- ATF=opt/ti-processor-sdk-linux-rt-am65xx-evm-06.01.00.08/Rio_Build_UBoot_Image/board-support/prebuilt-images/bl31.bin TEE=opt/ti-processor-sdk-linux-rt-am65xx-evm-06.01.00.08/Rio_Build_UBoot_Image//board-support/prebuilt-images/bl32.bin O=opt/ti-processor-sdk-linux-rt-am65xx-evm-06.01.00.08/Rio_Build_UBoot_Image//a53

  • Still having this error while building R5...

    root@ubuntu:/opt/ti-processor-sdk-linux-rt-am65xx-evm-06.01.00.08/board-support/u-boot-2019.01+gitAUTOINC+029e4c009a-g029e4c009a# make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am65x_evm_r5_defconfig O=opt/ti-processor-sdk-linux-rt-am65xx-evm-06.01.00.08/Rio_Build_UBoot_Image/r5
    make[1]: Entering directory '/opt/ti-processor-sdk-linux-rt-am65xx-evm-06.01.00.08/board-support/u-boot-2019.01+gitAUTOINC+029e4c009a-g029e4c009a/opt/ti-processor-sdk-linux-rt-am65xx-evm-06.01.00.08/Rio_Build_UBoot_Image/r5'
    HOSTCC scripts/basic/fixdep
    cc1: error: unrecognized command line option ‘-std=gnu11’
    scripts/Makefile.host:97: recipe for target 'scripts/basic/fixdep' failed
    make[2]: *** [scripts/basic/fixdep] Error 1
    /opt/ti-processor-sdk-linux-rt-am65xx-evm-06.01.00.08/board-support/u-boot-2019.01+gitAUTOINC+029e4c009a-g029e4c009a/Makefile:415: recipe for target 'scripts_basic' failed
    make[1]: *** [scripts_basic] Error 2
    make[1]: Leaving directory '/opt/ti-processor-sdk-linux-rt-am65xx-evm-06.01.00.08/board-support/u-boot-2019.01+gitAUTOINC+029e4c009a-g029e4c009a/opt/ti-processor-sdk-linux-rt-am65xx-evm-06.01.00.08/Rio_Build_UBoot_Image/r5'
    Makefile:148: recipe for target 'sub-make' failed
    make: *** [sub-make] Error 2
    root@ubuntu:/opt/ti-processor-sdk-linux-rt-am65xx-evm-06.01.00.08/board-support/u-boot-2019.01+gitAUTOINC+029e4c009a-g029e4c009a#

  • Hi Champs:

    I think the GCC version is mattering this issue, right?

    The SDK6.01 is using the 7.3.1. gcc.

    And this page is saying to use 8.3 gcc.

    http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Release_Specific_Release_Notes.html#build-information

    Am I right?

    BTW, this page tells us to use the Ubuntu 18.04.

    Will it work on Ubuntu 18.10?

    I found 18.04 is buggy,.....

    BR Rio

  • Rio,

    I am working on Ubuntu 16.04 LTS, 64-bit. And I am able to build u-boot from top-level makefile with below commands;

    pbotev@lin-0306:~/workdir/AM65x/ti-processor-sdk-linux-am65xx-evm-06.01.00.08$ make u-boot_clean

    pbotev@lin-0306:~/workdir/AM65x/ti-processor-sdk-linux-am65xx-evm-06.01.00.08$ make u-boot


    This command is automatically building uboot for R5 and A53. You can explore the makefile and build log for details.

    The toolchain used for R5 is ti-processor-sdk-linux-am65xx-evm-06.01.00.08/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-gcc-8.3.0

    The toolchain used for A53 is ti-processor-sdk-linux-am65xx-evm-06.01.00.08/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/aarch64-linux-gnu-gcc-8.3.0


    The toolchain is set in ti-processor-sdk-linux-am65xx-evm-06.01.00.08/Rules.make file.


    Regards,
    Pavel

  • Hi Pavel:

    Thanks for the help.

    Some questions:

       #1. Do you think the SDK needs to assign this patch: https://e2e.ti.com/support/processors/f/791/t/827460?Compiler-AM3352-U-boot-build-error

             The gnu11 vs gnu99 matters with the building result I think.

       #2. Now, I'm okay to build the u-boot.

             The reason I cannot build okay is : I used the command "source /environment.setup" .... It seems we don't need to do this in the current SDK?

       #3. Can you review my build log below?

             Is this only built the R5 SBL? 

             Where is the A53 SBL It gernerated?

             Where is the output image directory ? ( I just want to double confirm).

    THanks.

    BR Rio

    LD spl/u-boot-spl
    OBJCOPY spl/u-boot-spl-nodtb.bin
    make[5]: 'arch/arm/dts/k3-am654-r5-base-board.dtb' is up to date.
    FDTGREP spl/dts/k3-am654-r5-base-board.dtb
    MKIMAGE spl/u-boot-spl.multidtb.fit
    CAT spl/u-boot-spl-dtb.bin
    COPY spl/u-boot-spl.bin
    /opt/ti-processor-sdk-linux-rt-am65xx-evm-06.01.00.08/board-support/u-boot-2019.01+gitAUTOINC+029e4c009a-g029e4c009a/tools/k3_gen_x509_cert.sh -c 16 -b spl/u-boot-spl.bin \
    -o tiboot3.bin -l 0x41c00000 -k ""
    COPY u-boot.dtb
    MKIMAGE u-boot-dtb.img
    CHK include/config.h
    CFG u-boot.cfg
    CFGCHK u-boot.cfg
    make[2]: Leaving directory '/opt/ti-processor-sdk-linux-rt-am65xx-evm-06.01.00.08/board-support/u-boot_build/r5'
    make[1]: Leaving directory '/opt/ti-processor-sdk-linux-rt-am65xx-evm-06.01.00.08/board-support/u-boot-2019.01+gitAUTOINC+029e4c009a-g029e4c009a'

  • Rio Chan said:

    #1. Do you think the SDK needs to assign this patch: https://e2e.ti.com/support/processors/f/791/t/827460?Compiler-AM3352-U-boot-build-error

             The gnu11 vs gnu99 matters with the building result I think.

    No, I do not think you need it. Just make sure you are using the correct ARM toolchain for AM65x Linux SDK, which is GCC 8.3 2019.03 hard-float.

    Rio Chan said:
    The reason I cannot build okay is : I used the command "source /environment.setup" .... It seems we don't need to do this in the current SDK?

    No, you don't need.

    In top-level makefile user guide we have:

    http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Overview_Getting_Started_Guide.html#top-level-makefile

    NOTE: You should not call this makefile with the environment-setup script sourced. The sub-component Makefiles will handle sourcing this script where appropriate, but some make targets such as the Linux kernel make target do not work properly when this script is already sourced.

    Rio Chan said:

     #3. Can you review my build log below?

             Is this only built the R5 SBL? 

             Where is the A53 SBL It gernerated?

             Where is the output image directory ? ( I just want to double confirm).

    Your log seems to be correct.

    A53 is generated under:

    ti-processor-sdk-linux-am65xx-evm-06.01.00.08/board-support/u-boot_build/a53/

    R5 is generated under:

    ti-processor-sdk-linux-am65xx-evm-06.01.00.08/board-support/u-boot_build/r5/

    For how to use the generated files, refer to uboot user guide:

    http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Foundational_Components_U-Boot.html#u-boot-for-am65x-family-of-socs

    Target Images

    Copy the below images to the boot partition of an SD card and boot. Instructions to format the SD card can be found here.

    • tiboot3.bin from <output directory>/r5
    • tispl.bin, u-boot.img from <output directory>/a53
    • sysfw.itb from <path to tisdk>/board-support/prebuilt-images/

  • Hi Pavel:

    Thanks for your clear reply, very solid.

    final question:

    What's the purpose of this file? ==> sysfw.itb from <path to tisdk>/board-support/prebuilt-images/

    it's the DMSC used?

    BR Rio