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.
Dear TI Community,
I have successfully burned eMMC from an SD boot, following the method outlined in the documentation found at
https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/08_06_00_42/exports/docs/linux/Foundational_Components/U-Boot/UG-Memory.html.
It needs to type following cmd once manually to boot from eMMC.
=> setenv mmcdev 0 => setenv bootpart 0
This manual intervention is not acceptable for my product development's compatibility.
There may be a need to revise or update the ENV variables when upgrading the product in the customer's factory. There is a risk of unexpectedly reverting ENV to boot from SD.
Is there a method available to automatically determine different values for "mmcdev" and "bootpart" based on whether it's an SD boot or an eMMC boot?
For example:
sd boot -> mmcdev = 1, bootpart = 1:2
eMMC boot -> mmcdev = 0, bootpart = 0:2 or 0:3
I appreciate your prompt response.
I'd probably update the U-Boot default environment directly to whatever is your preferred boot method by updating this (or equivalent) source section below, which is usually done during the board port process:
/* U-Boot MMC-specific configuration */ #define EXTRA_ENV_AM625_BOARD_SETTINGS_MMC \ "boot=mmc\0" \ "mmcdev=1\0" \ "bootpart=1:2\0" \ "bootdir=/boot\0" \ "rd_spec=-\0" \ "init_mmc=run args_all args_mmc\0" \ "get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}\0" \ "get_overlay_mmc=" \ "fdt address ${fdtaddr};" \ "fdt resize 0x100000;" \ "for overlay in $name_overlays;" \ "do;" \ "load mmc ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && " \ "fdt apply ${dtboaddr};" \ "done;\0" \ "get_kern_mmc=load mmc ${bootpart} ${loadaddr} " \ "${bootdir}/${name_kern}\0" \ "get_fit_mmc=load mmc ${bootpart} ${addr_fit} " \ "${bootdir}/${name_fit}\0" \ "partitions=" PARTS_DEFAULT
Is there a method available to automatically determine different values for "mmcdev" and "bootpart" based on whether it's an SD boot or an eMMC boot?
You'd need to add some code to do this; this isn't readily available. On a high-level, it could work as follows:
Regards, Andreas