Hi,
I've been trying to get the latest Bookworm image (A20-OLinuXino-bookworm-minimal-20260323-113959) running on a T2-OLinuXino-LIME2-e8Gs16M-IND Rev.L, installed to eMMC using `olinuxino-sd-to-emmc`. The board boots fine from SD card but fails to boot standalone from eMMC. After some digging via UART I found a few things that might be related and wanted to share them in case anyone has run into the same situation.
1. fdtfile in uboot.env template
`/usr/lib/u-boot-olinuxino/a20-olinuxino/uboot.env` contains:
fdtfile=sun7i-a20-olinuxino-micro.dtb
The EEPROM is read correctly at boot (board identified as T2-OLinuXino-LIME2) but the environment template seems to override this with the MICRO dtb, which causes the kernel to fail finding the root filesystem. Adding `fdtfile=sun7i-a20-olinuxino-lime2.dtb` to `/boot/uEnv.txt` works around this.
2. saveenv fails due to metadata_csum
When trying to fix things from the U-Boot prompt, saving the environment fails:
Saving Environment to EXT4... Unsupported feature metadata_csum found, not writing.
** Unable to write "/uboot.env" from mmc1:1 **
This means any changes made at the U-Boot prompt are lost on reboot, which makes recovery quite difficult.
3. fdtoverlays in uEnv.txt
The default `uEnv.txt` contains a list of overlays in `fdtoverlays=` which produce the following at boot:
failed on fdt_overlay_apply(): FDT_ERR_NOTFOUND
base fdt does did not have a /__symbols__ node
make sure you've compiled with -@
Could not find a valid device tree
After this the boot script fails and the board falls through to PXE/network boot. Clearing `fdtoverlays=` in `uEnv.txt` resolves this.
Current workaround
With both fixes applied to `uEnv.txt` (empty `fdtoverlays` and correct `fdtfile`), the board boots correctly when an SD card with the same image is present. The SD card U-Boot loads `uEnv.txt` from the eMMC and everything works. For now I am using the SD card as a bootloader carrier with the eMMC as root filesystem, which is functional but not ideal.
Any suggestions on how to get the eMMC to boot standalone would be much appreciated. In particular I am wondering whether there is a way to update the eMMC U-Boot to a version that handles `metadata_csum`, or whether the uboot.env template is expected to be board-specific.
Board info from U-Boot:
ID: T2-OLinuXino-LIME2-e8Gs16M-IND Rev.L
U-Boot 2021.04+olimex-1-20250305.102147
Thanks