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.

SK-AM62-LP: Got some warnings when build uboot, and how to only flash TF-A, optee and uboot through USB DFU mode?

Part Number: SK-AM62-LP
Other Parts Discussed in Thread: AM62L

Tool/software:

Hi,

I am able to generate the BL1.bin and BL31.bin from TF-A, and tee-header_v2.bin from optee.

1. When I build Uboot I am having following warnings, Will this cause problems for Uboot?

BINMAN .binman_stamp
Image 'tiboot3-am62lx-gp-evm.bin' is missing external blobs and is non-functional: tifs-gp1.bin

/binman/tiboot3-am62lx-gp-evm.bin/tifs-gp1.bin (ti-sysfw/ti-fs-firmware-am62lx-gp.bin):
Missing blob

Image 'tiboot3-am62lx-hs-fs-evm.bin' is missing external blobs and is non-functional: tifs-fs-enc1.bin tifs-fs-cert1.bin

/binman/tiboot3-am62lx-hs-fs-evm.bin/tifs-fs-enc1.bin (ti-sysfw/ti-fs-firmware-am62lx-hs-fs-enc.bin):
Missing blob

/binman/tiboot3-am62lx-hs-fs-evm.bin/tifs-fs-cert1.bin (ti-sysfw/ti-fs-firmware-am62lx-hs-fs-cert.bin):
Missing blob

Image 'tispl.bin_unsigned' is missing external blobs and is non-functional: tifs-gp2.bin

2. I would like only flash TF-A optee and Uboot onto board through USB DFU mode. Is there a document that I can refer to?

Thanks,

Dazong

  • Hi Dazong,

    BINMAN .binman_stamp
    Image 'tiboot3-am62lx-gp-evm.bin' is missing external blobs and is non-functional: tifs-gp1.bin

    /binman/tiboot3-am62lx-gp-evm.bin/tifs-gp1.bin (ti-sysfw/ti-fs-firmware-am62lx-gp.bin):
    Missing blob

    This message can be ignored, since there is no GP devices.

    Image 'tiboot3-am62lx-hs-fs-evm.bin' is missing external blobs and is non-functional: tifs-fs-enc1.bin tifs-fs-cert1.bin

    /binman/tiboot3-am62lx-hs-fs-evm.bin/tifs-fs-enc1.bin (ti-sysfw/ti-fs-firmware-am62lx-hs-fs-enc.bin):
    Missing blob

    /binman/tiboot3-am62lx-hs-fs-evm.bin/tifs-fs-cert1.bin (ti-sysfw/ti-fs-firmware-am62lx-hs-fs-cert.bin):
    Missing blob

    But this shows a problem. Can you please provide details that how did you build U-Boot?

    2. I would like only flash TF-A optee and Uboot onto board through USB DFU mode. Is there a document that I can refer to?

    TF-A and OPTEE binaries are combined into the binary file tispl.bin when you build U-Boot, so you won't be able to only flash TF-A or OPTEE binary specifically.

  • Thanks Bin,

    How do I flash this tispl.bin file through DFU mode? Is there a command I need to use or a document describe the steps?

    Thanks,

    Dazong

  • Hi Dazong,

    Where do you want to flash tispl.bin to, eMMC, OSPI or any other media?

  • Hi Bin,

    I would like to directly boot from USB, so OCRAM->DRR. By the way the one I am using is the AM62L EVK

  • So you want boot the board from DFU, but not flash from DFU, is that correct?

  • Yes, not touching any flash.

  • I haven't personally validated DFU boot using the current AM62L SDK release. Let me check it on my board in a day or two and get back to you with details.

    In general the procedure would be the same as the instruction linked below, the only difference would the defconfig to rebuild U-Boot to enable DFU.

    https://dev.ti.com/tirex/explore/node?node=A__AeVbwnGEP1NObR9gnw1lhA__AM62-ACADEMY__uiYMDcq__LATEST&placeholder=true

  • BTY, the instruction only shows how to boot into U-Boot prompt, but not boot the kernel. Is this what you need?

  • Thanks Bin,

    Also, after you give it a try please let me know which USB port on the AM62L can be used for this purpose...I tried all but got cannot open dfu device, the boot pins are set to USB DFU

  • yeah, actually our team is baremetal focused for hardware validation only, and I discussed with Andreas in another thread regarding how to boot from USB with baremetal application. 

    SK-AM62-LP: USB boot time for AM62 - Processors forum - Processors - TI E2E support forums

    He says 2) Once you boot to U-Boot prompt, you can load your bare metal application using the usual U-Boot commands from any media you like (including USB DFU)

  • ROM can only boot from USB0 (DFU or MSC boot mode), but not from USB1. It should be documented some where in the TRM. I can show you later.

    Yes, Andreas is right, you can do a lot of things in U-Boot prompt.

  • Hi Dazong,

    ROM only supports USB boot from USB0 but not USB1. This is documented in the TRM Table 5-1 "ROM Code Boot Modes".

    It turns out that DFU support is already enabled in the U-Boot defconfig, no need to rebuild U-Boot for DFU. Here is the procedure how I checked DFU on AM62L EVM:

    - setup the EVM in the same way as SD card boot;

    - connect a USB cable from the EVM another USB type C port to Linux PC for transferring U-Boot files;

    - set the EVM bootmode switches to DFU primary boot mode (I am lazy to change the switches back and forth, so I booted the EVM to U-Boot prompt from SD card, run command "mw.l 43010030 53; reset" to switch to DFU boot mode;

    - on Linux PC, go to the SDK prebuilt directory (cd <SDK>/board-support/prebuilt-images/am62lxx-evm/), which has all the 3 U-Boot binaries: tiboot3.bin, tispl.bin, u-boot.img;

    - on Linux PC, run the following 3 commands to transfer the U-Boot binaries to the EVM:

    $ sudo dfu-util -R -a 0 -D tiboot3.bin
    $ sudo dfu-util -R -a 0 -D tispl.bin
    $ sudo dfu-util -R -a 0 -D u-boot.img

    After the 3rd command, the EVM should boot into U-Boot prompt.

  • Thank you, Bin.

    Actually, before I can move on, I still have problem with DFU util.

    Our development environment is Windows/WSL, and at this stage our manufacturing FVT environment will be pure Windows only.

    First, I believe that I can confirm the power to the board should be good as I can see "CCCCC" get printed in Tera term.

    I tried to get switch pin to USB0 and USB DFU. The dfu util for Windows I am using is 0.9 and run command "dfu-util -l" to list DFU capable devices

    With USB0 as primary

    With USB DFU as primary

    Regards,

    Dazong

  • Image 'tiboot3-am62lx-hs-fs-evm.bin' is missing external blobs and is non-functional: tifs-fs-enc1.bin tifs-fs-cert1.bin

    /binman/tiboot3-am62lx-hs-fs-evm.bin/tifs-fs-enc1.bin (ti-sysfw/ti-fs-firmware-am62lx-hs-fs-enc.bin):
    Missing blob

    /binman/tiboot3-am62lx-hs-fs-evm.bin/tifs-fs-cert1.bin (ti-sysfw/ti-fs-firmware-am62lx-hs-fs-cert.bin):
    Missing blob

    But this shows a problem. Can you please provide details that how did you build U-Boot?

    Under READ ME, it says 

    Because the AM62L does not have an Cortex-R5 to boot the SoC, building U-Boot has
    been simplified to only the main domain (or `tispl.bin`) portion of building U-Boot
    for K3 SoCs.

    ```console
    make CROSS_COMPILE=aarch64-linux-gnu- am62lx_evm_defconfig
    make CROSS_COMPILE=aarch64-linux-gnu- \
    BINMAN_INDIRS=path/to/ti-linux-firmware \
    BL1=path/to/bl1.bin \
    BL31=path/to/bl31.bin \
    TEE=path/to/tee_pager_v2.bin
    ```

    So I've given the absolute path to these files. I guess the problem is I don't have binman installed? Is there a version you commend? This is our first time work with TI MPU

    Thank you,

    Dazong

  • Hi Dazong,

    BINMAN_INDIRS=path/to/ti-linux-firmware \

    What is "path/ti/ti-linux-firmware" exactly? it should be <SDK>/board-support/prebuilt-images/am62lxx-evm/ (no ti-sysfw/ at the end of the path). Please refer to Rules.make and makerules/Makefile_u-boot to see how U-Boot is compiled.

  • Thanks Bin,

    I am able to boot from USB with prebuild imgs

    Regards,

    Dazong

  • Hi Dazong,

    Great progress! Thanks for the update.

    Do you still get the same warning as below or they are different now?

    Image 'tiboot3-am62lx-hs-fs-evm.bin' is missing external blobs and is non-functional: tifs-fs-enc1.bin tifs-fs-cert1.bin

    /binman/tiboot3-am62lx-hs-fs-evm.bin/tifs-fs-enc1.bin (ti-sysfw/ti-fs-firmware-am62lx-hs-fs-enc.bin):
    Missing blob

    /binman/tiboot3-am62lx-hs-fs-evm.bin/tifs-fs-cert1.bin (ti-sysfw/ti-fs-firmware-am62lx-hs-fs-cert.bin):
    Missing blob

  • After I changed the BINMAN_INDIRS= to the prebuilt img directory it is gone

  • I am able to boot from USB with prebuild imgs

    Okay, my bad, somehow I read your message as that you are able to boot to U-Boot prompt but still with build warnings...

  • Hi Bin,

    I am trying to build the U boot myself to get the DFU working with boot from USB "ti-processor-sdk-linux-am62lxx-evm-11.00.00.03/board-support/ti-u-boot-2024.10+git". Besides 

    CONFIG_DFU=y CONFIG_CMD_DFU=y CONFIG_USB_GADGET=y. Do you see any other config variables I miss in order to get it working?

    After "tiboot3.bin", got warning:

    Thanks,

    Dazong

  • Hi Dazong,

    To build the SDK U-Boot, please try to use command 'make u-boot' at the top level directory of the SDK.

    The 3 U-Boot binaries will be located under <SDK>/board-support/u-boot-build/a53/.

  • Hi Bin,

    I did a "sudo make clean" then "sudo make u-boot"

    Got following error msgs

    Error: kernelrelease not valid - run 'make prepare' to update it

  • Hi Dazong,

    Not sure what causes this error, but you don't need sudo for all these build commands. Please try to rm u-boot-build/ directory and run 'make u-boot' again to see if the issue still happens. Hopefully you didn't use 'sudo' when installing the SDK...

  • If the error still happens, it might be because you previously built u-boot within the u-boot directory. Please go to u-boot source directory and run command 'git clean -f' to remove all generated files.

  • Hi Bin,

    Finally I totally removed the sdk and reinstalled, it compiled

    Thanks,

    Dazong

  • Glad it works now. Thanks for the update.

  • hi Bin,

    Just one more update that with the self compiled uboot img I am also able to boot from USB. Took me a while to realize the tiboot3.bin in under u-boot-build is a symbolic link

  • Nice! Thanks for the update.