Hi Joel, Cédric,
On 28/6/24 09:02, Philippe Mathieu-Daudé wrote:
From: Joel Stanley <joel@jms.id.au>
This assumes a specially constructed image:
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
I'm not keen on imposing that layout to use the model (besides
so far we use 1MiB as constant). I'd rather use 3 BlockBackends
for eMMC (boot[01], user). This would scale for multiple sizes.
truncate --size 16GB mmc.img
truncate --size 128MB mmc-bootarea.img
For now this still requires a mtd image to load the SPL:
qemu-system-arm -M tacoma-bmc -nographic \
-global driver=sd-card,property=emmc,value=true \
-drive file=mmc.img,if=sd,index=2 \
-drive file=mmc-bootarea.img,if=mtd,format=raw
(AFAICT we don't need that mtd anymore, correct?)