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:通过 Yocto 编译为 GP J784S4器件创建 U-boot 二进制文件

Guru**** 2401355 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1471931/tda4vp-q1-creating-u-boot-binaries-files-for-gp-j784s4-device-by-yocto-compilation

器件型号:TDA4VP-Q1

工具与软件:

 您好!

 

我有一个定制的 j784s4 GP 板  、我要  为其创建:tiboot3.bin、tispl.bin_unsigned、u-boot.img_unsigned。
我 根据 指令编译了 tisdk-tinlinux-image 映像 
我位于 Yocto-build/build/deploy-ti/images/j784s4-evm 文件夹下:tiboot3-j784s4-gp-evm 、 tispl.bin、u-boot.img  
如何  也编译 tispl.bin_unsigned、u-boot.img_unsigned 文件?

谢谢!
Rachel

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您能告诉我们为什么需要  tispl.bin_unsigned 和 u-boot.img_unsigned 文件吗? 您 是否无法使用生成的 tispl.bin 和 u-boot.img?

    谢谢。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    当我尝试加载 tispl.bin 文件时、TDA 似乎卡住了、
    我看不出来。。。 用于 u-boot.img 加载的打印命令

    可能与  tispl.bin 文件并非 无符号数有关

    TDA 日志:

    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...
    
    
    

    谢谢!
    Rachel

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    你好、Rachel、

    日志:

    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

    不成问题。 我在启动 GP 器件时也看到它。

    由于您使用的是定制板、您是否遵循了: 定制板启动指南

    此外、运行 bitbake 命令时、您需要构建什么机器?

    此致!
    Jared

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Jared:

    在电路板中、我们更改了 UART 端口、我使用了 https://www.ti.com/lit/an/spradg5/spradg5.pdf?UART=1723883607340 ts 指南来进行这些更改。
    我可能需要为其添加更多更改、我将对其进行调试。

    用于构建的机器是 Ubuntu 22.04。

    谢谢!
    Rachel

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    你好、Rachel、

    请告诉我您的调试结果。 如果 UART 端口有问题、您将不会看到任何引导日志(符合预期)。

    此外、当我说机器时、我是指 bitbake 变量。 例如、j784s4-EVM

    此致!
    Jared

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Jared:

    我成功    在定制板上加载了 ti-processor-sdk-linux-adas-j784s4-evm-10_00_00_08 SDK 的 tiboot3.bin、tispl.bin_unsigned、u-boot.img_unsigned 文件(在根据 https://www.ti.com/lit/an/spradg5/spradg5.pdf?UART=1723883607340 指南更改了 ts 端口后)。

    但我仍然无法成功加载 Yocto 编译的 tispl.bin 文件、它卡在"在 ARM64内核上启动 ATF……"
    也许我没有在 OPTEE 中正确更改 UART 端口?
    在 SDK 中、我使用了"export CFG_CONSOLE_UART=0x8"命令、但在 Yocto 编译中、我在 core/arch/arm/plat-k3/conf.mk 中更改了
    +#CFG_CONSOLE_UART?= 0
    +CFG_CONSOLE_UART = 2


    可以帮帮我吗?

    我使用了 MACHINE=j784s4-EVM。

    谢谢!
    Rachel

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    你好、Rachel、

    您是否已查看 TDA4:定制电路板启动指南

    包含 有关切换 UART 控制台的说明。

    此致!
    Jared

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Jared:

    是的、我在 SDK 中更改了、它对我很有用。

    我的问题是如何  在 bitbake 命令中进行"CFG_CONSOLE_UART=0x8"更改?

    我在"MACHINE=j784s4-evm bitbake -f -c compile trusted-firmware-a" 命令中使用。

    谢谢!
    Rachel

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    你好、Rachel、

    在 meta-ti 中、它看起来像是 由 optee-os-ti-overrides.inc:设置 CFG_CONSOLE_UART

    $ 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 ''}"

    然后、好像 在 j784s4-evm.conf 中设置了 OPTEE_K3_USART:

    $ 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 ''}"

    您能否尝试在此处设置该值?

    此致!
    Jared

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Jared:

    我 做了以下更改:

    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)

    它能为我效劳。

    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 optee.readthedocs.io/.../                        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
    =>
    

    谢谢!
    Rachel

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    你好、Rachel、

    很高兴听到它起作用。 请将您的主题标记为已解析以关闭它。

    此致!
    Jared