u-boot 1.3.x and qemu-openmoko

Andrzej Zaborowski andrew at openedhand.com
Wed Jan 16 21:03:52 CET 2008

On Wed, Jan 16, 2008 at 10:39:11PM +0800, John Lee wrote:
> I tried to flash the lastest build of u-boot onto qemu and it will
> timeout at the flashing stage.  Have you tried it before?  Any idea
> how to make it work?  Thanks in advance!

yes, I've hit this too back in october and the direct cause is that in
u-boot 1.3 the default console changed from serial to USB.  I don't know
if this change was made upstream, or in OM patches, or somewhere else.
Qemu uses a similar flashing procedure to that in devirgnizer so I think
this also affects devirginizer - I don't know if anyone is still using
it, but it will probably fail with u-boot 1.3 and debug board (assuming
the flash is completely empty at the time of flashing).

Possible solutions are:
 * change the default console device to serial in U-boot.  The default
   is only used when no environment is present in the Flash, later the
   environment variables override this and users see no difference
   (hence why this change was unnoticed until now).

 * ship a default environment partition with qemu, which would be
   flashed before we start u-boot for the first time - very ugly, so I'd
   rather not do that (and impossible to do on the real hardware).

 * ship a known working u-boot version (e.g. 1.2.x) with qemu in the
   pc-bios/ subdirectory - this directory already contains firmware/BIOS
   roms used by many platforms supported by qemu, not only PC.  U-boot
   is a kind of firmware, so this would even be acceptable upstream.
   This would remedy future breakage caused by u-boot changes.  It has
   the drawback that people will never be using bleeding-edge u-boot and
   detect errors.

   I remember when one daily snapshot in August had the "mtdparts" command
   broken and flashing failed.  The issue was reported on the same day
   as a qemu bug, so I removed the usage of "mtdparts" from qemus cripts,
   but it took several days before somebody tested it on a real Neo and
   reported/fixed the u-boot bug - so the nice thing about qemu
   is that it lets you test u-boots and kernels before flashing them to
   "bare metal" and avoid bricking, and also alerts the developers that
   somethign is wrong (unfortunately daily u-boot snapshots are not being
   built anymore, so qemu still downloads the 2007.08 image of 1.2.x
   from buildhost).


More information about the openmoko-kernel mailing list