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.

[参考译文] AM5708:无法从 eMMC 启动 u-boot

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

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1217952/am5708-u-boot-not-coming-up-from-emmc

器件型号:AM5708

您好!

我们正在使用基于 am5708和使用的定制电路板 TI-PROCESSOR-SDK-LINUX-am57xx-hs-EVM-08_02_01_00。

我们使用 SDK 生成了 MLO、u-boot.img、kernel 和 rootfs。  

我们将由 SDK 生成的 WIC 映像刷写到 SD 卡上、电路板的引导过程会非常顺利。 以下是分区方案:

Disk /dev/mmcblk1: 30 GB, 31914983424 bytes, 62333952 sectors
486984 cylinders, 4 heads, 32 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device       Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/mmcblk1p1 *  384,0,1     639,3,32         49152      81919      32768 16.0M  c Win95 FAT32 (LBA)
/dev/mmcblk1p2    640,0,1     1023,3,32        81920    4095999    4014080 1960M 83 Linux
/dev/mmcblk1p3    1023,3,32   1023,3,32      4096000    8110079    4014080 1960M 83 Linux
/dev/mmcblk1p4    1023,3,32   1023,3,32      8110080    8372223     262144  128M 83 Linux

我们将同一 WIC 映像复制到 SD 卡上、并将其闪存(使用"dd"命令)复制到 eMMC 上。 它还具有类似的分区方案。

Disk /dev/mmcblk0: 7456 MB, 7818182656 bytes, 15269888 sectors
119296 cylinders, 4 heads, 32 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device       Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/mmcblk0p1 *  384,0,1     639,3,32         49152      81919      32768 16.0M  c Win95 FAT32 (LBA)
/dev/mmcblk0p2    640,0,1     1023,3,32        81920    4095999    4014080 1960M 83 Linux
/dev/mmcblk0p3    1023,3,32   1023,3,32      4096000    8110079    4014080 1960M 83 Linux
/dev/mmcblk0p4    1023,3,32   1023,3,32      8110080    8372223     262144  128M 83 Linux

但 u-boot 不能与 eMMC 一起提供。 它在 SPL 停止、以下是日志:

PPA 4.6.4 (GCC Build - Sep 24 2020 - 16:41:23)
Supports ALL DRA7x, TDA2x, and AM57x devices
Detected device: 05841e21 HS
!ONLY PUBLIC DEBUG ON!
!OBFUSCATOR ON!
!TEE Load API SUPPORTED!
SEC_STATUS = 0x23820081
SEC_CTRL   = 0x00010203
SEC_EMU    = 0x000007fc
SEC_TAP    = 0x00002607

U-Boot SPL 2021.01-g91d7e1a7ab (Apr 10 2023 - 09:38:44 +0000)
DRA722-HS ES2.1
Trying to boot from MMC2_2
** Partition 1 not valid on device 1 **
spl_register_fat_device: fat register err - -1
spl_load_image_fat: error reading image u-boot.img, err - -1
spl: no partition table found
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

我尝试访问此链接:

https://software-dl.ti.com/processor-sdk-linux/esd/docs/06_03_00_106/linux/Foundational_Components_U-Boot.html#booting-mlo-and-u-boot-from-emmc-boot-partition

但最终遇到了以下安全事件:

PPA 4.6.4 (GCC Build - Sep 24 2020 - 16:41:23)
Supports ALL DRA7x, TDA2x, and AM57x devices
Detected device: 05841e21 HS
!ONLY PUBLIC DEBUG ON!
!OBFUSCATOR ON!
!TEE Load API SUPPORTED!
SEC_STATUS = 0x2282f8a2
SEC_CTRL   = 0x00010203
SEC_EMU    = 0x000007fc
SEC_TAP    = 0x00002607

U-Boot SPL 2021.01-g91d7e1a7ab (Apr 10 2023 - 09:38:44 +0000)
DRA722-HS ES2.1
Trying to boot from MMC2_2
no pinctrl state for default mode

-- NON SECURE CODE GENERATED A SECURITY VIOLATION --
-- WARNING: violation might be due to speculative accesses. Check L3 interconnect
-- PPA cleans FW and CONTROL module registers & let the NS alive.
CONTROL_SEC_ERR_STATUS_FUNC = 00000800
CONTROL_SEC_ERR_STATUS_FUNC_2 = 00000000

Interrupted context:
r0=4037f064, r1=81fffe54, r2=4037bc24, r3=80800000, 
r4=81fffee4, r5=4031df6e, r6=00000000, r7=4031754f, 
r8=81fffee0, r9=81ffff20, r10=fffff44b, r11=00000000, 
r12=81f003d0, lr_fiq=40301370, spsr_fiq=200001d7

Before Violation, SW was in abort handler
SP_abt=00000000, LR_abt=80832410, spsr_abt=200001d3


SCM FW: violation description
  Data Write Violation

SCM FW Error Log:
  [Register Addr (32b)] = Err log value (32b)
  [0x48280000] = 0x00000000
  [0x48280004] = 0x00000000
  [0x48280008] = 0x00000000
  [0x48280010] = 0x00400004
  [0x48280014] = 0x00000000
  [0x48280018] = 0xffffffff

供参考:

=> mmc list
OMAP SD/MMC: 0 (SD)
OMAP SD/MMC: 1 (eMMC)


=> mmc dev
switch to partitions #0, OK
mmc0 is current device

=> mmc info
Device: OMAP SD/MMC
Manufacturer ID: 3
OEM: 5344
Name: SD32G 
Bus Speed: 48000000
Mode: SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 29.7 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes


=> mmc dev 1
switch to partitions #0, OK
mmc1(part 0) is current device

=> mmc info
Device: OMAP SD/MMC
Manufacturer ID: 13
OEM: 14e
Name: S0J35 
Bus Speed: 48000000
Mode: MMC High Speed (52MHz)
Rd Block Len: 512
MMC version 5.1
High Capacity: Yes
Capacity: 7.3 GiB
Bus Width: 8-bit
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 7.3 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
=> 

请帮助我解决此问题。

谢谢你