Openmoko under QEMU on Gentoo
(→Using Manual Setup)
|Line 7:||Line 7:|
Revision as of 20:28, 22 June 2008
As noted in http://docs.openmoko.org/trac/ticket/1093
It is confirmed by upstream: gentoo's 3.4.6 doesn't build qemu on 32-bit x86. A gcc developer (Paul Brook) said gentoo's gcc "is broken" and nothing can be done outside gentoo.
Please use GCC 3.3 instead.
# emerge -va =sys-devel/gcc-3.3.6-r1
This page is aimed at Gentoo users new to the OpenMoko project who're trying to get the QEMU emulator up and running and do some development for the project. The basic process to do this is described at OpenMoko_under_QEMU however there are a number of Gentoo specific steps, not all of which are immediately obvious. This page obviously draws heavily from the main OpenMoko_under_QEMU page and you should check that page for most of the details as it is more likely to be updated
The ultimate aim of this article is to get a good Gentoo process set out which can then be used as the basis for an ebuild. Ideally this would incorporate the Neo1973 qemu files into the normal Gentoo qemu build.
Using Manual Setup
Fetch the source from Subversion as described in the main article. Before performing the configure step we need to emerge a few dependencies.
emerge -va libsdl lynx netpbm
(more dependencies to be added here)
Unfortunately qemu won't compile with gcc4.x so we need to temporarily switch to a gcc3.4 compiler. You can check the available gcc installs by using gcc-config -l. If the output lists a valid gcc3.4 compiler then you can skip the next install, but most people will probably see output similar to this:
# gcc-config -l  x86_64-pc-linux-gnu-4.1.2 *
If you don't have an entry in the list for gcc3.4 then you'll have to emerge the compiler using:
# emerge -va =sys-devel/gcc-3.4.6-r2 ... ... # gcc-config -l  x86_64-pc-linux-gnu-3.4.6  x86_64-pc-linux-gnu-3.4.6-hardened  x86_64-pc-linux-gnu-3.4.6-hardenednopie  x86_64-pc-linux-gnu-3.4.6-hardenednopiessp  x86_64-pc-linux-gnu-3.4.6-hardenednossp  x86_64-pc-linux-gnu-4.1.2 *
You don't need to use gcc-config to switch the default compiler to gcc-3 - Qemu should find there right version if it's installed.
Now continue with the ./configure and make sections from the main article, then reset your system to the previous gcc compiler using the gcc-config command again.
# ./configure --target-list=arm-softmmu # GCC 3.x will be required, see --cc= # make
Once you've completed the rest of the instructions set out in the main article you should have a qemu Neo1973 emulator which you can run with something similar to: arm-softmmu/qemu-system-arm -M neo -m 130 -mtdblock openmoko/openmoko-flash.image -kernel openmoko/openmoko-kernel.bin -usb -show-cursor -snapshot -usbdevice keyboard