Talk:Openmoko under QEMU

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(Hangs at setenv bootcmd)
m (Note for gcc-3.4 added)
 
(12 intermediate revisions by 7 users not shown)
Line 50: Line 50:
  
 
If nothing else works, you should try to use gcc-3.3.* (tested using the x86-chroot as building environment) --[[User:Mathias|Mathias]]
 
If nothing else works, you should try to use gcc-3.3.* (tested using the x86-chroot as building environment) --[[User:Mathias|Mathias]]
 +
 +
gcc-3.4 worked here on my Debian Unstable box nearly flawless. Only some warnings were printed. --[[User:Quix0r|Quix0r]] 19:39, 20 April 2009 (UTC)
  
 
== Basic question ==
 
== Basic question ==
Line 311: Line 313:
 
Linux libero 2.6.22-2-686 #1 SMP Fri Aug 31 00:24:01 UTC 2007 i686 GNU/Linux
 
Linux libero 2.6.22-2-686 #1 SMP Fri Aug 31 00:24:01 UTC 2007 i686 GNU/Linux
 
--[[User:Antono|Antono]] 03:12, 16 November 2007 (CET)
 
--[[User:Antono|Antono]] 03:12, 16 November 2007 (CET)
 +
 +
 +
== Hangs at programming the root filesystem (SOLVED) ==
 +
 +
flash.sh hangs for me at programming the root filesystem and gives up with an error after 120 seconds. Increasing the timeout to 300 did not help either.
 +
 +
The following command is causing the problems:
 +
uboot OpenMoko-openmoko-devel-image-glibc-ipk-P1-Snapshot-20071113-fic-gta01.rootfs.jffs2 300 "
 +
nand write.jffs2 0x31000000 rootfs 0x302c000"
 +
 +
These are the last lines before the error:
 +
... (snip)
 +
Writing data at 0x1cba00 -- 100% complete.
 +
  1538580 bytes written: OK
 +
GTA01Bv4 # neo1973 power-off
 +
poweroff
 +
pcf_write: Power-off requested.
 +
openmoko/flash.sh: line 88: 13068 Terminated              ( sleep $2; kill $pid; sleep 1; kill -KILL $pid )
 +
Please wait, programming the NAND flash...
 +
Available alarm timers, in order of precedence:
 +
unix
 +
openmoko/flash.sh: line 88: 13071 Terminated              ( sleep $2; kill $pid; sleep 1; kill -KILL $pid )
 +
openmoko/flash.sh: line 88: 13073 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 300 seconds, giving up.
 +
 +
make: *** [flash-qemu-official] Error 255
 +
 +
I'm running MokoMakefile under Ubuntu 7.10. Any ideas? For a solution see below. --[[User:Ahochsteger|Ahochsteger]] 12:19, 19 November 2007 (CET)
 +
 +
=== Solution ===
 +
 +
Update to revision 3436 where the maximum image size has been increased in trunk/src/host/qemu-neo1973/hw/neo1973.c.
 +
 +
r3436 | andrew | 2007-11-18 23:48:31 +0100 (Son, 18 Nov 2007) | 2 lines
 +
Move the kernel load buffer to 0x30800000 PA to increase max image size to 56 megs (recent OpenMoko-openmoko-devel-* images are 51 MB).
 +
 +
--[[User:Ahochsteger|Ahochsteger]] 13:07, 19 November 2007 (CET)
 +
 +
 +
== Fedora 8 x86_64 flash.sh fails ==
 +
Failed to flash image in qemu (flash-qemu-local)
 +
I build image, so in ~/moko/build/tmp/deploy/glibc/images/neo1973 there are
 +
<pre>
 +
dfu-util
 +
lowlevel_foo-gta01bv2-1.3.1+git0ec595243dc99edcd248bbcfbfd5a1dc860bde89+svn3817-r1.bin
 +
lowlevel-foo-gta01bv2-latest.bin
 +
lowlevel_foo-gta01bv3-1.3.1+git0ec595243dc99edcd248bbcfbfd5a1dc860bde89+svn3817-r1.bin
 +
lowlevel-foo-gta01bv3-latest.bin
 +
lowlevel_foo-gta01bv4-1.3.1+git0ec595243dc99edcd248bbcfbfd5a1dc860bde89+svn3817-r1.bin
 +
lowlevel-foo-gta01bv4-latest.bin
 +
lowlevel_foo-gta02v2-1.3.1+git0ec595243dc99edcd248bbcfbfd5a1dc860bde89+svn3817-r1.bin
 +
lowlevel-foo-gta02v2-latest.bin
 +
lowlevel_foo-gta02v3-1.3.1+git0ec595243dc99edcd248bbcfbfd5a1dc860bde89+svn3817-r1.bin
 +
lowlevel-foo-gta02v3-latest.bin
 +
lowlevel_foo-gta02v4-1.3.1+git0ec595243dc99edcd248bbcfbfd5a1dc860bde89+svn3817-r1.bin
 +
lowlevel-foo-gta02v4-latest.bin
 +
modules-2.6.22.5-moko11+svnr3801-r13-neo1973.tgz
 +
openmoko-devel-image-fic-gta01.jffs2
 +
OpenMoko-openmoko-devel-image-glibc-ipk-P1-Snapshot-20080206-fic-gta01.rootfs.jffs2
 +
OpenMoko-openmoko-devel-image-glibc-ipk-P1-Snapshot-20080207-fic-gta01.rootfs.jffs2
 +
u-boot-gta01bv2-1.3.1+git0ec595243dc99edcd248bbcfbfd5a1dc860bde89+svn3817-r1.bin
 +
uboot-gta01bv2-latest.bin
 +
u-boot-gta01bv3-1.3.1+git0ec595243dc99edcd248bbcfbfd5a1dc860bde89+svn3817-r1.bin
 +
uboot-gta01bv3-latest.bin
 +
u-boot-gta01bv4-1.3.1+git0ec595243dc99edcd248bbcfbfd5a1dc860bde89+svn3817-r1.bin
 +
uboot-gta01bv4-latest.bin
 +
u-boot-gta02v2-1.3.1+git0ec595243dc99edcd248bbcfbfd5a1dc860bde89+svn3817-r1.bin
 +
uboot-gta02v2-latest.bin
 +
u-boot-gta02v3-1.3.1+git0ec595243dc99edcd248bbcfbfd5a1dc860bde89+svn3817-r1.bin
 +
uboot-gta02v3-latest.bin
 +
u-boot-gta02v4-1.3.1+git0ec595243dc99edcd248bbcfbfd5a1dc860bde89+svn3817-r1.bin
 +
uboot-gta02v4-latest.bin
 +
uImage-2.6.22.5-moko11+svnr3801-r13-neo1973.bin
 +
uImage-neo1973-latest.bin
 +
</pre>
 +
I get at output
 +
<pre>
 +
[xnike@xnike moko]$ make flash-qemu-local
 +
( cd build/qemu && openmoko/flash.sh ../tmp/deploy/glibc/images/neo1973 )
 +
/usr/bin/gmake
 +
which: no gecho in (/usr/lib64/qt-3.3/bin:/usr/kerberos/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/xnike/bin:/backup/SVN+CVS/GoogleAndroid/tools:/backup/SVN+CVS/GoogleWebToolkit)
 +
/usr/bin/pngtopnm
 +
/usr/bin/ppmtorgb3
 +
gmake[1]: Entering directory `/home/xnike/moko/build/qemu/openmoko'
 +
gmake[1]: `splash.gz' не требует обновления.
 +
gmake[1]: Leaving directory `/home/xnike/moko/build/qemu/openmoko'
 +
Using 'uImage-2.6.22.5-moko11+svnr3801-r13-neo1973.bin' as the kernel image.
 +
Using 'OpenMoko-openmoko-devel-image-glibc-ipk-P1-Snapshot-20080207-fic-gta01.rootfs.jffs2' as the root filesystem image.
 +
Using 'u-boot-gta01bv4-1.3.1+git0ec595243dc99edcd248bbcfbfd5a1dc860bde89+svn3817-r1.bin' as bootloader.
 +
gmake[1]: Entering directory `/home/xnike/moko/build/qemu/openmoko'
 +
# Making an empty/erased flash image.  Need a correct echo behavior.
 +
echo -en \\0377\\0377\\0377\\0377\\0377\\0377\\0377\\0377 > .8b
 +
cat .8b .8b > .16b # OOB is 16 bytes
 +
cat .16b .16b .16b .16b .16b .16b .16b .16b > .512b
 +
cat .16b .16b .16b .16b .16b .16b .16b .16b >> .512b
 +
cat .16b .16b .16b .16b .16b .16b .16b .16b >> .512b
 +
cat .16b .16b .16b .16b .16b .16b .16b .16b >> .512b
 +
cat .512b .16b > .sec # A sector is 512 bytes of data + OOB
 +
cat .sec .sec .sec .sec .sec .sec .sec .sec > .8sec
 +
cat .8sec .8sec .8sec .8sec .8sec .8sec .8sec .8sec > .64sec
 +
cat .64sec .64sec .64sec .64sec .64sec .64sec .64sec .64sec > .512sec
 +
cat .512sec .512sec .512sec .512sec > .2ksec
 +
cat .2ksec .2ksec .2ksec .2ksec .2ksec .2ksec .2ksec .2ksec > .16ksec
 +
# 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
 +
gmake[1]: Leaving directory `/home/xnike/moko/build/qemu/openmoko'
 +
Please wait, programming the NAND flash...
 +
neo_gsm_switch: GSM disabled.
 +
 +
 +
U-Boot 1.3.1+git0ec595243dc99edcd248bbcfbfd5a1dc860bde89+svn3817 (Feb  6 2008 - 13:11:54)
 +
 +
DRAM:  128 MB
 +
NAND:  Bad block table not found for chip 0
 +
Bad block table not found for chip 0
 +
64 MiB
 +
*** Warning - bad CRC or NAND, using default environment
 +
 +
Video: 640x480x8 31kHz 59Hz
 +
USB:  S3C2410 USB Deviced
 +
mtdparts variable not set, see 'help mtdparts'
 +
mtdparts variable not set, see 'help mtdparts'
 +
mtdparts variable not set, see 'help mtdparts'
 +
mtdparts variable not set, see 'help mtdparts'
 +
mtdparts variable not set, see 'help mtdparts'
 +
pcf_write: charging in Qualification Mode.
 +
pcf_write: charge voltage 4.20V.
 +
neo_lcd_rst_switch: LCD reset.
 +
jbt6k74_command: Display on.
 +
neo_vib_switch: Buzz, buzz.
 +
neo_vib_switch: Vibrator stopped.
 +
neo_bl_switch: LCD Backlight now on.
 +
poweroff
 +
pcf_write: Power-off requested.
 +
Please wait, programming the NAND flash...
 +
neo_gsm_switch: GSM disabled.
 +
 +
openmoko/flash.sh: line 91: 15608 Finished      ( sleep $2; kill $pid; sleep 1; kill -KILL $pid )
 +
openmoko/flash.sh: line 91: 15617 Finished      $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 60 seconds, giving up.
 +
 +
openmoko/flash.sh: line 96: kill: (-15548) - No such process
 +
make: *** [flash-qemu-local] Error 255
 +
 +
</pre>
 +
revision is 4024.
 +
What should I do?
 +
--[[User:Xnike|xnike]] 09:26, 7 February 2008 (CET)
 +
<pre>
 +
I got the same problem. I fixed it by editing "flash.sh" file(You can find it in $MokoHome/openmoko/trunk/src/host/qemu-neo1973/openmoko)
 +
 +
solution 1:
 +
 +
--------------------------------------------------------
 +
at line 91:
 +
change
 +
kill $timer
 +
to:
 +
if $timer > 0; then
 +
kill $timer
 +
fi
 +
at line 96:
 +
change
 +
kill $timer
 +
to:
 +
if $timer > 0; then
 +
kill $timer
 +
fi
 +
--------------------------------------------------------
 +
It works to me, hope it can help you:)
 +
===========================================
 +
 +
solution 2:
 +
 +
also, it might happend like that because the uboot waiting time is too short.
 +
in "flash.sh" file, find out the following lines:
 +
#####
 +
uboot $uboot_image 300 "
 +
...
 +
uboot splash.gz 60 "
 +
...
 +
uboot $kernel_image 60 "
 +
...
 +
uboot $rootfs_image 120 "
 +
#####
 +
you can find at the end of each line there is a number. you should double size them(just change the 300 to 600), and save the file. redo the "openmoko/flash.sh" commond.
 +
it's also works for me.
 +
</pre>
 +
This problems seems not restricted to x64, I had it on Ubuntu 8.10: in my case the solution was simply to comment out the exit -1 after it complains. It then starts into the emulator.
 +
 +
 +
== Debian Fails as well ==
 +
 +
I have got the same problem under Debian x86_64 as the one in Fedora (above) but even though i suddenly got through the flashing.. when i run:
 +
<pre>
 +
arm-softmmu/qemu-system-arm -M gta01 -m 130 -mtdblock openmoko/openmoko-flash.image -kernel openmoko/openmoko-kernel.bin -usb -show-cursor
 +
</pre>
 +
After pressing Boot I get
 +
<pre>
 +
NAND read: mtdparts variable not set, see 'help mtdparts'
 +
incorrect device type in kernel
 +
'kernel' is not a number
 +
Wrong Image Format for bootm command
 +
ERROR: can't get kernel image!
 +
 +
Press [AUX] to return to boot menu.
 +
</pre>
 +
 +
== download.sh fails to run ==
 +
With the original (svn-checkout, HEAD revision) I got this error:
 +
<pre>
 +
quix0r@firebox:~/moko/qemu-neo1973$ openmoko/download.sh
 +
    Retrieving available builds list...
 +
    Trying alternative sources
 +
    Kernel is... not found
 +
</pre>
 +
 +
Any ideas? --[[User:Quix0r|Quix0r]] 17:05, 19 April 2009 (UTC)
 +
 +
Yes, read the whole article on this page.. there is that script you need to use instead of the original, wildcards have changed so the kernel is not in the same place anymore.

Latest revision as of 20:39, 20 April 2009

Contents

[edit] Broken Link

Under the header Pre-built binaries on this page the link to the zip file is broken.

--Kodafox 18:59, 28 August 2007 (CEST)

[edit] 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)

[edit] 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)

[edit] 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://kidsquid.com/cgi-bin/moin.cgi/FrequentlyAskedQuestions#head-1dd86241b11d36963df140c9f6ab46ef402d4244

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)

If nothing else works, you should try to use gcc-3.3.* (tested using the x86-chroot as building environment) --Mathias

gcc-3.4 worked here on my Debian Unstable box nearly flawless. Only some warnings were printed. --Quix0r 19:39, 20 April 2009 (UTC)

[edit] 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)

[edit] FreeBSD and 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. as root:

#kldload aio

4. Have fun :)

(MokoMakefile ist too Linux specific to work on FreeBSD

[edit] NetBSD/i386

To get the Qemu Neo1973 emulator on NetBSD:

1. fetch pkgsrc from http://pkgsrc.org

2. fetch wip from http://pkgsrc-wip.sourceforge.net

3. build package:

cd /usr/pkgsrc/wip/qemu-neo1973; make package


Screenshots showing Linux OpenMoko booting on Qemu Neo1973 emulator on NetBSD: 0 1 2 3 4 ..


note: there's an experimental NetBSD/evbarm Neo1973 kernel booting on Qemu Neo1973 emulator on NetBSD

[edit] flash.sh fails

Try installing lynx (sudo apt-get install lynx) and run the openmoko/download.sh again, then it should work.

[edit] question/answers

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)

[edit] Compiling QEMU with SUSE 10.2

 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)


[edit] calibration problem

by using the current makefile for 2007.2 on 64bit ubuntu I was not able to point to buttons on the qemu screen correctly due to a calibration issue. it seems that i had to imagine the screen turned around by 90° clockwise and only by guessing where the buttons would be I was able to open up the console and did a ts_calibrate to re orientate the screen - now everything works as expected.

Same problem here with a ubuntu 32bit running 2007.2. How did you do the ts_calibrate? It's already difficult for getting in the terminal (on the phone), but then I couldn't find the onscreen keyboard. How do you activate it? Dolfje 13:03, 21 August 2007 (CEST) - the mokomakefile runs qemu with your keyboard as an usb device so you can use it to type. JoSch 17:57, 25 August 2007 (CEST)

Again same problem :) Would really like to try this out, but it is hard without calibration. 14:29 (CEST) Saturday, August 25 2007

Run qemu with the -portrait option to make the calibration at least match qemu's input orientation (which should be enough to start a terminal and type ts_calibrate for further calibration). Adding "-usbdevice keyboard" enables the USB keyboard. --Danielmewes 19:39, 28 August 2007 (CEST)

[edit] Segfault when flash.sh runs / 'bad magic number' error from qemu

I had an issue where make qemu and make flash-qemu-official both had a segfault when running flash.sh then when running make run-qemu I got errors from the bootloader about a 'bad magic number'.

The quick fix (per Mek in #openmoko) is to comment out the line in flash.sh that reads 'nand createbbt' .

[edit] Hangs at setenv bootcmd

Both manually and with MokoMakefile, flash.sh hangs for me at "setenv bootcmd '" (up to and including the apostrophe prints initially, then it goes onto "openmoko/flash.sh" after 300 sec):

Creating BBT. Please wait ...Bad block table not found for chip 0
Bad block table not found for chip 0
Bad block table written to 0x03ffc000, version 0x01
Bad block table written to 0x03ff8000, version 0x01

GTA01Bv4 # setenv bootcmd 'openmoko/flash.sh: line 88: 23632 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 300 seconds, giving up.

Any ideas? Debian testing, 2.6.22 kernel, all the openmoko/OE/qemu dependencies installed AFAIK. --Tsuki 21:02, 5 October 2007 (CEST)


The same bug at Debian Sid Linux libero 2.6.22-2-686 #1 SMP Fri Aug 31 00:24:01 UTC 2007 i686 GNU/Linux --Antono 03:12, 16 November 2007 (CET)


[edit] Hangs at programming the root filesystem (SOLVED)

flash.sh hangs for me at programming the root filesystem and gives up with an error after 120 seconds. Increasing the timeout to 300 did not help either.

The following command is causing the problems:

uboot OpenMoko-openmoko-devel-image-glibc-ipk-P1-Snapshot-20071113-fic-gta01.rootfs.jffs2 300 "
nand write.jffs2 0x31000000 rootfs 0x302c000"

These are the last lines before the error:

... (snip)
Writing data at 0x1cba00 -- 100% complete.
 1538580 bytes written: OK
GTA01Bv4 # neo1973 power-off
poweroff
pcf_write: Power-off requested.
openmoko/flash.sh: line 88: 13068 Terminated              ( sleep $2; kill $pid; sleep 1; kill -KILL $pid )
Please wait, programming the NAND flash...
Available alarm timers, in order of precedence:
unix
openmoko/flash.sh: line 88: 13071 Terminated              ( sleep $2; kill $pid; sleep 1; kill -KILL $pid )
openmoko/flash.sh: line 88: 13073 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 300 seconds, giving up.

make: *** [flash-qemu-official] Error 255

I'm running MokoMakefile under Ubuntu 7.10. Any ideas? For a solution see below. --Ahochsteger 12:19, 19 November 2007 (CET)

[edit] Solution

Update to revision 3436 where the maximum image size has been increased in trunk/src/host/qemu-neo1973/hw/neo1973.c.

r3436 | andrew | 2007-11-18 23:48:31 +0100 (Son, 18 Nov 2007) | 2 lines
Move the kernel load buffer to 0x30800000 PA to increase max image size to 56 megs (recent OpenMoko-openmoko-devel-* images are 51 MB).

--Ahochsteger 13:07, 19 November 2007 (CET)


[edit] Fedora 8 x86_64 flash.sh fails

Failed to flash image in qemu (flash-qemu-local) I build image, so in ~/moko/build/tmp/deploy/glibc/images/neo1973 there are

dfu-util
lowlevel_foo-gta01bv2-1.3.1+git0ec595243dc99edcd248bbcfbfd5a1dc860bde89+svn3817-r1.bin
lowlevel-foo-gta01bv2-latest.bin
lowlevel_foo-gta01bv3-1.3.1+git0ec595243dc99edcd248bbcfbfd5a1dc860bde89+svn3817-r1.bin
lowlevel-foo-gta01bv3-latest.bin
lowlevel_foo-gta01bv4-1.3.1+git0ec595243dc99edcd248bbcfbfd5a1dc860bde89+svn3817-r1.bin
lowlevel-foo-gta01bv4-latest.bin
lowlevel_foo-gta02v2-1.3.1+git0ec595243dc99edcd248bbcfbfd5a1dc860bde89+svn3817-r1.bin
lowlevel-foo-gta02v2-latest.bin
lowlevel_foo-gta02v3-1.3.1+git0ec595243dc99edcd248bbcfbfd5a1dc860bde89+svn3817-r1.bin
lowlevel-foo-gta02v3-latest.bin
lowlevel_foo-gta02v4-1.3.1+git0ec595243dc99edcd248bbcfbfd5a1dc860bde89+svn3817-r1.bin
lowlevel-foo-gta02v4-latest.bin
modules-2.6.22.5-moko11+svnr3801-r13-neo1973.tgz
openmoko-devel-image-fic-gta01.jffs2
OpenMoko-openmoko-devel-image-glibc-ipk-P1-Snapshot-20080206-fic-gta01.rootfs.jffs2
OpenMoko-openmoko-devel-image-glibc-ipk-P1-Snapshot-20080207-fic-gta01.rootfs.jffs2
u-boot-gta01bv2-1.3.1+git0ec595243dc99edcd248bbcfbfd5a1dc860bde89+svn3817-r1.bin
uboot-gta01bv2-latest.bin
u-boot-gta01bv3-1.3.1+git0ec595243dc99edcd248bbcfbfd5a1dc860bde89+svn3817-r1.bin
uboot-gta01bv3-latest.bin
u-boot-gta01bv4-1.3.1+git0ec595243dc99edcd248bbcfbfd5a1dc860bde89+svn3817-r1.bin
uboot-gta01bv4-latest.bin
u-boot-gta02v2-1.3.1+git0ec595243dc99edcd248bbcfbfd5a1dc860bde89+svn3817-r1.bin
uboot-gta02v2-latest.bin
u-boot-gta02v3-1.3.1+git0ec595243dc99edcd248bbcfbfd5a1dc860bde89+svn3817-r1.bin
uboot-gta02v3-latest.bin
u-boot-gta02v4-1.3.1+git0ec595243dc99edcd248bbcfbfd5a1dc860bde89+svn3817-r1.bin
uboot-gta02v4-latest.bin
uImage-2.6.22.5-moko11+svnr3801-r13-neo1973.bin
uImage-neo1973-latest.bin

I get at output

[xnike@xnike moko]$ make flash-qemu-local
( cd build/qemu && openmoko/flash.sh ../tmp/deploy/glibc/images/neo1973 )
/usr/bin/gmake
which: no gecho in (/usr/lib64/qt-3.3/bin:/usr/kerberos/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/xnike/bin:/backup/SVN+CVS/GoogleAndroid/tools:/backup/SVN+CVS/GoogleWebToolkit)
/usr/bin/pngtopnm
/usr/bin/ppmtorgb3
gmake[1]: Entering directory `/home/xnike/moko/build/qemu/openmoko'
gmake[1]: `splash.gz' не требует обновления.
gmake[1]: Leaving directory `/home/xnike/moko/build/qemu/openmoko'
Using 'uImage-2.6.22.5-moko11+svnr3801-r13-neo1973.bin' as the kernel image.
Using 'OpenMoko-openmoko-devel-image-glibc-ipk-P1-Snapshot-20080207-fic-gta01.rootfs.jffs2' as the root filesystem image.
Using 'u-boot-gta01bv4-1.3.1+git0ec595243dc99edcd248bbcfbfd5a1dc860bde89+svn3817-r1.bin' as bootloader.
gmake[1]: Entering directory `/home/xnike/moko/build/qemu/openmoko'
# Making an empty/erased flash image.  Need a correct echo behavior.
echo -en \\0377\\0377\\0377\\0377\\0377\\0377\\0377\\0377 > .8b
cat .8b .8b > .16b # OOB is 16 bytes
cat .16b .16b .16b .16b .16b .16b .16b .16b > .512b
cat .16b .16b .16b .16b .16b .16b .16b .16b >> .512b
cat .16b .16b .16b .16b .16b .16b .16b .16b >> .512b
cat .16b .16b .16b .16b .16b .16b .16b .16b >> .512b
cat .512b .16b > .sec # A sector is 512 bytes of data + OOB
cat .sec .sec .sec .sec .sec .sec .sec .sec > .8sec
cat .8sec .8sec .8sec .8sec .8sec .8sec .8sec .8sec > .64sec
cat .64sec .64sec .64sec .64sec .64sec .64sec .64sec .64sec > .512sec
cat .512sec .512sec .512sec .512sec > .2ksec
cat .2ksec .2ksec .2ksec .2ksec .2ksec .2ksec .2ksec .2ksec > .16ksec
# 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
gmake[1]: Leaving directory `/home/xnike/moko/build/qemu/openmoko'
Please wait, programming the NAND flash...
neo_gsm_switch: GSM disabled.


U-Boot 1.3.1+git0ec595243dc99edcd248bbcfbfd5a1dc860bde89+svn3817 (Feb  6 2008 - 13:11:54)

DRAM:  128 MB
NAND:  Bad block table not found for chip 0
Bad block table not found for chip 0
64 MiB
*** Warning - bad CRC or NAND, using default environment

Video: 640x480x8 31kHz 59Hz
USB:   S3C2410 USB Deviced
mtdparts variable not set, see 'help mtdparts'
mtdparts variable not set, see 'help mtdparts'
mtdparts variable not set, see 'help mtdparts'
mtdparts variable not set, see 'help mtdparts'
mtdparts variable not set, see 'help mtdparts'
pcf_write: charging in Qualification Mode.
pcf_write: charge voltage 4.20V.
neo_lcd_rst_switch: LCD reset.
jbt6k74_command: Display on.
neo_vib_switch: Buzz, buzz.
neo_vib_switch: Vibrator stopped.
neo_bl_switch: LCD Backlight now on.
poweroff
pcf_write: Power-off requested.
Please wait, programming the NAND flash...
neo_gsm_switch: GSM disabled.

openmoko/flash.sh: line 91: 15608 Finished      ( sleep $2; kill $pid; sleep 1; kill -KILL $pid )
openmoko/flash.sh: line 91: 15617 Finished      $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 60 seconds, giving up.

openmoko/flash.sh: line 96: kill: (-15548) - No such process
make: *** [flash-qemu-local] Error 255

revision is 4024. What should I do? --xnike 09:26, 7 February 2008 (CET)

I got the same problem. I fixed it by editing "flash.sh" file(You can find it in $MokoHome/openmoko/trunk/src/host/qemu-neo1973/openmoko)

solution 1:

--------------------------------------------------------
at line 91: 
change 
		kill $timer
to:
		if $timer > 0; then
			kill $timer
		fi
at line 96:
change
		kill $timer
to:
		if $timer > 0; then
			kill $timer
		fi
--------------------------------------------------------
It works to me, hope it can help you:)
===========================================

solution 2:

also, it might happend like that because the uboot waiting time is too short.
in "flash.sh" file, find out the following lines:
#####
uboot $uboot_image 300 "
...
uboot splash.gz 60 "
...
uboot $kernel_image 60 "
...
uboot $rootfs_image 120 "
#####
you can find at the end of each line there is a number. you should double size them(just change the 300 to 600), and save the file. redo the "openmoko/flash.sh" commond.
it's also works for me.

This problems seems not restricted to x64, I had it on Ubuntu 8.10: in my case the solution was simply to comment out the exit -1 after it complains. It then starts into the emulator.


[edit] Debian Fails as well

I have got the same problem under Debian x86_64 as the one in Fedora (above) but even though i suddenly got through the flashing.. when i run:

arm-softmmu/qemu-system-arm -M gta01 -m 130 -mtdblock openmoko/openmoko-flash.image -kernel openmoko/openmoko-kernel.bin -usb -show-cursor

After pressing Boot I get

NAND read: mtdparts variable not set, see 'help mtdparts'
incorrect device type in kernel
'kernel' is not a number
Wrong Image Format for bootm command
ERROR: can't get kernel image!

Press [AUX] to return to boot menu.

[edit] download.sh fails to run

With the original (svn-checkout, HEAD revision) I got this error:

quix0r@firebox:~/moko/qemu-neo1973$ openmoko/download.sh 
    Retrieving available builds list...
    Trying alternative sources
    Kernel is... not found

Any ideas? --Quix0r 17:05, 19 April 2009 (UTC)

Yes, read the whole article on this page.. there is that script you need to use instead of the original, wildcards have changed so the kernel is not in the same place anymore.

Personal tools

Broken Link

Under the header Pre-built binaries on this page the link to the zip file is broken.

--Kodafox 18:59, 28 August 2007 (CEST)

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://kidsquid.com/cgi-bin/moin.cgi/FrequentlyAskedQuestions#head-1dd86241b11d36963df140c9f6ab46ef402d4244

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)

If nothing else works, you should try to use gcc-3.3.* (tested using the x86-chroot as building environment) --Mathias

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 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. as root:

#kldload aio

4. Have fun :)

(MokoMakefile ist too Linux specific to work on FreeBSD

NetBSD/i386

To get the Qemu Neo1973 emulator on NetBSD:

1. fetch pkgsrc from http://pkgsrc.org

2. fetch wip from http://pkgsrc-wip.sourceforge.net

3. build package:

cd /usr/pkgsrc/wip/qemu-neo1973; make package


Screenshots showing Linux OpenMoko booting on Qemu Neo1973 emulator on NetBSD: 0 1 2 3 4 ..


note: there's an experimental NetBSD/evbarm Neo1973 kernel booting on Qemu Neo1973 emulator on NetBSD

flash.sh fails

Try installing lynx (sudo apt-get install lynx) and run the openmoko/download.sh again, then it should work.

question/answers

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

 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)


calibration problem

by using the current makefile for 2007.2 on 64bit ubuntu I was not able to point to buttons on the qemu screen correctly due to a calibration issue. it seems that i had to imagine the screen turned around by 90° clockwise and only by guessing where the buttons would be I was able to open up the console and did a ts_calibrate to re orientate the screen - now everything works as expected.

Same problem here with a ubuntu 32bit running 2007.2. How did you do the ts_calibrate? It's already difficult for getting in the terminal (on the phone), but then I couldn't find the onscreen keyboard. How do you activate it? Dolfje 13:03, 21 August 2007 (CEST) - the mokomakefile runs qemu with your keyboard as an usb device so you can use it to type. JoSch 17:57, 25 August 2007 (CEST)

Again same problem :) Would really like to try this out, but it is hard without calibration. 14:29 (CEST) Saturday, August 25 2007

Run qemu with the -portrait option to make the calibration at least match qemu's input orientation (which should be enough to start a terminal and type ts_calibrate for further calibration). Adding "-usbdevice keyboard" enables the USB keyboard. --Danielmewes 19:39, 28 August 2007 (CEST)

Segfault when flash.sh runs / 'bad magic number' error from qemu

I had an issue where make qemu and make flash-qemu-official both had a segfault when running flash.sh then when running make run-qemu I got errors from the bootloader about a 'bad magic number'.

The quick fix (per Mek in #openmoko) is to comment out the line in flash.sh that reads 'nand createbbt' .

Hangs at setenv bootcmd

Both manually and with MokoMakefile, flash.sh hangs for me at "setenv bootcmd '" (up to and including the apostrophe prints initially, then it goes onto "openmoko/flash.sh" after 300 sec):

Creating BBT. Please wait ...Bad block table not found for chip 0
Bad block table not found for chip 0
Bad block table written to 0x03ffc000, version 0x01
Bad block table written to 0x03ff8000, version 0x01

GTA01Bv4 # setenv bootcmd 'openmoko/flash.sh: line 88: 23632 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 300 seconds, giving up.

Any ideas? Debian testing, 2.6.22 kernel, all the openmoko/OE/qemu dependencies installed AFAIK. --Tsuki 21:02, 5 October 2007 (CEST)


The same bug at Debian Sid Linux libero 2.6.22-2-686 #1 SMP Fri Aug 31 00:24:01 UTC 2007 i686 GNU/Linux --Antono 03:12, 16 November 2007 (CET)