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-AM62B-P1:通过 USB_DFU 引导问题

Guru**** 2478805 points


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

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1459095/sk-am62b-p1-booting-issue-via-usb_dfu

器件型号:SK-AM62B-P1

工具与软件:

您好、TI 专家:
我通过 USB-DFU 模式对引导加载程序进行刷写、然后我必须转到 uboot 提示符并创建 eMMC 分区、但电路板无法引导。 我 使用 U-Boot 中的 GPT 支持将 GPT 分区表写入 eMMC。

我已附上日志,请找到它。

U-Boot SPL 2021.01 (Jul 14 2023 - 17:40:18 +0530)
SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
SPL initial stack usage: 13424 bytes
Trying to boot from DFU
###############################################DOWNLOAD ... OK
Ctrl+C to exit ...
Authentication passed
Authentication passed
Authentication passed
Authentication passed
Authentication passed
Loading Environment from MMC... MMC Device 0 not found
*** Warning - No MMC card found, using default environment
                                                                                                                      
init_env from device 10 not supported!                                                                                
Starting ATF on ARM64 core...                                                                                         
                                                                                                                      
NOTICE:  BL31: v2.8(release):v2.8-226-g2fcd408bb3-dirty                                                               
NOTICE:  BL31: Built : 05:06:58, Feb 24 2023

U-Boot SPL 2021.01 (Jul 14 2023 - 17:40:10 +0530)
SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
Trying to boot from DFU
####DOWNLOAD ... OK
Ctrl+C to exit ...
Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices


U-Boot 2021.01 (Jul 14 2023 - 17:40:10 +0530)

SoC:   AM62X SR1.0 HS-FS
Model: Texas Instruments AM625 SK
EEPROM not available at 0x50, trying to read at 0x51
Reading on-board EEPROM at 0x51 failed -1
DRAM:  2 GiB
MMC:   mmc@fa10000: 0, mmc@fa00000: 1, mmc@fa20000: 2
In:    serial@2800000
Out:   serial@2800000
Err:   serial@2800000
EEPROM not available at 0x50, trying to read at 0x51
Reading on-board EEPROM at 0x51 failed -1
Net:   Could not get PHY for ethernet@8000000port@1: addr 0
am65_cpsw_nuss_port ethernet@8000000port@1: phy_connect() failed
No ethernet found.

Hit any key to stop autoboot:  0 
#DOWNLOAD ... OK
Ctrl+C to exit ...
## Warning: Input data exceeds 1048576 bytes - truncated
## Info: input data size = 1048578 = 0x100002
##DOWNLOAD ... OK
Ctrl+C to exit ...
#####DOWNLOAD ... OK
Ctrl+C to exit ...
####DOWNLOAD ... OK
Ctrl+C to exit ...

suraj@suraj-HP-Laptop-15s-fr2xxx:/opt/ti-processor-sdk-linux-am62xx-evm-09.02.01.09/bin/DFU_flash$ sudo python3 dfu_flash.py -d am62xx-evm -t hsfs -c /opt/ti-processor-sdk-linux-am62xx-evm-09.02.01.09/bin/DFU_flash/bin/am62xx-evm/hsfs/flash-files.cfg
2025-01-08 13:38:34 INFO: Starting the flashing tool
2025-01-08 13:38:34 INFO: Validating the requirements before flashing...
2025-01-08 13:38:34 INFO: Validated the CLI arguments and the paths to the DFU boot binaries
2025-01-08 13:38:34 INFO: Parsing the flash configuration file {/opt/ti-processor-sdk-linux-am62xx-evm-09.02.01.09/bin/DFU_flash/bin/am62xx-evm/hsfs/flash-files.cfg}...
2025-01-08 13:38:34 INFO: Found 3 flash images
<<DFU_FLASH_CONF
----------------------- ------------------------------------------------- ------- -------- ----- ----------
                    Alt Path                                                 Size   Offset Media Attributes
----------------------- ------------------------------------------------- ------- -------- ----- ----------
tiboot3-am62x-hs-fs-evm /home/suraj/Downloads/tiboot3-am62x-hs-fs-evm.bin  295502      0x0 EMMC  raw,1,-   
                  tispl /home/suraj/Downloads/tispl.bin-am62xx-evm        1182907  0x80000 EMMC  raw,1,-   
      u-boot-am62xx-evm /home/suraj/Downloads/u-boot-am62xx-evm.img        968683 0x280000 EMMC  raw,1,-   
----------------------- ------------------------------------------------- ------- -------- ----- ----------
DFU_FLASH_CONF
2025-01-08 13:38:34 INFO: Found 4 boot images
<<DFU_BOOT_CONF
---------- ------------------------------------------------------------------------------------------------ ------
       Alt Path                                                                                               Size
---------- ------------------------------------------------------------------------------------------------ ------
bootloader /opt/ti-processor-sdk-linux-am62xx-evm-09.02.01.09/bin/DFU_flash/bin/am62xx-evm/hsfs/tiboot3.bin 333163
 tispl.bin /opt/ti-processor-sdk-linux-am62xx-evm-09.02.01.09/bin/DFU_flash/bin/am62xx-evm/hsfs/tispl.bin   960044
u-boot.img /opt/ti-processor-sdk-linux-am62xx-evm-09.02.01.09/bin/DFU_flash/bin/am62xx-evm/hsfs/u-boot.img  894876
  uEnv.txt /opt/ti-processor-sdk-linux-am62xx-evm-09.02.01.09/bin/DFU_flash/bin/am62xx-evm/hsfs/uEnv.txt       174
---------- ------------------------------------------------------------------------------------------------ ------
DFU_BOOT_CONF
2025-01-08 13:38:34 INFO: Number of USB DFU devices detected: 1
2025-01-08 13:38:34 INFO: Starting flashing for 1 identified devices
2025-01-08 13:38:34 INFO: Spawning 1 parallel processes
2025-01-08 13:38:35 INFO:             1-1 Sent! /opt/ti-processor-sdk-linux-am62xx-evm-09.02.01.09/bin/DFU_flash/bin/am62xx-evm/hsfs/tiboot3.bin
2025-01-08 13:38:38 INFO:             1-1 Sent! /opt/ti-processor-sdk-linux-am62xx-evm-09.02.01.09/bin/DFU_flash/bin/am62xx-evm/hsfs/tispl.bin
2025-01-08 13:38:42 INFO:             1-1 Sent! /opt/ti-processor-sdk-linux-am62xx-evm-09.02.01.09/bin/DFU_flash/bin/am62xx-evm/hsfs/u-boot.img
2025-01-08 13:38:47 INFO:             1-1 Sent! /opt/ti-processor-sdk-linux-am62xx-evm-09.02.01.09/bin/DFU_flash/bin/am62xx-evm/hsfs/uEnv.txt
2025-01-08 13:38:49 INFO:             1-1 Sent! /home/suraj/Downloads/tiboot3-am62x-hs-fs-evm.bin
2025-01-08 13:38:50 INFO:             1-1 Sent! /home/suraj/Downloads/tispl.bin-am62xx-evm
2025-01-08 13:38:51 INFO:             1-1 Sent! /home/suraj/Downloads/u-boot-am62xx-evm.img
2025-01-08 13:38:51 INFO:             1-1 Flashing Successful...
2025-01-08 13:38:51 INFO: Flashed 1 out of 1 identified devices successfully...
^C2025-01-08 13:40:06 INFO: Exiting!!!

我想问一下、我们是否可以通过 DFU 为引导加载程序刷写?  或者、我将必须通过 UART 进行刷写、因为我的最终目标是使用 DFU 完成整个过程、例如在 EMMC 中创建双分区和在两个分区中刷写双 rootfs。

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

    您好、TI 专家:

    eMMC 器件在发货时通常不带任何分区表。 我们利用 U-Boot 中的 GPT 支持向 eMMC 写入 GPT 分区表。 在这种情况下、我们需要使用  超棒  在主机上创建用于磁盘和每个分区的 UUID 的程序。

    $ uuidgen
    ...第一个 uid...
    $ uuidgen
    ...second uuuid...
    
    U-Boot # printenv partitions
    uuid_disk=${uuid_gpt_disk};name=rootfs、start=2mib、size=-、uuid=${uuid_gpt_rootfs}
    U-Boot # setenv uid_gpt_disk ...第一个 uuid...
    u-Boot # setenv uuuid_gpt_rootfs ...second uuid...
    U-Boot # GPT WRITE MMC ${partitions}/* 是否从 eMMC 列表获取了器件索引*/
    

    要显示分区表、需要进行重置。


    要创建 eMMC 分区、我必须转至 uboot 并创建分区表、但我无法转至 uboot、那么如何创建分区? 请告诉我解决方案。

    我已附上 uEnv.txt 的内容、请查看一下。

    user_commands=setenv dfu_alt_info "tiboot3-am62x-hs-fs-evm raw 0x0 0x242 mmcpart 1;tispl raw 0x400 0x907 mmcpart 1;u-boot-am62xx-evm raw 0x1400 0x764 mmcpart 1";dfu 0 mmc 0;

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

    Suraj、您好!

    您可以在 AM62x 的 DFU 引导中遵循以下指南: https://dev.ti.com/tirex/explore/node?node=A__AeVbwnGEP1NObR9gnw1lhA__AM62-ACADEMY__uiYMDcq__LATEST

    请注意、要启用 DFU 支持、您需要使用 defconfig am62x_r5_usbdfu.config 来重建 U-Boot、指南中也提到了这一点、请尝试这些步骤、如果您仍然遇到问题、请告知我。


    此致、

    开会。

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

    此外、如果您是第一次尝试从 eMMC 引导、则还需要执行3.1.1.4中提到的一些额外的 eMMC 配置步骤。 部分: https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/10_01_10_04/exports/docs/linux/Foundational_Components 454.U-Boot/UG-Memory-K3.html#eMMC-boot-configuration

    如果您是第一次启动、请确保您也遵循这些步骤。

    此致、

    开会。

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

    大家好、

    我的最终目标是通过 eMMC 各自分区中的 DFU 在 eMMC 和 Linux 映像中创建多个分区。
    那么、是否可以通过 DFU 而不是 SD 卡来实现一切?

    任务1:-
    要从任何 eMMC 引导、主器件(ROM)需要一些可以使用进行设置的配置  MMC bootbus   MMC partconf  地址接口命令。

    从 eMMC 的 boot0硬件分区引导:

    => MMC partconf 0 1 1 1
     => MMC bootbus 0 2 0 0 

    任务2:-
    我们利用 U-Boot 中的 GPT 支持向 eMMC 写入 GPT 分区表。
    U-Boot # printenv partitions
    uuid_disk=${uuid_gpt_disk};name=rootfs、start=2mib、size=-、uuid=${uuid_gpt_rootfs}
    U-Boot # setenv uid_gpt_disk ...第一个 uuid...
    u-Boot # setenv uuuid_gpt_rootfs ...second uuid...
    U-Boot # GPT WRITE MMC ${partitions}/* 是从 eMMC 列表获取的器件索引 
    因为要创建分区表、我必须转至 uboot 提示符并创建 GPT 分区表、 
    为此、我首先必须通过 DFU 闪存配置文件刷写引导加载程序。
    我使用的是 TI 处理器 SDK 版本09.02.01.09。
    我是否可以通过 DFU 引导模式而不是 SD 卡来执行上述两项任务
    因为新开发板无需从头开始进行任何工作。

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

    Suraj、您好!

    是的、可以直接使用 DFU 引导 u-boot。 即使在您在第一个说明中附加的日志中、您也可以看到刷写成功、因此您的过程是正确的。 您可以看到显示为 Ctrl+C 退出、因此一旦您按 Ctrl+C、您将看到 u-boot 提示符、之后您可以从 u-boot 提示符执行 eMMC 所需的所有设置、正如您在前面的响应中提到的那样。

    此致、

    开会。

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

    大家好、

    谢谢、它在工作。 现在我想问一个问题。 单个 rootfs 会发生这种情况、但如果我想刷写多个 rootfs、那么我必须在 eMMC 中为此分配多个分区。

    我是通过 GPT 工具分配空间、但在写入 eMMC 时显示 GPT 错误、因此请检查语法或分区变量格式是否错误。

    => printenv partitions
    partitions=uuid_disk=6f131349-ae01-4409-8b86-e5256c965aba
    => setenv part1 name=rootfs_1,start=2048,size=2095105,uuid=eb94bf6b-6865-4a8c-9fc2-45c1be45eda1
    => setenv part2 name=rootfs_2,start=2099200,size=29358081,uuid=5b247693-4f9b-40e2-88d4-d455664b5b55
    => setenv part3 name=data,start=31459328,size=30701568,uuid=91ebba34-f04d-4ab5-9b86-21a7d6f6902a
    => setenv partitions "uuid_disk=6f131349-ae01-4409-8b86-e5256c965aba;${part1};${part2};${part3};"
    => printenv partitions
    partitions=uuid_disk=6f131349-ae01-4409-8b86-e5256c965aba;name=rootfs_1,start=2048,size=2095105,uuid=eb94bf6b-6865-4a8c-9fc2-45c1be45eda1;name=rootfs_2,start=2099200,size=29358081,uuid=5b247693;
    => gpt write mmc 0 ${partitions}
    Writing GPT: error!
    => mmc dev 0
    switch to partitions #0, OK
    mmc0(part 0) is current device
    => mmc rescan
    => mmc info
    Device: mmc@fa10000
    Manufacturer ID: 13
    OEM: 4e
    Name: G1M15L 
    Bus Speed: 200000000
    Mode: HS200 (200MHz)
    Rd Block Len: 512
    MMC version 5.1
    High Capacity: Yes
    Capacity: 29.6 GiB
    Bus Width: 8-bit
    Erase Group Size: 512 KiB
    HC WP Group Size: 8 MiB
    User Capacity: 29.6 GiB WRREL
    Boot Capacity: 31.5 MiB ENH
    RPMB Capacity: 4 MiB ENH
    Boot area 0 is not write protected
    Boot area 1 is not write protected
    => gpt verify mmc 0
    No partition list provided - only basic check
    Verify GPT: error!
    => printenv partitions
    partitions=uuid_disk=6f131349-ae01-4409-8b86-e5256c965aba;name=rootfs_1,start=2048,size=2095105,uuid=eb94bf6b-6865-4a8c-9fc2-45c1be45eda1;name=rootfs_2,start=2099200,size=29358081,uuid=5b247693;
    => printenv partitions
    partitions=uuid_disk=6f131349-ae01-4409-8b86-e5256c965aba;name=rootfs_1,start=2048,size=2095105,uuid=eb94bf6b-6865-4a8c-9fc2-45c1be45eda1;name=rootfs_2,start=2099200,size=29358081,uuid=5b247693;
    => gpt write mmc 0 ${partitions}
    Writing GPT: error!
    

    请查看随附的日志、我的最终目标是按照以下方式创建:

    root@am62xx-evm:~# fdisk /dev/mmcblk0
    
    Welcome to fdisk (util-linux 2.37.4).
    Changes will remain in memory only, until you decide to write them.
    Be careful before using the write command.
    
    Device does not contain a recognized partition table.
    Created a new DOS disklabel with disk identifier 0x6dfd00a0.
    
    
    Command (m for help): p
    Disk /dev/mmcblk0: 29.64 GiB, 31826378752 bytes, 62160896 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x2dc2dfb8
    
    Device         Boot    Start      End  Sectors  Size Id Type
    /dev/mmcblk0p1          2048  2097152  2095105 1023M 83 Linux
    /dev/mmcblk0p2       2099200 31457280 29358081   14G 83 Linux
    /dev/mmcblk0p3      31459328 62160895 30701568 14.6G 83 Linux

    可能的问题:-

    1. partitions变量的格式不正确或无法识别。
    2. MMC 器件上的 GPT 结构已损坏或未正确初始化。
    3. MMC 器件无法访问或写入。

    此致、

    Suraj

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

    Suraj、您好!

    我将在我的 EVM 上测试此情况、并在有更新后尽快给您回复。

    此致、

    开会。

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

    大家好、

    感谢您的快速响应。 请告诉我、您的 EVM 上的情况如何。

    [报价 userid="600470" url="~/support/processors-group/processors/f/processors-forum/1459095/sk-am62b-p1-booting-issue-via-usb_dfu/5599588 #5599588"]

    从 eMMC 的 boot0硬件分区引导:

    => MMC partconf 0 1 1 1
     => MMC bootbus 0 2 0 0 
    [报价]

    我还想知道一点、如果我有一个全新的电路板、可以通过 DFU 直接配置引导 ROM 吗?

    此致、

    Suraj

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

    Suraj、您好!

    无法通过 DFU 或任何其他方式配置引导 ROM。 如前所述、可以将 eMMC 配置为首次通过 DFU 引导、而不配置引导 ROM。

    此致、

    开会。

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

    要在 eMMC 中创建多个 GPT 分区、您可以参考此主题并尝试执行此处提到的步骤: AM625:如何在适用于 Linux 的 TI AM625中创建分区。 -处理器论坛-处理器- TI E2E 支持论坛