flash image from SD card

Werner Almesberger werner at openmoko.org
Mon Mar 31 07:19:53 CEST 2008


Willie Chen wrote:
> * erase u-boot.bin and u-boot.env in linux.

With "erase", you mean flash_eraseall followed by nandwrite ?

I'm a little confused about what exactly you're doing. In the example
you sent, you first flashed u-boot with u-boot.bin, then you overwrote
u-boot (!) with env-5secs.env. So this system shouldn't boot at all.

I.e., your example said

$ flashimage /dev/mtd1 /home/root/u-boot.bin
$ flashimage /dev/mtd1 /home/root/env-5secs.env

while it should have been

$ flashimage /dev/mtd1 /home/root/u-boot.bin
$ flashimage /dev/mtd2 /home/root/env-5secs.env

However, since the content of /dev/mtd2 you sent does look as if the
correct update has been performed, that doesn't quite match this sort
of sequence. There are probably the results of several runs mixed
into one.

So perhaps the first thing to check would be that there's no trivial
typo in your scripts. Happens all the time and can take forever to
debug ;-)

If the problem still exists, can you please bring the system to the
state it's in before flashing, and then repeat the procedure, and send
the exact output you're getting, snapshots of /dev/mtd2 ? I.e.,

- bring system to original state (devirginate ?)
- boot into Linux
- cat /proc/mtd
- nanddump -b -o -f env_before.bin /dev/mtd2
- do the flashing (with -x, send the output)
- do the flashing of env-5secs.env from Linux
- nanddump -b -o -f env_linux.bin /dev/mtd2
- reset and send what you're seeing one the console(s)

Thanks,
- Werner




More information about the openmoko-kernel mailing list