[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v42 96/98] hw/sd/sdcard: Support boot area in emmc image
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [RFC PATCH v42 96/98] hw/sd/sdcard: Support boot area in emmc image |
Date: |
Mon, 8 Jul 2024 18:58:07 +0200 |
User-agent: |
Mozilla Thunderbird |
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?)
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/hw/sd/sd.h | 1 +
hw/sd/sd.c | 39 +++++++++++++++++++++++++++++++++++++++
2 files changed, 40 insertions(+)
- Re: [RFC PATCH v42 96/98] hw/sd/sdcard: Support boot area in emmc image,
Philippe Mathieu-Daudé <=