
Dear =?ISO-8859-1?Q?Matthias_Wei=DFer?=,
In message 4BD04C64.20000@arcor.de you wrote:
Am 22.04.2010 14:51, schrieb Wolfgang Denk:
- if ((in_word& 0xC0) == 0xC0) {
setenv("stdin", "serial");
setenv("stdout", "serial");
setenv("stderr", "serial");
setenv("bootdelay", "10");
- } else if ((in_word& 0xC0) != 0) {
setenv("stdout", "vga");
setenv("bootcmd", "mw.l 0x40000000 0 1024; usb start;"
"fatls usb 0; fatload usb 0 0x40000000 mcq5resq.bin;"
"bootelf 0x40000000; bootelf 0x10080000");
setenv("bootdelay", "5");
I consider such mandatory settings of behaviour-critical variables as "bootcmd" and "bootdelay" bad style. I recommend to use oither variables instead, and to use these as defaults, so the user still has a choice to define his own "bootcmd" which does not get overwritten at each boot.
OK. I think this will be the approach you mentioned:
setenv bootcmd '${gs_bootcmd}' setenv gs_bootcmd bootelf 0x...
Right.
Is the redirection of the console OK as it is done in the above code?
I have to admit that I don't exactly like it (because you will never know which exact state the system is in, especially if it's not working - I prefer static states and manual, permanent switching), but I will not object here.
Best regards,
Wolfgang Denk