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.

TDA4VP-Q1: Creating U-boot binaries files for GP J784S4 device by Yocto compilation

Part Number: TDA4VP-Q1

Tool/software:

 Hi,

 

I have a custom j784s4 GP board, and I want to create: tiboot3.bin, tispl.bin_unsigned, u-boot.img_unsigned for it.
I compiled tisdk-thinlinux-image image according to the instructions 
And I got under the yocto-build/build/deploy-ti/images/j784s4-evm folder: tiboot3-j784s4-gp-evm, tispl.bin, u-boot.img
How can I compile tispl.bin_unsigned, u-boot.img_unsigned files too?

Thanks,
Rachel

  • Can you tell us why you need tispl.bin_unsigned & u-boot.img_unsigned files? Can't you use the generated tispl.bin, & u-boot.img?

    Thanks.

  • Hi,

    When I try to load the tispl.bin file, it seems the TDA stuck,
    I don't see the cc.. print for the u-boot.img loading

    Is it can be related that the tispl.bin file isn't unsigned

    TDA log:

    U-Boot SPL 2024.04-ti-g818c76aed67f (Aug 01 2024 - 19:19:47 +0000)
    SYSFW ABI: 4.0 (firmware rev 0x000a '10.0.8--v10.00.08 (Fiery Fox)')
    Initialized 3 DRAM controllers
    i2c_write: error waiting for data ACK (status=0x116)
    tps6287x_regulator regulator@40: CTRL2 reg read failed: -121
    SPL initial stack usage: 13456 bytes
    Trying to boot from UART
    CCWarning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Loaded 1087031 bytes
    i2c_write: error waiting for data ACK (status=0x116)
    tps6287x_regulator regulator@40: CTRL2 reg read failed: -121
    Loading Environment from nowhere... OK
    init_env from device 7 not supported!
    Starting ATF on ARM64 core...
    
    
    

    Thanks,
    Rachel

  • Hi Rachel,

    The log:

    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted

    shouldn't be an issue. I see it when booting my GP device as well.

    Since you're using a custom board, have you followed the: custom board bring up guide?

    Additionally, what MACHINE are you building when running the bitbake command?

    Best,
    Jared

  • Hi Jared,

    In our board, we changed the UART port, I used https://www.ti.com/lit/an/spradg5/spradg5.pdf?ts=1723883607340 guide for do these changes.
    Maybe I need to add more changes for it, I will debug it.

    The machine for building is Ubuntu 22.04.

    Thanks,
    Rachel

  • Hi Rachel,

    Let me know the results of your debugging. If there's an issue with the UART port, then you won't see any boot logs (as expected).

    Additionally, when I said MACHINE, I meant the bitbake variable. For example, j784s4-evm

    Best,
    Jared

  • Hi Jared,

    I succeeded to load the tiboot3.bin, tispl.bin_unsigned, u-boot.img_unsigned files of ti-processor-sdk-linux-adas-j784s4-evm-10_00_00_08 SDK on our custom board (After I changed the UART port according to https://www.ti.com/lit/an/spradg5/spradg5.pdf?ts=1723883607340 guide.

    But I still not succeed to load the tispl.bin file of Yocto compilation, it stuck on "Starting ATF on ARM64 core..."
    Maybe I didn't change the UART port correctly in OPTEE?
    In SDK I used "export CFG_CONSOLE_UART=0x8" command but in the Yocto compilation I changed in the core/arch/arm/plat-k3/conf.mk
    +#CFG_CONSOLE_UART ?= 0
    +CFG_CONSOLE_UART = 2


    Can you help me please?

    I used MACHINE=j784s4-evm.

    Thanks,
    Rachel

  • Hi Rachel,

    Have you looked at the TDA4: Custom Board Bring Up Guide?

    It contains instructions on switching the UART console.

    Best,
    Jared

  • Hi Jared,

    yes, I changed in the SDK and it worked me.

    My question is how can I do the  "CFG_CONSOLE_UART=0x8" change in the bitbake command?

    I use in the "MACHINE=j784s4-evm bitbake -f -c compile  trusted-firmware-a" command.

    Thanks,
    Rachel

  • Hi Rachel,

    Looking within meta-ti, it looks like CFG_CONSOLE_UART is set by optee-os-ti-overrides.inc:

    $ grep CFG_CONSOLE_UART -r ./*
    ./meta-ti/meta-ti-bsp/recipes-security/optee/optee-os-ti-overrides.inc:EXTRA_OEMAKE:append:k3 = "${@ ' CFG_CONSOLE_UART='+ d.getVar('OPTEE_K3_USART') if d.getVar('OPTEE_K3_USART') else ''}"

    From there, it looks like OPTEE_K3_USART is set within the j784s4-evm.conf:

    $ grep OPTEE_K3_USART -r ./*
    ...
    ./meta-ti/meta-ti-bsp/conf/machine/j784s4-evm.conf:OPTEE_K3_USART = "0x8"
    ...
    ./meta-ti/meta-ti-bsp/recipes-security/optee/optee-os-ti-overrides.inc:EXTRA_OEMAKE:append:k3 = "${@ ' CFG_CONSOLE_UART='+ d.getVar('OPTEE_K3_USART') if d.getVar('OPTEE_K3_USART') else ''}"

    Can you try setting the value there?

    Best,
    Jared

  • Hi Jared,

    I did the below changes:

    In meta-ti/meta-ti-bsp/conf/machine/j784s4-evm.conf file:
    
    from TFA_K3_USART = "0x8" to TFA_K3_USART = "0x1"
    from OPTEE_K3_USART = "0x8 to "OPTEE_K3_USART = "0x2"
    
    In trusted-firmware-a/2.10+git/git/plat/ti/k3/include/platform_def.h file:
    
    -#define K3_USART_BASE                  (0x02800000 + 0x10000 * K3_USART)
    +#define K3_USART_BASE                  (0x02820000 + 0x10000 * K3_USART)

    And it works me.

    U-Boot SPL 2024.04-ti-g818c76aed67f (Aug 01 2024 - 19:19:47                         +0000)
    SYSFW ABI: 4.0 (firmware rev 0x000a '10.0.8--v10.00.08 (Fier                        y Fox)')
    Initialized 3 DRAM controllers
    i2c_write: error waiting for data ACK (status=0x116)
    tps6287x_regulator regulator@40: CTRL2 reg read failed: -121
    SPL initial stack usage: 13456 bytes
    Trying to boot from UART
    CCWarning: Detected image signing certificate on GP device.                         Skipping certificate to prevent boot failure. This will fail                         if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Sk                        ipping certificate to prevent boot failure. This will fail i                        f the image was also encrypted
    Warning: Detected image signing certificate on GP device. Sk                        ipping certificate to prevent boot failure. This will fail i                        f the image was also encrypted
    Warning: Detected image signing certificate on GP device. Sk                        ipping certificate to prevent boot failure. This will fail i                        f the image was also encrypted
    Warning: Detected image signing certificate on GP device. Sk                        ipping certificate to prevent boot failure. This will fail i                        f the image was also encrypted
    Loaded 1086743 bytes
    i2c_write: error waiting for data ACK (status=0x116)
    tps6287x_regulator regulator@40: CTRL2 reg read failed: -121
    Loading Environment from nowhere... OK
    init_env from device 7 not supported!
    Starting ATF on ARM64 core...
    
    I/TC:
    I/TC: OP-TEE version: 4.2.0-dev (gcc version 13.3.0 (GCC)) #                        1 Fri Apr 12 09:51:21 UTC 2024 aarch64
    I/TC: WARNING: This OP-TEE configuration might be insecure!
    I/TC: WARNING: Please check https://optee.readthedocs.io/en/                        latest/architecture/porting_guidelines.html
    I/TC: Primary CPU initializing
    I/TC: GIC redistributor base address not provided
    I/TC: Assuming default GIC group status and modifier
    I/TC: SYSFW ABI: 4.0 (firmware rev 0x000a '10.0.8--v10.00.08                         (Fiery Fox)')
    I/TC: HUK Initialized
    I/TC: Activated SA2UL device
    I/TC: Fixing SA2UL firewall owner for GP device
    I/TC: Enabled firewalls for SA2UL TRNG device
    I/TC: SA2UL TRNG initialized
    I/TC: SA2UL Drivers initialized
    I/TC: Primary CPU switching to normal world boot
    
    U-Boot SPL 2024.04-ti-g818c76aed67f (Aug 01 2024 - 19:19:47                         +0000)
    SYSFW ABI: 4.0 (firmware rev 0x000a '10.0.8--v10.00.08 (Fier                        y Fox)')
    Trying to boot from UART
    CCWarning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Loaded 1161003 bytes
    
    
    U-Boot 2024.04-ti-g818c76aed67f (Aug 01 2024 - 19:19:47 +0000)
    
    SoC:   J784S4 SR1.0 GP
    Model: Texas Instruments J784S4 EVM
    DRAM:  2 GiB (effective 3 GiB)
    Core:  135 devices, 34 uclasses, devicetree: separate
    Flash: 0 Bytes
    MMC:   mmc@4f80000: 0, mmc@4fb0000: 1
    Loading Environment from nowhere... OK
    In:    serial@2820000
    Out:   serial@2820000
    Err:   serial@2820000
    am65_cpsw_nuss ethernet@46000000: K3 CPSW: nuss_ver: 0x6BA02102 cpsw_ver: 0x6BA82102 ale_ver: 0x00293904 Ports:1
    Net:   Could not get PHY for mdio@f00: addr 0
    am65_cpsw_nuss_port ethernet@46000000port@1: phy_connect() failed
    No ethernet found.
    
    Hit any key to stop autoboot:  0
    =>
    

    Thanks,
    Rachel

  • Hi Rachel,

    Glad to hear it works. Please mark your thread as resolved to close it.

    Best,
    Jared