OSLoadOptions
Hi!
I'm using kernel 2.4.0-test3 from the SimpleLinux dist on an Indy w/ R4400SC, booting using DHCP on an x86 RedHat 6.1
box. Right now the boot is completely unattended, I just turn on the Indy and a few seconds later I'm at the single user bash prompt. To get further than this, I would like to pass command line options to the kernel at boot, and have tried setting the OSLoadOptions PROM variable.
The problem is that the kernel seems to be passed the string 'OSLoadOptions=<my kernel boot options>', instead of just the boot options. At least that is what is indicated by the line
Kernel command line: OSLoadOptions=init=/sbin/simpleinit
during boot. At the end of this mail is a clunky patch that fixes this, but I'm not sure if this is the right way to go about it.
/Erik
[email protected]
Patch to linux/arch/mips/arc/cmdline.c of 2.4.0
37c37
< int actr, i;
---
Quoted 1 line
int actr, i, offset;
48a49
Quoted 1 line
offset = (!strncmp(prom_argv[actr], "OSLoadOptions=",14)?14:0;
50,51c51,52
< strcpy(cp, prom_argv[actr]);
< cp += strlen(prom_argv[actr]);
---
Quoted 2 lines
strcpy(cp, prom_argv[actr] + offset);
cp += strlen(prom_argv[actr] + offset);On Thu, Feb 01, 2001 at 10:46:51AM +0100, Erik Aderstedt wrote:
[..snip..]
Quoted 8 lines
The problem is that the kernel seems to be passed the string 'OSLoadOptions=<my kernel boot options>', instead of just the boot options. At least that is what is indicated by the line
Kernel command line: OSLoadOptions=init=/sbin/simpleinit
during boot. At the end of this mail is a clunky patch that fixes this, but I'm not sure if this is the right way to go about it.
Could you do a "diff -u" - it makes things far easier to read. Doesn't cmdline.c ignore OSLoadOptions along with the other prom variables? cmdline.c in 2.4.0pre9:
static char *ignored[] = {
"ConsoleIn=",
"ConsoleOut=",
"SystemPartition=",
"OSLoader=",
"OSLoadPartition=",
"OSLoadFilename=",
"OSLoadOptions="
};One can easily remove OSLoadOptions from the above list, but then one has to make sure it is still possible to override the OSLoadOptions with the PROMS boot command(this makes parsing more complex I think).
-- Guido