[U-Boot] [PATCH 5/6] cmd_nvedit.c: allow board-specific code before/after saving the environment

Fabio Estevam festevam at gmail.com
Fri May 18 20:29:04 CEST 2012


On Fri, May 18, 2012 at 12:58 PM, Timur Tabi <timur at freescale.com> wrote:

> The reason I make a big deal about saveenv is because I use an environment
> variable ("video-mode") to enable video support.  Once the console is
> switched to the video display, the only way to switch it back to the
> serial port is to delete the environment variable, save the environment,
> and reboot.
>
> If we had a command that switched the console back to the serial port, I
> wouldn't need any of this.

Yes,  I noticed it last week when working with mx51evk.

The suggestion I got from the list and that worked for me was to force
setenv("stdout", "serial"); inside board_late_init.

Take a look at:
https://github.com/fabioestevam/u-boot-imx/commit/bbd9e6eac8dfbce2fe64e84f01c292ab708124b5


More information about the U-Boot mailing list