Hi Peter & Philippe,

On Tue, Feb 18, 2020 at 11:05 AM Peter Maydell <peter.mayd...@linaro.org>
wrote:

> On Tue, 18 Feb 2020 at 06:46, Philippe Mathieu-Daudé <phi...@redhat.com>
> wrote:
> > IIRC from the specs, cards are block devices and the only alignment
> > required is the size of a block (512KiB for your 4GiB card).
>
> Isn't there something related to erase blocks too, which impose
> a larger granularity than just a single block?
>
> Anyway, in general the backing image for an SD card device
> needs to be exactly the size of the SD card you're emulating,
> because QEMU needs somewhere it can write back the data
> if the guest decides to write to the last block on the card.
> So short-length images generally don't work (true for all
> block devices, not just SD cards, I think). This often bites users
> if they're using some distro "here's a disk/sd card image file"
> where the expected use with real hardware is "dd the image
> file onto the SD card".
>

Yes, the description you gave here is indeed the issue.
And unfortunately in this particular case, the distro did not give a very
understandable
diagnostic error message.

Kind regards,
Niek


>
> thanks
> -- PMM
>


-- 
Niek Linnenbank

Reply via email to