Received: from eggs.gnu.org ([140.186.70.92]:51930) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGPlr-0004ZZ-24 for qemu-devel@nongnu.org; Wed, 19 Oct 2011 02:37:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGPlp-0003pE-IX for qemu-devel@nongnu.org; Wed, 19 Oct 2011 02:36:58 -0400 Received: from smtp.nokia.com ([147.243.128.24]:20332 helo=mgw-da01.nokia.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGPlp-0003ov-Cp for qemu-devel@nongnu.org; Wed, 19 Oct 2011 02:36:57 -0400 From: Date: Wed, 19 Oct 2011 06:36:18 +0000 Message-ID: In-Reply-To: Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [Qemu-devel] hw/nand hw/onenand and read-only List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: armbru@redhat.com Cc: peter.maydell@linaro.org, riku.voipio@iki.fi, qemu-devel@nongnu.org On 18.10.11 16:38 , "ext Markus Armbruster" wrote: > $ qemu-system-arm -drive if=3Dnone,file=3Dtmp.qcow2,readonly,id=3Dfoo >-device nand,drive=3Dfoo -kernel /dev/null > qemu: hardware error: nand_device_init: Unsupported NAND block size. > [...] > >Note that I didn't bother supplying a drive with sensible size. If I >did, I guess I'd get nand coupled to a read-only drive. Easy enough for >you to try :) Indeed, thanks ;) While I'm at it, I'll also fix the NAND init function to return -1 instead of aborting. I'll send patches for hw/nand and hw/onenand shortly. I'll simply make them reject read-only drives however both device models already support running without a drive as well by using a memory buffer instead so it would also be possible to make them use a read-only drive in a way that initial NAND/OneNAND contents would be read from the drive but any changes would not be written back to the drive and would be lost when QEMU is killed. Cheers, Juha