From: Christopher H. <ch...@us...> - 2002-01-15 01:59:37
|
Update of /cvsroot/blob/blob/src/blob In directory usw-pr-cvs1:/tmp/cvs-serv29871/src/blob Modified Files: main.c param_block.c Log Message: Make parameters really work by adding include of <arch.h> to param_block.c. Zero autoboot timeout disables autoboot. Index: main.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/main.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- main.c 2002/01/15 01:51:07 1.24 +++ main.c 2002/01/15 01:59:34 1.25 @@ -77,8 +77,6 @@ { int numRead = 0; char commandline[MAX_COMMANDLINE_LENGTH]; - int i; - int retval = 0; #ifdef PARAM_START u32 conf; #endif @@ -149,25 +147,32 @@ if(blob_status.load_ramdisk) do_reload("ramdisk"); - /* wait 10 seconds before starting autoboot */ - SerialOutputString("Autoboot in progress, press any key to stop "); - for(i = 0; i < blob_status.boot_delay; i++) { - serial_write('.'); + if (blob_status.boot_delay > 0) { + int i; + int retval = 0; - retval = SerialInputBlock(commandline, 1, 1); + /* wait 10 seconds before starting autoboot */ + SerialOutputString("Autoboot ("); + SerialOutputDec(blob_status.boot_delay); + SerialOutputString(" seconds) in progress, press any key to stop "); + for(i = 0; i < blob_status.boot_delay; i++) { + serial_write('.'); - if(retval > 0) - break; - } + retval = SerialInputBlock(commandline, 1, 1); - /* no key was pressed, so proceed booting the kernel */ - if(retval == 0) { - commandline[0] = '\0'; - parse_command("boot"); - } + if(retval > 0) + break; + } - SerialOutputString("\nAutoboot aborted\n"); - SerialOutputString("Type \"help\" to get a list of commands\n"); + /* no key was pressed, so proceed booting the kernel */ + if(retval == 0) { + commandline[0] = '\0'; + parse_command("boot"); + } + + SerialOutputString("\nAutoboot aborted\n"); + SerialOutputString("Type \"help\" to get a list of commands\n"); + } /* the command loop. endless, of course */ for(;;) { @@ -177,6 +182,8 @@ numRead = GetCommand(commandline, MAX_COMMANDLINE_LENGTH, 600); if(numRead > 0) { + int retval; + if((retval = parse_command(commandline)) < 0 ) printerror(retval, NULL); } Index: param_block.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/param_block.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- param_block.c 2002/01/03 16:07:18 1.5 +++ param_block.c 2002/01/15 01:59:34 1.6 @@ -35,13 +35,16 @@ # include <blob/config.h> #endif +#include <blob/arch.h> #include <blob/types.h> #include <blob/param_block.h> #include <blob/main.h> #include <blob/util.h> #include <blob/sa1100.h> - +#if (defined(PARAM_START) && !defined(PARAM_LEN)) +#error If PARAM_START is defined, PARAM_LEN must be too. +#endif /* * Paramater Tag parsing. |