The machine options specific to Aspeed machines to boot from an eMMC
image are :
boot-emmcto set or unset boot from eMMC (AST2600).
Only the ast2600-evb and rainier-emmc machines have support to
boot from an eMMC device. In this case, the machine assumes that the
eMMC image includes special boot partitions. Such an image can be
built this way :
$ dd if=/dev/zero of=mmc-bootarea.img count=2 bs=1M
$ dd if=u-boot-spl.bin of=mmc-bootarea.img conv=notrunc
$ dd if=u-boot.bin of=mmc-bootarea.img conv=notrunc count=64 bs=1K
$ cat mmc-bootarea.img obmc-phosphor-image.wic > mmc.img
$ truncate --size 16GB mmc.img
Boot the machine rainier-emmc with :
$ qemu-system-arm -M rainier-bmc
-drive file=mmc.img,format=raw,if=sd,index=2
-nographic
The boot-emmc option can be set or unset, to change the default
boot mode of machine: SPI or eMMC. This can be useful to boot the
ast2600-evb machine from an eMMC device (default being SPI) or to
boot the rainier-bmc machine from a flash device (default being
eMMC).
As an example, here is how to to boot the rainier-bmc machine from
the flash device with boot-emmc=false and let the machine use an
eMMC image :
$ qemu-system-arm -M rainier-bmc,boot-emmc=false
-drive file=flash.img,format=raw,if=mtd
-drive file=mmc.img,format=raw,if=sd,index=2
-nographic
It should be noted that in this case the eMMC device must not have
boot partitions, otherwise the contents will not be accessible to the
machine. This limitation is due to the use of the -drive
interface.
Ideally, one should be able to define the eMMC device and the
associated backend directly on the command line, such as :
-blockdev node-name=emmc0,driver=file,filename=mmc.img
-device emmc,bus=sdhci-bus.2,drive=emmc0,boot-partition-size=1048576,boot-config=8
This is not yet supported (as of QEMU-10.0). Work is needed to
refactor the sdhci bus model.








