flash image from SD card
Werner Almesberger
werner at openmoko.org
Mon Mar 31 18:27:47 CEST 2008
Willie Chen wrote:
> Then uboot can read the env-5secs.env.
Great ! Problem almost solved ;-)
> Maybe the problem is if we flash u-boot image from linux, then we can't
> read correctly environment.
Aaah, now it clicked ! It's the environment pointer that gets clobbered.
It's "hidden" in the OOB area (in the u-boot partition), but
flash_erase(all) erases that anyway.
We don't see this effect with DFU, because u-boot explicitly restores
the environment pointer after DFU'ing to the u-boot partition.
I had a quick look at the underlying logic, and there's no easy way to
tell flash_erase(all) to not erase the OOB data. So we have two options:
- I can write a special erase tool that preserves the OOB data
- if the u-boot we use at the factory is the same we ship the devices
with, we could just not replace it. So, do we really need a separate
version for use inside the factory ?
Thanks,
- Werner
More information about the openmoko-kernel
mailing list