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.

AM572x GP EVM 开发板如何从emmc格式化分区以及启动

Other Parts Discussed in Thread: BEAGLEBOARD-X15, AM5728

我们从ti 获取到一块 AM572x Evaluation 开发板进行评估,板子可以从SD卡启动和运行。可是我们从emmc中启动时却出现了问题。

 

我们按照 <<AM572x Evaluation Module Quick Start Guide>>连接 J3,J4,J6确定启动模式,并插入SD卡,从SD卡启动uboot

 

在主机上运行

longdunmei@GZ-20180119 ~

$ uuidgen

811f1381-7e9c-4928-9b62-20897f4a4261

 

longdunmei@GZ-20180119 ~

$ uuidgen

3a68a76c-e2ee-4ba3-90bd-6c025df6e785

longdunmei@GZ-20180119 ~

$

 

Uboot

 

U-Boot SPL 2019.01-g333c3e72d3 (Apr 20 2020 - 05:48:48 +0000)

DRA752-GP ES2.0

no pinctrl state for default mode

** Unable to read file dra7-ipu1-fw.xem4 **

Firmware loading failed

Trying to boot from MMC1

no pinctrl state for default mode

Loading Environment from FAT... OK

 

 

U-Boot 2019.01-g333c3e72d3 (Apr 20 2020 - 05:48:48 +0000)

 

CPU  : DRA752-GP ES2.0

Model: TI AM5728 BeagleBoard-X15

Board: AM572x EVM REV A.3A

DRAM:  2 GiB

MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1

Loading Environment from FAT... OK

Net:   eth0: ethernet@48484000

Hit any key to stop autoboot:  0

=>

=>

=> printenv partitions

partitions=uuid_disk=${uuid_gpt_disk};name=bootloader,start=384K,size=1792K,uuid=${uuid_gpt_bootloader};name=rootfs,start=2688K,size=-,uuid=${uuid_gpt_rootfs}

=> setenv uuid_gpt_disk  811f1381-7e9c-4928-9b62-20897f4a4261

=> setenv uuid_gpt_rootfs  3a68a76c-e2ee-4ba3-90bd-6c025df6e785

=> gpt write mmc 1 ${partitions}

Writing GPT: success!

=> env save

Saving Environment to FAT... OK

=> mmc part

 

Partition Map for MMC device 0  --   Partition Type: DOS

 

Part    Start Sector    Num Sectors     UUID            Type

  1     2048            143360          cf75671d-01     0c Boot

  2     145408          31244288        cf75671d-02     83

=> mmc dev 1

switch to partitions #0, OK

mmc1(part 0) is current device

=> mmc part

 

Partition Map for MMC device 1  --   Partition Type: DOS

 

Part    Start Sector    Num Sectors     UUID            Type

  1     1               7471103         00000000-01     ee

=>

=>

=>

 

=> mmc dev 0

switch to partitions #0, OK

mmc0 is current device

=> mmc rescan

=> mmc dev 1

switch to partitions #0, OK

mmc1(part 0) is current device

=> fatload mmc 0 ${loadaddr} MLO

157799 bytes read in 9 ms (16.7 MiB/s)

=> mmc write ${loadaddr} 0x100 0x100

 

MMC write: dev # 1, block # 256, count 256 ... 256 blocks written: OK

=> mmc write ${loadaddr} 0x200 0x100

 

MMC write: dev # 1, block # 512, count 256 ... 256 blocks written: OK

=> fatload mmc 0 ${loadaddr} u-boot.img

1445892 bytes read in 66 ms (20.9 MiB/s)

=> mmc write ${loadaddr} 0x300 0x400

 

MMC write: dev # 1, block # 768, count 1024 ... 1024 blocks written: OK

=>

=>

=>

=>

=>

=>  mmc bootbus 1 2 0 2

=> mmc partconf 1 1 1 0

=> mmc rst-function 1 1

=>

=>

=>

=>

 

断电,拔掉SD卡,重新启动,没有任何反应。

 

 

 

 

 

  • 参考以下帖子看一下,是否有可能是没有将完整的img文件写进去。
    e2e.ti.com/.../788928
  • 我想知道这个过程是正确的吗?
    一般的步骤是怎么样的?

    1. 使用 gpt write mmc 1 ${partitions} 对emmc进行分区。

    2. 写入 MLO 和 uboot
    => fatload mmc 0 ${loadaddr} MLO
    => mmc write ${loadaddr} 0x100 0x100
    => fatload mmc 0 ${loadaddr} u-boot.img
    => mmc write ${loadaddr} 0x300 0x400
    3.
    => mmc bootbus 1 2 0 2
    => mmc partconf 1 1 1 0
    => mmc rst-function 1 1


    1. 是否少了 分区格式化的步骤?
    执行 mmc part mmc0 和emmc完全不同

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

    Partition Map for MMC device 1 -- Partition Type: EFI

    Part Start LBA End LBA Name
    Attributes
    Type GUID
    Partition GUID
    1 0x00000300 0x000010ff "bootloader"
    attrs: 0x0000000000000000
    type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
    guid: 21200400-0804-0146-9dcc-a8c51255994f
    2 0x00001500 0x0071ffde "rootfs"
    attrs: 0x0000000000000000
    type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
    guid: 3a68a76c-e2ee-4ba3-90bd-6c025df6e785
    => mmc dev 0
    switch to partitions #0, OK
    mmc0 is current device
    => mmc part

    Partition Map for MMC device 0 -- Partition Type: DOS

    Part Start Sector Num Sectors UUID Type
    1 2048 143360 cf75671d-01 0c Boot
    2 145408 31244288 cf75671d-02 83

    2.
    为什么 MLO 在emmc中的起始地址是 0x100 这是由什么确定的?



    3. 一般的步骤是怎么样的?
  • 1、参考以下链接进行分区,分区之后有没有重启一下设备。
    software-dl.ti.com/.../Foundational_Components_U-Boot.html
    A reset is required for the partition table to be visible.
    参考如下步骤。
    software-dl.ti.com/.../Foundational_Components_U-Boot.html
    地址的问题我再研究看一下。
  • 地址的问题我认为可参考手册33.3.7.6.4 Read Sector Procedure
    Raw mode is detected by reading sectors 0, 256, 512, and 768.
    www.ti.com/.../spruhz6l.pdf
  • 确实是 MLO没有写完整,被SDK误导了。

    => fatload mmc 0 ${loadaddr} MLO

    157799 bytes read in 9 ms (16.7 MiB/s)

    => mmc write ${loadaddr} 0x100 0x100

    MMC write: dev # 1, block # 256, count 256 ... 256 blocks written: OK

    => mmc write ${loadaddr} 0x200 0x100

    0x100  * 512 = 131072 < 157799

    我改了一下到 mmc write ${loadaddr} 0x100 0x200 就好了。

    但是遇见新的问题,

    U-Boot SPL 2019.01-g333c3e72d3 (Apr 20 2020 - 05:48:48 +0000)

    DRA752-GP ES2.0

    no pinctrl state for default mode

    Card did not respond to voltage select!

    Firmware loading failed

    Trying to boot from MMC2_2

    no pinctrl state for default mode

    Loading Environment from FAT... Card did not respond to voltage select!

    Loading Environment from MMC... *** Warning - bad CRC, using default environment

    U-Boot 2019.01-g333c3e72d3 (Apr 20 2020 - 05:48:48 +0000)

    CPU  : DRA752-GP ES2.0

    Model: TI AM5728 BeagleBoard-X15

    Board: AM572x EVM REV A.3A

    DRAM:  2 GiB

    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1

    Loading Environment from FAT... MMC: no card present

    Loading Environment from MMC... *** Warning - bad CRC, using default environment

    Net:  

    Warning: ethernet@48484000 using MAC address from ROM

    eth0: ethernet@48484000

    Hit any key to stop autoboot:  0

    =>                      

    =>

    => env save

    Saving Environment to FAT... MMC: no card present

    Failed (1)

    =>

    环境变量好像是保存在FAT和MMC0里面,怎么改到emmc?

  • 在uboot config文件中禁用CONFIG_ENV_IS_IN_FAT 选项,仅使能CONFIG_ENV_IS_IN_MMC试一下,参考以下帖子。
    e2e.ti.com/.../937592