From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JmpT9-0000E0-QL for qemu-devel@nongnu.org; Fri, 18 Apr 2008 08:13:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JmpT7-0000Do-SK for qemu-devel@nongnu.org; Fri, 18 Apr 2008 08:13:30 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JmpT7-0000Dl-Jc for qemu-devel@nongnu.org; Fri, 18 Apr 2008 08:13:29 -0400 Received: from ug-out-1314.google.com ([66.249.92.169]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JmpT7-0006G2-A8 for qemu-devel@nongnu.org; Fri, 18 Apr 2008 08:13:29 -0400 Received: by ug-out-1314.google.com with SMTP id m2so71305uge.4 for ; Fri, 18 Apr 2008 05:13:20 -0700 (PDT) Message-ID: Date: Fri, 18 Apr 2008 14:13:20 +0200 From: "andrzej zaborowski" Subject: Re: [Qemu-devel] Re: [4215] Nokia N800 machine support (ARM). In-Reply-To: <5b5833aa0804172043o76747a53ie18fdce6f760c356@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <5b5833aa0804172043o76747a53ie18fdce6f760c356@mail.gmail.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi, On 18/04/2008, Anderson Lizardo wrote: > On Thu, Apr 17, 2008 at 7:03 PM, andrzej zaborowski wrote: > > The firmware kernel is very quiet, so if it's unable to mount the > > initfs, it'll hang at the blank screen. A kernel built from sources > > will dump logs on the third serial port. To boot Linux you'll need to > > provide the kernel and a flash image with at least two of the five > > partitions present on it. The flash is supplied with "-mtdblock > > filename" and the file should be of 276824064 bytes (256 MB of data + > > OOB data at the end). You'll need to have the initfs and the rootfs > > present in this image, and for Maemo also the "config" partition (not > > my fault). Poky (pokylinux.org) boots fine with just the stock initfs > > + Poky rootfs. > > A nice feature would be to allow the host to communicate with nolo > running inside qemu (e.g. through a TCP server or something), then > modify the free 0xFFFF flasher (http://nopcode.org/0xFFFF/) to be able > to communicate with this server. In practice, this would allow to > "flash" the emulated device like we do for the real hardware. That should be possible, I think the easiest communication channel would be serial - I didn't find the "cold-flashing" over serial option in 0xFFFF but it can be added. However several things in 0xFFFF are outdated since 770 (I'm using version 0.3.2), so it may take a bit of work. You can also boot-up a small rootfs that contains the images to flash, and use "nandwrite" from mtd-utils to write the images like on the real heardware. Another possibility I found is using NOLO console interface. I don't know if there is a way to access this console on the real hardware, but in Qemu you can type commands into NOLO on the serial port and it even has help messages and stuff, and also allows you to flash an image from RAM like U-boot. Judging from no google hits for any of the NOLO commands, I think it may be only possible in qemu :) Flashing the emulated device like the real hardware would still assume that the config partition is already present in flash and stays there though. In addition to the config partition Nokia stores some information about the unit in the OneNAND's One-Time-Programmable area, fortunately this is not critical for booting Maemo. I uploaded at http://folks.o-hand.com/andrew/qemu-n800/ a tiny script that creates an empty mtdblock image for qemu and can also write the jffs2 / config partitions from images. It can use dd (very fast) or it can use qemu to boot up the zImage which contains nandwrite in an initramfs, and will read the images to flash from an SD generated by the script (this is slower but independent of the file format used by qemu). Regards -- Please do not print this email unless absolutely necessary. Spread environmental awareness.