[Bug 765] Factory Reset writes wrong environment

bugzilla-daemon at bugzilla.openmoko.org bugzilla-daemon at bugzilla.openmoko.org
Fri Oct 12 19:41:53 CEST 2007


------- Additional Comments From cesarb at cesarb.net  2007-10-12 19:41 -------
Created an attachment (id=347)
 --> (http://bugzilla.openmoko.org/cgi-bin/bugzilla/attachment.cgi?id=347&action=view)
Add hardcoded USB/serial console and poweroff options to the boot menu

This patch (lightly tested on qemu, including a test erasing the environment
partition) hardcodes the last three options of the devirginator default
environment ("Set console to USB", "Set console to serial", and "Power off"),
which are the ones most useful for recovery of a corrupted/missing environment.

The first option is most useful for people without (or who don't want to use
their) debug board; the second one is useful if the console options were set to
usbtty on the environment and you want to use the debug board serial; and the
last one is just nice to have.

These have been copied unchanged from the devirginator scripts. I will post
another alternate patch which also sets "usbtty=cdc_acm" (in case that
environment variable has been erased; if the environment is corrupted or
missing, u-boot will automatically set it).

I have opted to not set "baudrate" on the serial console option, since knowing
if it works without causing any problems would need testing on a real device
with the debug board first. If someone wants to do such testing, it would be a
good idea in case the environment variable has been incorrectly set (and if
u-boot reads it from the environment; I have not yet found where it does it. If
it doesn't, there's no need to change it from the default).

With this patch, even if the environment has wrong variables or is missing, as
long as you can get to the boot menu, you should be able to get to the console
(unless there's some other environment variable which is able to break the USB

If applied, the default menu will have 3 duplicate options (unless you edit the
environment to remove them); a separate patch for qemu and for the devirginator
would be needed to remove their copy of the options.

More testing on a real device (with a debug board nearby) would be welcome.

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

More information about the buglog mailing list