qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] RE: /dev/mtd emulation


From: Artyom Tarasenko
Subject: Re: [Qemu-devel] RE: /dev/mtd emulation
Date: Wed, 9 Feb 2011 18:15:06 +0100

On Wed, Feb 9, 2011 at 4:34 PM, Anton L. Vinokurov <address@hidden> wrote:
> Jan, Stefan,
>
> I've tried indeed but with no luck:
> (qemu) info block
> ide0-hd0: type=hd removable=0 file=vimage.dat ro=0 drv=raw encrypted=0
> mtd0: type=hd removable=0 file=firmware.bin ro=0 drv=raw encrypted=0
> floppy0: type=floppy removable=1 locked=0 [not inserted]
> sd0: type=floppy removable=1 locked=0 [not inserted]
>
> but same time:
> ~ # cat /dev/mtd0
> cat: /dev/mtd0: No such device
> ~ # cat /dev/mtdblock0
> cat: /dev/mtdblock0: No such device or address


Looks like your guest kernel expects some other type of flash, or
looks for it not where you wired it up?
Maybe there are some hints in the dmesg output?

> Guest /dev/mtd0 is character device but QEMU thinks mtd0 is block.
>
> My hardware is a network module (like NME-CUE, NME-APPRE, NME-WAE) for Cisco 
> ISR routers: 1GHz Celeron CPU, CompactFlash disk, 1Gb DRAM, 1 FastEthernet, 
> ... Flash memory chip is STM M50FW080 8Mbit NVRAM.
>
> Regards,
>
> Anton.
>
>
> -----Original Message-----
> From: address@hidden [mailto:address@hidden
> Sent: Wednesday, February 09, 2011 11:47 AM
> To: Stefan Hajnoczi
> Cc: Anton L. Vinokurov; address@hidden
> Subject: Re: /dev/mtd emulation
>
> On 2011-02-09 09:13, Stefan Hajnoczi wrote:
>> On Wed, Feb 9, 2011 at 7:18 AM, Anton L. Vinokurov <address@hidden> wrote:
>>> ~ # dmesg | grep mtd
>>>
>>> ~ #
>>
>> Have you tried qemu -drive if=mtd,file=/path/to/firmware?
>>
>> QEMU has some flash emulation code in
>> hw/{nand.c,onenand.c,pflash_cfi01.c,pflash_cfi02.c}.  I've never used
>> them but perhaps someone else can help if you provide more details
>> about the hardware you are trying to emulate.
>
> You also need to wire up that flash device on board init, i.e. add some
> pflash_*_register to pc_init1. Check some embedded board for the precise
> pattern.
>
> Jan
>
>
>



-- 
Regards,
Artyom Tarasenko

solaris/sparc under qemu blog: http://tyom.blogspot.com/



reply via email to

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