qemu-devel
[Top][All Lists]
Advanced

[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: Cédric Le Goater
Subject: Re: [RFC PATCH v42 96/98] hw/sd/sdcard: Support boot area in emmc image
Date: Mon, 8 Jul 2024 22:29:35 +0200
User-agent: Mozilla Thunderbird

On 7/8/24 6:58 PM, Philippe Mathieu-Daudé wrote:
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.

This is the same device with multiple partitions. Why would you
want to have 3 backends ? The sizes are defined in an EXT_CSD
register AFAIR.

   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?)

we don't.

Thanks,

C.




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(+)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]