Initial kernel command string (Was: Generating elf kernel ?)
Guillaume Dargaud
dargaud at lpsc.in2p3.fr
Mon Sep 20 17:21:09 EST 2010
> I think you should modify the bootargs on your dts.
> ------
> chosen {
> bootargs = "console=ttyS0 root=/dev/ram";
> linux,stdout-path = "/plb at 0/serial at 83e00000";
> } ;
Thanks, that worked great, I now have a fully bootable not only kernel, but
full OS as well.
> > Also my previous kernel would wait for 2 seconds at the beginning to
> > allow me to change the initial command string via the serial port, but
> > now it just runs right through. How can I enable this option ?
>
> It's possible on PowerPC kernel :)
>
> You can take a look at the file, arch/powerpc/boot/main.c.
> ------
> static void prep_cmdline(void *chosen)
> {
> if (cmdline[0] == '\0')
> getprop(chosen, "bootargs", cmdline, COMMAND_LINE_SIZE-1);
>
> printf("\n\rLinux/PowerPC load: %s", cmdline);
> /* If possible, edit the command line */
> if (console_ops.edit_cmdline)
> console_ops.edit_cmdline(cmdline, COMMAND_LINE_SIZE);
> printf("\n\r");
> .......
>
>
> So you have to define one function, console_ops.edit_cmdline -->
> serial_edit_cmdline. Or you can try bind this to your boot console ops
> directly. Please refer to the file, arch/powerpc/boot/serial.c.
So I forced
console_ops.edit_cmdline = serial_edit_cmdline;
in serial.c, bu that didn't do the trick...
--
Guillaume Dargaud
http://www.gdargaud.net/
More information about the Linuxppc-dev
mailing list