[POWERPC] Clean up zImage handling of the command line

This cleans up how the zImage code manipulates the kernel
command line.  Notable improvements from the old handling:
	- Command line manipulation is consolidated into a new
prep_cmdline() function, rather than being scattered across start()
and some helper functions
	- Less stack space use: we use just a single global command
line buffer, which can be initialized by an external tool as before,
we no longer need another command line sized buffer on the stack.
	- Easier to support platforms whose firmware passes a
commandline, but not a device tree.  Platform code can now point new
loader_info fields to the firmware's command line, rather than having
to do early manipulation of the /chosen bootargs property which may
then be rewritten again by the core.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
David Gibson
2007-03-22 17:02:21 +11:00
committed by Paul Mackerras
parent 27fbaa9702
commit 3af82a8b00
2 changed files with 21 additions and 33 deletions

View File

@ -70,6 +70,8 @@ struct serial_console_data {
struct loader_info {
void *promptr;
unsigned long initrd_addr, initrd_size;
char *cmdline;
int cmdline_len;
};
extern struct loader_info loader_info;