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.

PROCESSOR-SDK-AM64X: Updating U-Boot to run from eMMC (MMC0) instead of SD card (MMC1) on AM64x-EVM

Part Number: PROCESSOR-SDK-AM64X


Tool/software:

Hi,

The U-Boot provided with the Processor SDK 10.00.07.04 is configured to launch Linux from SD card (MMC1) and doesn't have saveenv enabled so I've modified board-support/ti-boot/board/ti/am64x/am64x.env to launch from MMC0 as follows

-mmcdev=1
-bootpart=1:2
+mmcdev=0
+bootpart=0:1
and then used bitbake to rebuild u-boot , confirmed that the timestamp on u-boot-am64xx-evm.img and tispl.bin-am64xx-evm have both been updated and reflashed both to the boot0 partition. I'm guess I didn't need to reflash tispl.bin but did that just to be on the safe side.
This is what happens when the EVM boots though
þ
U-Boot SPL 2024.04-ti-gfda88f8bcea3 (Jul 26 2024 - 11:00:12 +0000)
Resetting on cold boot to workaround ErrataID:i2331
Please resend tiboot3.bin in case of UART/DFU boot
resetting ...

U-Boot SPL 2024.04-ti-gfda88f8bcea3 (Jul 26 2024 - 11:00:12 +0000)
SYSFW ABI: 4.0 (firmware rev 0x000a '10.0.8--v10.00.08 (Fiery Fox)')
SPL initial stack usage: 13392 bytes
Trying to boot from MMC1
Authentication passed
Authentication passed
Loading Environment from MMC... *** Warning - bad CRC, using default environment

init_env from device 9 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 : 16:09:05, Feb  9 2024
I/TC:
I/TC: OP-TEE version: 4.2.0-dev (gcc version 13.3.0 (GCC)) #1 Fri Apr 12 09:51:21 UTC 2024 aarch64
I/TC: WARNING: This OP-TEE configuration might be insecure!
I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/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.0.8--v10.00.08 (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-gfda88f8bcea3 (Jul 26 2024 - 11:00:12 +0000)
SYSFW ABI: 4.0 (firmware rev 0x000a '10.0.8--v10.00.08 (Fiery Fox)')
Trying to boot from MMC1
Authentication passed
Authentication passed


U-Boot 2024.04-ti-gfda88f8bcea3 (Jul 26 2024 - 11:00:12 +0000)

SoC:   AM64X SR2.0 HS-FS
Model: Texas Instruments AM642 EVM
Board: AM64-EVM rev C
DRAM:  2 GiB
Core:  98 devices, 31 uclasses, devicetree: separate
NAND:  0 MiB
MMC:   mmc@fa10000: 0, mmc@fa00000: 1
Loading Environment from nowhere... OK
In:    serial@2800000
Out:   serial@2800000
Err:   serial@2800000
Net:   eth0: ethernet@8000000port@1, eth2: icssg1-eth-port@0
Hit any key to stop autoboot:  0
MMC: no card present
MMC: no card present
** Bad device specification mmc 1 **
MMC: no card present
** Bad device specification mmc 1 **
Couldn't find partition mmc 1:2
Can't set block device
MMC: no card present
** Bad device specification mmc 1 **
Couldn't find partition mmc 1:2
Can't set block device
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
No FDT memory address configured. Please configure
the FDT address via "fdt addr <address>" command.
Aborting!
Bad Linux ARM64 Image magic!
Scanning for bootflows in all bootdevs
Seq  Method       State   Uclass    Part  Name                      Filename
---  -----------  ------  --------  ----  ------------------------  ----------------
Scanning global bootmeth 'efi_mgr':
MMC: no card present
No EFI system partition
No EFI system partition
Failed to persist EFI variables
No EFI system partition
Failed to persist EFI variables
No EFI system partition
Failed to persist EFI variables
  0  efi_mgr      ready   (none)       0  <NULL>
** Booting bootflow '<NULL>' with efi_mgr
Loading Boot0000 'mmc 0' failed
EFI boot manager: Cannot load any image
Boot failed (err=-14)
Scanning bootdev 'mmc@fa00000.bootdev':
MMC: no card present
MMC: no card present
MMC: no card present
MMC: no card present
Scanning bootdev 'mmc@fa10000.bootdev':
No working controllers found
link up on port 1, speed 1000, full duplex
BOOTP broadcast 1
DHCP client bound to address 192.168.10.6 (114 ms)
Scanning bootdev 'port@1.bootdev':
missing environment variable: pxeuuid
Retrieving file: pxelinux.cfg/01-34-08-e1-80-b7-b3
link up on port 1, speed 1000, full duplex
Using ethernet@8000000port@1 device
TFTP from server 192.168.10.1; our IP address is 192.168.10.6
Filename 'pxelinux.cfg/01-34-08-e1-80-b7-b3'.
Load address: 0x80100000
Loading: *
What do I need to do to get it to boot from MMC0 successfully ?
Yes I know I can break into U-boot every time and do
U-Boot # setenv mmcdev 0
U-Boot # setenv bootpart 0
U-Boot # boot
but I want U-Boot to boot from eMMC everytime without having to break into the console and reconfigure it on every boot.
Thanks,
Jon