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.

AM625: SK-AM62x-LP Flash U-Boot to eMMC Cannot boot from boot0

Part Number: AM625

Tool/software:

I tested the WIC file with an SD card and it is good. I need to start from EMMC now. The link I referenced is Flash Linux to eMMC (ti.com),the final saveenv was replaced with boot . modify am62x.env  mmcdev = 0

U-Boot SPL 2023.04-ti-g836606420854 (May 09 2024 - 05:42:45 +0000)
SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.8--v09.02.08 (Kool Koala)')
SPL initial stack usage: 1856 bytes
Trying to boot from MMC1
Authentication passed
Authentication passed


U-Boot 2023.04-ti-g836606420854 (May 09 2024 - 05:42:45 +0000)

SoC: AM62X SR1.0 HS-FS
Model: Texas Instruments AM62x LP SK
EEPROM not available at 80, trying to read at 81
Board: AM62-LP-SKEVM rev E2
DRAM: 2 GiB
Core: 81 devices, 33 uclasses, devicetree: separate
NAND: 0 MiB
MMC: mmc@fa10000: 0, mmc@fa00000: 1
Loading Environment from nowhere... OK
In: serial
Out: serial
Err: serial
Net: eth0: ethernet@8000000port@1
Hit any key to stop autoboot: 0
=> mmc list
mmc@fa10000: 0
mmc@fa00000: 1
=> printenv partitions
partitions=name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs}
=> mmc part

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

Part Start LBA End LBA Name
Attributes
Type GUID
Partition GUID
1 0x00001000 0x01da3fde "rootfs"
attrs: 0x0000000000000000
type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
guid: 6789e4c7-df5b-47dd-b262-746320c32939
=> <INTERRUPT>
=> boot
switch to partitions #0, OK
mmc1 is current device
SD/MMC found on device 1
Failed to load 'boot.scr'
574 bytes read in 10 ms (55.7 KiB/s)
Loaded env from uEnv.txt
Importing environment from mmc1 ...
## Error: "main_cpsw0_qsgmii_phyinit" not defined
19376640 bytes read in 239 ms (77.3 MiB/s)
59264 bytes read in 12 ms (4.7 MiB/s)
Working FDT set to 88000000
## Flattened Device Tree blob at 88000000
Booting using the fdt blob at 0x88000000
Working FDT set to 88000000
Loading Device Tree to 000000008feee000, end 000000008fffffff ... OK
Working FDT set to 8feee000

Starting kernel ...

.........

root@am62xx-lp-evm:~#
root@am62xx-lp-evm:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
mtdblock0 31:0 0 512K 0 disk
mtdblock1 31:1 0 2M 0 disk
mtdblock2 31:2 0 4M 0 disk
mtdblock3 31:3 0 256K 0 disk
mtdblock4 31:4 0 256K 0 disk
mtdblock5 31:5 0 95.8M 0 disk
mtdblock6 31:6 0 256K 0 disk
mmcblk0 179:0 0 14.8G 0 disk
`-mmcblk0p1 179:1 0 14.8G 0 part /run/media/rootfs-mmcblk0p1
mmcblk0boot0 179:32 0 31.5M 1 disk
mmcblk0boot1 179:64 0 31.5M 1 disk
mmcblk1 179:96 0 29.7G 0 disk
|-mmcblk1p1 179:97 0 128M 0 part /run/media/boot-mmcblk1p1
`-mmcblk1p2 179:98 0 29.6G 0 part /
root@am62xx-lp-evm:~#

Question 1: It seems that I am missing the saveenv command and the start run is also displayed boot from MMC2. I saw a related issue on the forum and modified the mmcdev=0
bootpart=0:1 of am62x.env to display that it starts from mmc1. Are these modifications correct?
Question 2: Now the boot starts from MMC1, but still requires an SD card. Finally, it can be seen from the kernel  “/run/media/boot-mmcblk1p1”
Question 3: I currently only have rootfs partitions and seem to be missing boot partitions. Is this the reason for problem 2?
  • Hello,

    To boot from the eMMC, you would need to run the following commands

    => setenv mmcdev 0
    => setenv bootpart 0:1
    => boot

    If you want to automatically boot from the eMMC every time, you may apply the following patch in the U-Boot

    diff --git a/board/ti/am62x/am62x.env b/board/ti/am62x/am62x.env
    index 32c96d83e8b..ae8ff0432b0 100644
    --- a/board/ti/am62x/am62x.env
    +++ b/board/ti/am62x/am62x.env
    @@ -14,8 +14,8 @@ run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}
     
     boot_targets=mmc1 mmc0 usb pxe dhcp
     boot=mmc
    -mmcdev=1
    -bootpart=1:2
    +mmcdev=0
    +bootpart=0:1
     bootdir=/boot
     rd_spec=-
     
    

    Regards,

    Prashant