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.

[参考译文] DRA829V:从2023.04变为2024.04的引导问题

Guru**** 2409970 points


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

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1488154/dra829v-boot-problems-going-from-2023-04-to-2024-04

器件型号:DRA829V

工具与软件:

专家、您好!

当我们尝试将 U-Boot 从2023.04提升到2024.04时、我们遇到引导问题。

具有2GB RAM 的定制电路板。 Yocto 构建基于 SDK10的系统。

我们使用 USB 引导和 DFU 流程 将四个引导文件传输至电路板。

在2024.04中、DFU 过程现在在传输 sysfw.itb:后挂起

dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to sourceforge.net/.../

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 0451:6163
Run-time device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 0110
Device returned transfer size 512
Copying data from PC to DFU device
Download        [=========================] 100%       281108 bytes
Download done.
state(6) = dfuMANIFEST-SYNC, status(0) = No error condition is present
dfu-util: unable to read DFU status after completion
dfu-util: can't detach
Resetting USB to switch back to runtime mode
+ set +x
Found DFU: [16de:0057] ver=0224, devnum=117, cfg=1, intf=0, path="5-2", alt=0, name="sysfw.itb", serial="UNKNOWN"
+ dfu-util -R -d 0451:6163 -a sysfw.itb -D /home/bomellberg/se3linux/yocto-base/build/tmp/deploy/images/asp3/sysfw-asp3-hs-fs.itb
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to sourceforge.net/.../

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 16de:0057
Run-time device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 0110
Device returned transfer size 4096
Copying data from PC to DFU device
Download        [=========================] 100%       269718 bytes
Download done.
state(7) = dfuMANIFEST, status(0) = No error condition is present
state(2) = dfuIDLE, status(0) = No error condition is present
Done!
Resetting USB to switch back to runtime mode
+ set +x

此时、dfu-util -l 不显示任何 dfu 设备:

bomellberg@bosse-buildcom:~/se3linux/yocto-base/build$ dfu-util -l
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to sourceforge.net/.../

主调试端口上没有调试输出。 唤醒 UART 正常响应:

0x710002
0xB10004
0x4003007
0x4400B04
0x71000B
0xB10004

附加一个 J-Link 调试器让我了解有关 WAKEUP-MCU 的信息:

bomellberg@bosse-buildcom:~$ gdb-multiarch -ex 'target extended-remote :3336'
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04.2) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <gnu.org/.../gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<www.gnu.org/.../>.
Find the GDB manual and other documentation resources online at:
    <www.gnu.org/.../>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
Remote debugging using :3336
warning: No executable has been specified and target does not support
determining executable automatically.  Try using the "file" command.
0x41c0943c in ?? ()
─── Assembly ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 0x41c0943c  ? b.n      0x41c0943c
 0x41c0943e  ? nop
 0x41c09440  ? cmp      r7, #139        ; 0x8b
 0x41c09442  ? rors     r3, r0
 0x41c09444  ? push     {r4, r5, r6, lr}
 0x41c09446  ? mov      r6, r1
 0x41c09448  ? add.w    r1, r0, #63     ; 0x3f
 0x41c0944c  ? mov      r5, r0
 0x41c0944e  ? bic.w    r1, r1, #63     ; 0x3f
 0x41c09452  ? movs     r0, #64 ; 0x40
─── Breakpoints ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── Expressions ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── History ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── Memory ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── Registers ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
No registers to show (check the "dashboard registers -style list" attribute)
─── Source ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── Stack ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[0] from 0x41c0943c
─── Threads ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[1] id 0 from 0x41c0943c
─── Variables ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
>>>

如上所示、程序计数器卡在: CPSR:0x200001f3 PC:0x41c0943c

您可以帮助解决这个问题吗?

此致、

/Bo

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

    您好!

    您能否告诉我们、您的定制电路板是否具有 GP 或 HS-DRA829V FS?

    另外、请查看 https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-jacinto7/10_01_00_04/exports/docs/linux/Foundational_Components U1002-Boot/UG-DFU.html 

    谢谢。

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

    您好 Praveen、

    我已尝试过 FS 和 GP 型号。 它们都不会引导到 sysfw.itb 之外
    使我怀疑内存设置问题。

    您发布的链接描述了我们用来查看的内容。 工作的 DFU 流程。 使用 U-Boot 2024.04时、我们卡滞了。

    此致、

    /Bo

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

    请注意、sysfw.该 文件是特定于每个变体的、因此请为 DFU 选择正确的文件。

    您是否使用 TI.com 上提供的预构建的引导二进制文件? 如果是、可以指向您正在使用的发布二进制文件吗?

    我们刚刚使用 DFU 引导在我们的 TI EVM 上验证了 SDK 10.1提供的引导文件、它运行正常。

    谢谢。

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

    我们正在构建自己的启动文件,自两年多以来,我已经更新了固件的配方到最新的 sdk10 scarthgap 标签。

    我知道 DM 和 TIFS 固件是专有的、但您如何期望客户能够在没有任何调试输出或源代码的情况下进行调试?

    我唯一的线索是上面提到的电脑,没有告诉我任何东西,因为我没有任何符号文件。

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

    是否支持任何其他引导模式?

    通常、TIFS 与平台无关。 在定制电路板上使用该工具时一定不能看到任何问题。 我们之所以这样说、是基于  已在其平台上安装了 SDK 10的其他客户使用此工具的经验。

    [quote userid="551261" url="~/support/processors-group/processors/f/processors-forum/1488154/dra829v-boot-problems-going-from-2023-04-to-2024-04主调试端口上没有调试输出。

    由于您在 UART 上未看到任何打印内容、因此我们怀疑这可能主要是您修改 MCU R5F SPL 代码(tiboot3.bin 文件)所特有的内容。 希望您使用的是库存 sysfw.itb 文件?  

    [报价 userid="551261" url="~/support/processors-group/processors/f/processors-forum/1488154/dra829v-boot-problems-going-from-2023-04-to-2024-04 "]如上所示、程序计数器停留在: CPSR:0x200001f3 PC:0x41c0943c

    这是加载 SPL 代码的 MSRAM 地址、因此建议查看 tiboot3.bin 的映射文件中的函数、确定它要停止的位置。

    谢谢。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您是否支持任何其他引导模式?

    正常从 QSPI 引导。 在 DFU 过程中、我们将四个引导文件复制到 QSPI 闪存中、以便在正常引导时使用。

    希望您使用库存 sysfw.itb 文件?  [报价]

    我们的 sysfw.itb 是在从 binman 文件构建期间汇编的。 它看起来是这样的:

    bomellberg@bosse-buildcom:~/se3linux/yocto-base/build/tmp/deploy/images/asp3$ dumpimage -l sysfw-asp3-hs-fs.itb
    FIT description: SYSFW and Config fragments
    Created:         Mon Mar 17 16:46:20 2025
     Image 0 (sysfw.bin)
      Description:  sysfw
      Created:      Mon Mar 17 16:46:20 2025
      Type:         Firmware
      Compression:  uncompressed
      Data Size:    263828 Bytes = 257.64 KiB = 0.25 MiB
      Architecture: ARM
      OS:           Unknown OS
      Load Address: unavailable
     Image 1 (board-cfg.bin)
      Description:  board-cfg
      Created:      Mon Mar 17 16:46:20 2025
      Type:         Firmware
      Compression:  uncompressed
      Data Size:    29 Bytes = 0.03 KiB = 0.00 MiB
      Architecture: ARM
      OS:           Unknown OS
      Load Address: unavailable
     Image 2 (pm-cfg.bin)
      Description:  pm-cfg
      Created:      Mon Mar 17 16:46:20 2025
      Type:         Firmware
      Compression:  uncompressed
      Data Size:    2 Bytes = 0.00 KiB = 0.00 MiB
      Architecture: ARM
      OS:           Unknown OS
      Load Address: unavailable
     Image 3 (rm-cfg.bin)
      Description:  rm-cfg
      Created:      Mon Mar 17 16:46:20 2025
      Type:         Firmware
      Compression:  uncompressed
      Data Size:    3710 Bytes = 3.62 KiB = 0.00 MiB
      Architecture: ARM
      OS:           Unknown OS
      Load Address: unavailable
     Image 4 (sec-cfg.bin)
      Description:  sec-cfg
      Created:      Mon Mar 17 16:46:20 2025
      Type:         Firmware
      Compression:  uncompressed
      Data Size:    349 Bytes = 0.34 KiB = 0.00 MiB
      Architecture: ARM
      OS:           Unknown OS
      Load Address: unavailable
    

    DM 和 SYSFW 版本在 ti-linux-fw.inc 文件中定义:

    # Firmware versions
    CORESDK_RTOS_VERSION = "08.02.00.04"
    PRUETH_FW_AM65X_VERSION = "08.00.00.20"
    PRUETH_FW_AM65X_SR2_VERSION = "02.02.13.00"
    GOODIX_FW_VERSION = "1.0.0.0"
    CADENCE_MHDP_FW_VERSION = "2.1.0"
    IMG_DEC_FW_VERSION = "1.0"
    CNM_WAVE521_FW_VERSION = "1.0.4"
    TI_DM_FW_VERSION = "10.00.01"
    TI_SYSFW_VERSION = "09.02.08"
    
    TI_LINUX_FW_SRCREV ?= "83d5c6a2349436185fb49922da40d4201fb8d2c3"
    SRCREV = "${TI_LINUX_FW_SRCREV}"
    
    BRANCH ?= "ti-linux-firmware"
    
    SRC_URI = "git://git.ti.com/git/processor-firmware/ti-linux-firmware.git;protocol=https;branch=${BRANCH}"
    

    使用的散列值是与 Yocto 的 Scarthgap 版本相对应的标记。

    [报价 userid="108768" url="~/support/processors-group/processors/f/processors-forum/1488154/dra829v-boot-problems-going-from-2023-04-to-2024-04/5715786 #5715786"]这是加载 SPL 代码的 MSRAM 地址、因此建议查看 tiboot3.bin 的映射文件以找出停止的函数。

    好的、我会尝试找到它、然后回复给您。

    编辑:这些是我在构建系统中找到的映射文件:

    bomellberg@bosse-buildcom:~/se3linux/yocto-base/build$ cat ./tmp-k3r5/work/asp3_k3r5-poky-eabi/u-boot-ti-as3/2024.04+git/u-boot-ti-as3-2024.04+git/tiboot3_hs_fs.map
    ImagePos    Offset      Size  Name
    00000000  00000000  00044e4c  tiboot3_hs_fs
    00000000   00000000  000006d4  ti-secure-rom
    000006d4   000006d4  00044778  u-boot-spl
    
    bomellberg@bosse-buildcom:~/se3linux/yocto-base/build$ cat ./tmp-k3r5/work/asp3_k3r5-poky-eabi/u-boot-ti-as3/2024.04+git/u-boot-ti-as3-2024.04+git/sysfw_hs_fs.map
    ImagePos    Offset      Size  Name
    00000000  00000000  00040694  sysfw_hs_fs
    00000000   00000000  00000694  ti-fs-cert-fs.bin
    00000694   00000694  00040000  ti-fs-firmware-j721e-hs-fs-enc.bin

    我不能从这些中读出太多的内容。 感谢任何帮助。

    我还对 ti-linux-firmware 尝试了稍后的哈希值、DM 和 SYSFW 版本为10.01.08、但我仍在停止。

    EDIT2:检查 SPL u-boot-spl.map 会显示它卡在某个 lib/div64中:

     .text.__div64_32
                    0x41c093f6       0x70 lib/div64.o
                    0x41c093f6                __div64_32
    

    这可以告诉您什么吗?

    此致、

    /Bo

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

    将 u-boot-spl 文件加载到 gdb 中会显示它已在 hang()进程中挂起。 有道理的。

    >>> add-symbol-file ~/se3linux/yocto-base/build/tmp-k3r5/work/asp3_k3r5-poky-eabi/u-boot-ti-as3/2024.04+git/u-boot-ti-as3-2024.04+git/spl/u-boot-spl
    add symbol table from file "/home/bomellberg/se3linux/yocto-base/build/tmp-k3r5/work/asp3_k3r5-poky-eabi/u-boot-ti-as3/2024.04+git/u-boot-ti-as3-2024.04+git/spl/u-boot-spl"
    (y or n) y
    Reading symbols from /home/bomellberg/se3linux/yocto-base/build/tmp-k3r5/work/asp3_k3r5-poky-eabi/u-boot-ti-as3/2024.04+git/u-boot-ti-as3-2024.04+git/spl/u-boot-spl...
    >>> bt
    #0  hang () at /usr/src/debug/u-boot-ti-as3/2024.04+git/lib/hang.c:33
    #1  0x41c13436 in sysreset_walk_halt (type=type@entry=SYSRESET_COLD) at /usr/src/debug/u-boot-ti-as3/2024.04+git/drivers/sysreset/sysreset-uclass.c:110
    #2  0x41c1346a in do_reset (cmdtp=cmdtp@entry=0x0, flag=flag@entry=0, argc=argc@entry=0, argv=argv@entry=0x0) at /usr/src/debug/u-boot-ti-as3/2024.04+git/drivers/sysreset/sysreset-uclass.c:137
    #3  0x41c0a048 in panic_finish () at /usr/src/debug/u-boot-ti-as3/2024.04+git/lib/panic.c:29
    #4  0x41c0a054 in panic_str (str=str@entry=0x41c36755 "No serial driver found") at /usr/src/debug/u-boot-ti-as3/2024.04+git/lib/panic.c:38
    #5  0x41c1e1bc in serial_find_console_or_panic () at /usr/src/debug/u-boot-ti-as3/2024.04+git/drivers/serial/serial-uclass.c:152
    #6  serial_init () at /usr/src/debug/u-boot-ti-as3/2024.04+git/drivers/serial/serial-uclass.c:192
    #7  0x41c01a42 in preloader_console_init () at /usr/src/debug/u-boot-ti-as3/2024.04+git/common/spl/spl.c:831
    #8  0x41c007e2 in board_init_f (dummy=<optimized out>) at /usr/src/debug/u-boot-ti-as3/2024.04+git/arch/arm/mach-k3/j721e_init.c:306
    #9  0x41c01220 in _main () at /usr/src/debug/u-boot-ti-as3/2024.04+git/arch/arm/lib/crt0.S:127
    Backtrace stopped: previous frame identical to this frame (corrupt stack?)
    

    从回溯来看、好像我们的串行控制台设置有问题。

    您知道 U-Boot 版本2023.04至2024.04之间在这方面有何差异吗?

    此致、

    /Bo

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

    是的、现在已确认 DTS 中丢失了别名。

    添加

            serial0 = &wkup_uart0;
            serial1 = &mcu_uart0;
            serial2 = &main_uart0;
    启用串行控制台、并进一步执行引导过程:
    U-Boot SPL 2024.04-ti-gea67cbeaca21 (Mar 18 2025 - 10:37:12 +0000)
    SYSFW ABI: 4.0 (firmware rev 0x000a '10.1.6--v10.01.06 (Fiery Fox)')
    MISC init for esm@700000 failed: -19
    ESM PMIC init failed: -19
    Trying to boot from DFU
    #######################################################DOWNLOAD ... OK
    Ctrl+C to exit ...
    Authentication passed
    Authentication passed
    Authentication passed
    Loading Environment from nowhere... OK
    init_env from device 18 not supported!
    Authentication passed
    Authentication passed
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.10.0(release):v2.10.0-367-g00f1ec6b87-dirty
    NOTICE:  BL31: Built : 07:57:12, Oct 23 2024
    I/TC:
    I/TC: OP-TEE version: 4.2.0-dev (gcc version 13.3.0 (GCC)) #1 Tue Oct 22 10:29:57 UTC 2024 aarch64
    I/TC: WARNING: This OP-TEE configuration might be insecure!
    I/TC: WARNING: Please check optee.readthedocs.io/.../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.1.6--v10.01.06 (Fiery Fox)')
    I/TC: HUK Initialized
    I/TC: Activated SA2UL 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-gea67cbeaca21 (Mar 18 2025 - 10:37:12 +0000)
    SYSFW ABI: 4.0 (firmware rev 0x000a '10.1.6--v10.01.06 (Fiery Fox)')
    The value of PLL8_SS_CTRL register 0x80000001
    The value of PLL7_SS_CTRL register 0x80000001
    Successfully set the A72 clock frequency to 1000000000
    Successfully set the MSMC clock frequency to 500000000
    Trying to boot from DFU
    ############DOWNLOAD ... OK
    Ctrl+C to exit ...
    Authentication passed
    Authentication passed
    


    它现在卡在将其移交给 A72的过程中、但此线程可以关闭。 感谢您的帮助!
    /Bo