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 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: jan.kis...@web.de [mailto:jan.kis...@web.de] Sent: Wednesday, February 09, 2011 11:47 AM To: Stefan Hajnoczi Cc: Anton L. Vinokurov; qemu-devel@nongnu.org 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 <an...@netams.com> 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