[PATCH v2] cmd: mmc: add mmcboot command

Marek Vasut marex at denx.de
Mon Jan 4 20:56:37 CET 2021

On 1/4/21 7:40 PM, Ravik Hasija wrote:
> Similar to usbboot, add command line to boot from raw mmc partition
> using common_diskboot(), which supports legacy or FIT images.
> Usage:
> mmcboot [loadAaddr] [dev:part]
> Where [loadAddr] defaults to CONFIG_SYS_LOAD_ADDR, and [dev:part]
> defaults to ${bootdevice}.
> Also fixing config macro usage for CONFIG_SUPPORT_EMMC_BOOT (suggested
> by checkpatch.pl).

Can this not be implemented by some U-Boot script ?
I can imagine that reading the first few bytes from the partition (mmc 
read) would permit you to obtain the uImage/fitImage header from the 
partition, from which you can obtain the image size, which is the total 
number of bytes to read (iminfo might help , or fdt header), and then 
read out the entire image and bootm it.

More information about the U-Boot mailing list