Talk:Openmoko under QEMU
From Openmoko
Contents |
Error connecting
If you get an error like
ssh: connect to host 192.168.0.202 port 22: No route to host
when you try to ssh, it could most probably be because one of your other network interfaces (wired/wireless) is being assigned an IP address of the form 192.168.0.* ,because of which the routing table contains a default gateway entry that is confusing poor new usb0 interface.
The easiest way to work around this is to specify a tighter netmask for usb0 like:
sudo ifconfig usb0 inet 192.168.0.200 netmask 255.255.255.240
Skn 18:50, 5 August 2007 (CEST)
Debian Sid
under Debian Sid. I have to change slightly openmoko/env and openmoko/download.sh to make it run on Linux:
- in openmoko/env s/make=gmake/make=make/
- in openmoko/download.sh changed line 34 to: files=`lynx -dump $download_dir | grep http | sed "s,[0-9 \t\.]*$download_dir\([a-zA-Z0-9_\.-]\)[ \t]*,\1,"`
Any Key 14:16, 4 April 2007 (CEST)
Thanks, hopefully should be fixed. make was changed to gmake in the first place to account for BSD.balrog 23:11, 5 April 2007 (CEST)
Gentoo, AMD64
Where can I report bugs in QEMU-Neo1973? It fails to compile:
/server/projects/openmoko/qemu-neo1973/target-arm/op.c: In function 'op_iwmmxt_movq_wRn_M0': /server/projects/openmoko/qemu-neo1973/target-arm/op.c:1374: error: unable to find a register to spill in class 'GENERAL_REGS'
--Zbraniecki 12:52, 7 April 2007 (CEST)
- I assume you're using gcc4 (gcc-config -l). Qemu fails to build if you use gcc4 as it only builds with gcc3 at this time. More information:
http://gentoo-wiki.com/HOWTO:_Qemu
http://bugs.gentoo.org/show_bug.cgi?id=132667
How to do a downgrade to gcc3 just for Qemu: http://forums.gentoo.org/viewtopic-t-537643-highlight-qemu.html - be aware, though, that the kernel modules may not load if you built the kernel with gcc4, so a kernel recompilation may be in order also. Abraxa 19:38, 7 April 2007 (CEST)
I encountered the same problem, but I still had a gcc3 installed (gcc-3.4.6-r1 in a seperate slot from the system default gcc4, to be exact. This means that if you're using gentoo, you will not need to downgrade your system gcc). I simply added --cc=gcc-3.4.6 to ./configure's switches and make finished without major problems. --LordHelmchen 20:12, 11 April 2007 (CEST)
If you still encounter this problem with gcc3, make sure you don't have -march set anywhere like in CFLAGS (I had -march=athlon-xp). unsetting CFLAGS before re-running the configure script solved the problem for me. --Vegar 22:10, 24 April 2007 (CEST)
Basic question
I am using the emulator after compiling 'make qemu'. The basic gui screen has been created and it asks the following:
'Touch the crosshairs to calibrate the screen'
Unfortunately I do not know how to continue from this stage on... Any mouse click on the crosshairs, or a keyboard touch won't initiate a click...
Does any body know how can I click the emulator screen and continue from this stage? --nighthawk 01:12, 9 April 2007
I use mouse click and it works --Filippo 22:16, 8 April 2007 (CEST)
I find a single click will not register. Which makes sense if you think about a fingerpress on the screen. I hold down the mouse and wiggle it a bit to get the buttons to register. -- DonPark 8Apr07
Still got problem with enabling the mouse. I tried according to the QEMU guide to see which mice are available under what I used. (ALT-CTRL-2, command 'mice info') and there was only the following:
- Mouse #0: QEMU S3C2410-driven Touchscreen
Does anybody got the same problem as I got? --nighthawk 04:14am, 9 April 2007
Please see http://lists.openmoko.org/pipermail/openmoko-devel/2007-April/000837.html balrog 01:20, 18 April 2007 (CEST)
FreeBSD and last qemu...
1. Comment lines 49 and 50 in file gnokiigsm/device.h
//size_t device_read(__ptr_t buf, size_t nbytes, struct gn_statemachine *state); //size_t device_write(const __ptr_t buf, size_t n, struct gn_statemachine *state);
2. Compile all with gmake
3. ONLY for FreeBSD users (as root):
#kldload aio
4. Have fun :)
NetBSD/i386
1. fetch pkgsrc from http://pkgsrc.org
2. fetch wip from http://pkgsrc-wip.sourceforge.net
3. cd wip/qemu-neo1973; make package
flash.sh fails
looks like I'm somehow getting a variable confused... when I try to run flash.sh with no arguments, I get a bunch of errors from sleep telling me that items such as `nand' for instance is an invalid time. I've encountered this problem both from the makefile and from a manual download. From what I can deduce, $2 should contain the number of (micro?)seconds for sleep to wait, but it looks like there's a target list, or some series of commands that are getting crosswired in.
If it helps, I'm running ubuntu fiesty X64
any help would be appreciated
Thank you,
--JeffAndros 21:32, 30 June 2007 (CEST)
Hi Jeff,
I had the same output, and in my case the problem was that my image hadn't built. I guess the flash.sh script behaves this way if there is no image (todo: it would be good to modify the script to first check for an image, and if it is missing, report it as such and exit.).
Michael -MichaelShiloh
error transcript follows:
# Neo NAND is 128k sectors big cat .16ksec .16ksec .16ksec .16ksec .16ksec .16ksec .16ksec .16ksec > openmoko-flash.base rm -rf .8b .16b .512b .sec .8sec .64sec .512sec .2ksec .16ksec Please wait, programming the NAND flash... Could not configure '/dev/rtc' to have a 1024 Hz timer. This is not a fatal error, but for better emulation accuracy either use a 2.6 host Linux kernel or type 'echo 1024 > /proc/sys/dev/rtc/max-user-freq' as root. sleep: invalid time interval `setenv' sleep: invalid time interval `dontask' sleep: invalid time interval `y' sleep: invalid time interval `nand' sleep: invalid time interval `createbbt' sleep: invalid time interval `setenv' sleep: invalid time interval `bootcmd' sleep: invalid time interval `\'setenv' sleep: invalid time interval `bootargs' sleep: invalid time interval `${bootargs_base}' sleep: invalid time interval `${mtdparts};' sleep: invalid time interval `bootm' sleep: invalid time interval `0x31000000\'' sleep: invalid time interval `setenv' sleep: invalid time interval `menu_1' sleep: invalid time interval `\'Set' sleep: invalid time interval `console' sleep: invalid time interval `to' sleep: invalid time interval `USB:' sleep: invalid time interval `setenv' sleep: invalid time interval `stdin' sleep: invalid time interval `usbtty;' sleep: invalid time interval `setenv' sleep: invalid time interval `stdout' sleep: invalid time interval `usbtty;' sleep: invalid time interval `setenv' sleep: invalid time interval `stderr' sleep: invalid time interval `usbtty\'' sleep: invalid time interval `setenv' sleep: invalid time interval `menu_2' sleep: invalid time interval `\'Set' sleep: invalid time interval `console' sleep: invalid time interval `to' sleep: invalid time interval `serial:' sleep: invalid time interval `setenv' sleep: invalid time interval `stdin' sleep: invalid time interval `serial;' sleep: invalid time interval `setenv' sleep: invalid time interval `stdout' sleep: invalid time interval `serial;' sleep: invalid time interval `setenv' sleep: invalid time interval `stderr' sleep: invalid time interval `serial\'' sleep: invalid time interval `setenv' sleep: invalid time interval `menu_3' sleep: invalid time interval `\'Power' sleep: invalid time interval `off:' sleep: invalid time interval `neo1973' sleep: invalid time interval `power-off\'' sleep: invalid time interval `setenv' sleep: invalid time interval `splashimage' sleep: invalid time interval `\'nand' sleep: invalid time interval `read.e' sleep: invalid time interval `splash' sleep: invalid time interval `0x5000;' sleep: invalid time interval `unzip' sleep: invalid time interval `0x96000\'' sleep: invalid time interval `setenv' sleep: invalid time interval `mtdids' sleep: invalid time interval `nand0=neo1973-nand' sleep: invalid time interval `setenv' sleep: invalid time interval `mtdparts' sleep: invalid time interval `mtdparts=neo1973-nand:0x00050000(u-boot),0x00004000(u-boot_env),0x00208000(kernel),0x00010000(splash),0x039a4000(rootfs)' sleep: invalid time interval `#dynpart' sleep: invalid time interval `nand' sleep: invalid time interval `write.e' sleep: invalid time interval `u-boot' sleep: invalid time interval `dynenv' sleep: invalid time interval `set' sleep: invalid time interval `u-boot_env' sleep: invalid time interval `saveenv' Try `sleep --help' for more information. openmoko/flash.sh: line 88: 26649 Terminated $qemu -mtdblock "$script_dir/$flash_base" -kernel "$script_dir/$1" -serial stdio -nographic -usb -monitor null 0<&0 U-boot failed to finish writing in setenv dontask y nand createbbt setenv bootcmd 'setenv bootargs ${bootargs_base} ${mtdparts}; bootm 0x31000000' setenv menu_1 'Set console to USB: setenv stdin usbtty; setenv stdout usbtty; setenv stderr usbtty' setenv menu_2 'Set console to serial: setenv stdin serial; setenv stdout serial; setenv stderr serial' setenv menu_3 'Power off: neo1973 power-off' setenv splashimage 'nand read.e 0x36000000 splash 0x5000; unzip 0x36000000 0x33d00000 0x96000' setenv mtdids nand0=neo1973-nand setenv mtdparts mtdparts=neo1973-nand:0x00050000(u-boot),0x00004000(u-boot_env),0x00208000(kernel),0x00010000(splash),0x039a4000(rootfs) #dynpart nand write.e 0x31000000 u-boot 0x1000 dynenv set u-boot_env saveenv seconds, giving up.
- Make sure you have lynx installed. It's required to download the files with download.sh. I was getting the same error, then I installed lynx, and it worked fine.
- --Bloodylip 15:22, 19 July 2007 (CEST)
Compiling QEMU with SUSE 10.2
- Install gcc version 3.3.6. It can be downloaded from http://gcc.cybermirror.org/releases/gcc-3.3.6/gcc-core-3.3.6.tar.gz, for example. After unpacking it somewhere do
cd gcc-3.3.6/ ./configure --prefix=/home/archive/moko/gcc33 --program-suffix=-3.3 make bootstrap make install
Please replace /home/archive/moko/gcc33 with a path of your choice, since it will be the one where gcc33 will be installed.
- Add the following line in file openmoko/trunk/src/host/qemu-neo1973/usb-linux.c to get it compiled:
#include <sys/ioctl.h> #include <linux/compiler.h> <-- ADD THIS! #include <linux/usbdevice_fs.h>
(Hint found at http://osdir.com/ml/emulators.kvm.devel/2007-01/msg00101.html)
The next steps depend on what method you use to compile stuff:
- If you are using MokoMakefile, as I do, edit Makefile around line 266 to involve gcc33:
$${OMDIR}/openmoko/trunk/src/host/qemu-neo1973/configure \ --target-list=arm-softmmu \ --cc=/home/archive/moko/gcc33/bin/gcc-3.3) [ -e build/qemu/openmoko ] || \
- Manually on the command line:
./configure --target-list=arm-softmmu --cc=/home/archive/moko/gcc33/bin/gcc-3.3 make
Please remember to use the path you chose above for gcc33!
- Finally run
make qemu
Enjoy!
--Taki 12:45, 14 July 2007 (CEST)