qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] Using qemu to access a raw dump from a nand


From: Andre Cirne
Subject: Re: [Qemu-discuss] Using qemu to access a raw dump from a nand
Date: Wed, 10 Jul 2019 10:19:43 +0100

Thanks for the help!
I will have attention to the id option.
In relation to use a standard disk image, I did not try that, because I
think tha ubifs, which is the type of file system on the nand dump, does
not support block devices.
(http://www.linux-mtd.infradead.org/faq/ubifs.html#L_loop_mount)
This is true? Or I got it wrong, the ubifs faq's?.

Peter Maydell <address@hidden> escreveu no dia terça, 9/07/2019
à(s) 09:35:

> On Mon, 8 Jul 2019 at 18:20, Andre Cirne <address@hidden> wrote:
> > I would like to mount on a virtual machine a partition wich is on a  dump
> > of a nand flash.
> > This disk would not be the primary disk but a secondary disk.
> >
> > I am using the next command to create the virtual machine.
> >
> > qemu-system-arm -nographic -M virt -m 64   -device
> > nand,chip_id=0x59,id=myubiflash  -drive
> > if=mtd,format=raw,file=100000.ubi,id=myubiflash
> > openwrt-armvirt-32-zImage-initramfs
>
> I don't think '-device nand' is likely to actually do
> anything useful on the 'virt' board.
>
> The virt board supports a couple of flash devices but they
> are intended for the UEFI bios and it's unlikely that putting
> your flash blob there is going to help much. QEMU doesn't
> care whether a drive image came from a NAND flash originally
> or anything else, so the simplest approach is probably to
> create a virtio-blk and use your flash dump as the disk
> image. That will let your guest access it as a block device
> (mount it if it has a filesystem, or just do raw reads of it
> if not).
>
> > qemu-system-arm: -drive if=mtd,format=raw,file=100000.ubi,id=myubiflash:
> > machine type does not support if=mtd,bus=0,unit=0
>
> if=mtd says "try to plug this device into the system as MTD",
> and so the error is telling you "this system doesn't have any
> way to plug in MTD".
>
> (This is an aside, because I don't think that fixing this
> is going to help you, but: your id= options look odd. Generally
> you specify id=myname on the -drive (which gives it a name),
> and then you specify drive=myname on some other option (which
> I would guess here would be the -device nand...) to say
> "use this specific drive". (If you do this style of things you
> want if=none, to say "don't try to autoplug this"; otherwise
> QEMU will complain that you've tried to do two things with
> the drive at once.) You don't want to give two different objects
> the same id=name (as you've done with the drive and the nand device)
> because then you can't tell them apart.)
>
> thanks
> -- PMM
>


reply via email to

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