Emulating a Nokia N800 with QEMU r15 (See the current copy)
Safe Testing Platform for the Nokia N800
The OpenHanded Project [1] g has created patches against QEMU to emulate a Nokia N800 on your desktop PC. Their instructions are geared towards using their platform ("Poky") on the emulated system, but with some work it should be possible to use the Nokia N800 software on the emulated system. Here's how to do it:
- Create a scratch area to work in
- $ mkdir ~/tmp/qemu-n800
- Download the QEMU CVS tree from 2008-03-07 into the scratch area
- $ cd ~/tmp/qemu-n800/
- $ cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/qemu checkout -D 2008-03-07 qemu
- $ mv qemu/ qemu-20080307
- Download the OpenHanded Project's patches against QEMU CVS 2008-03-07
- $ cd ~/tmp/qemu-n800/
- $ svn checkout 'http://svn.o-hand.com/repos/poky/trunk/meta/packages/qemu/qemu-0.9.1+cvs20080307/' qemu-20080307-patches-poky
- Apply the patches to the QEMU source tree
- $ cd ~/tmp/qemu-n800/qemu-20080307-patches-poky/
- $ cat series | while read patchfile patchstrip; do ( cd ../qemu-20080307/ && patch ${patchstrip} ) < "${patchfile}"; done
- Compile QEMU
- $ cd ~/tmp/qemu-n800/qemu-20080307/
- $ ./configure --prefix=${HOME}/tmp/qemu-n800/instroot --disable-linux-user --enable-system --disable-darwin-user --disable-kqemu
- $ make
- $ make install
- Download the Nokia N800 Maemo Firmware
- Go to http://maemo.org/community/wiki/HOWTO_FlashLatestNokiaImageWithLinux/
- Download the OS for the Nokia N800 by clicking on the appropriate link, probably something like "IT OS Software Edition 2008 (version 2.2007.51-3)"
- Note that you may need a Nokia N800 serial number for this -- if you don't have a Nokia N800, now might be a good time to get one.
- Save the file to ~/tmp/qemu-n800/
- I will assume that the file is called "RX-34_2008SE_2.2007.51-3_PR_COMBINED_MR0_ARM.bin"
- Download the Nokia Nseries Firmware Flashing Tool version 3
- Download the appropriate version for your operating system from: http://tablets-dev.nokia.com/d3.php
- Save the file to ~/tmp/qemu-n800/
- I will assume that the file is called "flasher-3.0-static"
- Make the Firmware Flashing Tool executable
- $ chmod +x ~/tmp/qemu-n800/flasher-3.0-static
- Unpack the Nokia N800 OS2008 Firmware
- $ cd ~/tmp/qemu-n800/
- $ mkdir os2008
- $ cd os2008/
- $ ../flasher-3.0-static -u -F ../RX-34_2008SE_2.2007.51-3_PR_COMBINED_MR0_ARM.bin
- Download the OpenHanded Project's Flash Filesystem Tool
- $ cd ~/tmp/qemu-n800/
- $ svn cat http://svn.o-hand.com/repos/poky/trunk/scripts/poky-nokia800-flashutil > poky-nokia800-flashutil
- $ chmod +x poky-nokia800-flashutil
- Extract the "config" partition from your Nokia N800
- $ cd ~/tmp/qemu-n800/
- $ ssh root@nokia-n800 cat /dev/mtd1ro > config.mtd
- Use the OpenHanded Project's Flash Filesystem Tool to create a filesytem for the emulated system (these directions adapted from Marcin Juszkiewicz's instructions [2])
- $ cd ~/tmp/qemu-n800/
- $ ./poky-nokia800-flashutil os2008/initfs.jffs2 qemu-n800.img initfs
- $ ./poky-nokia800-flashutil config.mtd qemu-n800.img config
- $ ./poky-nokia800-flashutil os2008/rootfs.jffs2 qemu-n800.img rootfs
- Start QEMU with the appropriate options
- $ cd ~/tmp/qemu-n800/
- $ ./instroot/bin/qemu-system-arm -kernel os2008/zImage -M n800 -mtdblock qemu-n800.img -m 130 -append "root=/dev/mtdblock4 rootfstype=jffs2"
- Victory !
Where Can I Learn More About the OpenHanded Project ?
The OpenHanded Project's Subversion repository is at:
- ViewCVS: http://svn.o-hand.com/view/poky/trunk/
- Subversion: http://svn.o-hand.com/repos/poky/trunk/
What about Windows Users ?
QEMU compiles under MinGW32
No, Really, What about Windows Users ?
Here is a patched QEMU with Nokia N800 support for Win32 [3]. It might even work, I really have no way to try it. Here's how I compiled it (cross-compiled under Linux), though:
- $ CFLAGS='-I/home/rkeene/root/windows-i386/include' LDFLAGS='-L/home/rkeene/root/windows-i386/lib' ./configure --prefix=${HOME}/tmp/qemu-n800/qemu-20080307-win32-nokian800 --disable-linux-user --enable-system --disable-darwin-user --disable-kqemu --disable-vnc-tls --cpu=i386 --enable-mingw32 --cross-prefix=i586-mingw32msvc-
- $ make
- $ make install