flash image from SD card

Werner Almesberger werner at openmoko.org
Fri Mar 28 13:49:03 CET 2008


[ Trimmed Cc, added openmoko-kernel ]

Willie Chen wrote:
> $ flash_eraseall -q $dev
> $ nandwrite -p -q $dev $image

That's good.

> *** Warning - bad CRC or NAND, using default environment

That's not :-(

> mtdparts variable not set, see 'help mtdparts'
[...]

That's a consequence of the failure above.

Does this happen on all devices or only on some of them ?

> When we use the dfu-util to re-flash u-boot and u-boot.env,
> we can read correct u-boot.env and boot system. Could you help
> us check this problem? Thanks.

Hmm, that's an odd problem. First, can you please check that you're
indeed flashing the environment, i.e., that the file name and the
device name you're passing to nandwrite are indeed correct ? The
output of your script run with -x could be useful for checking this.
(Change the #/bin/sh to #/bin/sh -x)

If this doesn't help to solve the problem, could you please send me
the following information (in private mail, due to the various
binary attachments) ?


- the script output, as described above
- printenv from u-boot
- cat /proc/mtd from Linux
- the environment image you're trying to flash
- env_linux.bin, created with
  nanddump -b -o -f env_linux.bin /dev/mtd2
  after flashing the environment from Linux
- env_dfu.bin, created with
  nanddump -b -o -f env_dfu.bin /dev/mtd2
  after flashing the environment with DFU

Thanks !

- Werner




More information about the openmoko-kernel mailing list