x86: Allow cmdline setup in setup_zimage() to be optional

If we are passing this using the device tree then we may not want to
set this up here.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2014-10-19 21:11:21 -06:00
parent 0d0ba59ccd
commit 97d1e0c850
1 changed files with 12 additions and 9 deletions

View File

@ -243,6 +243,7 @@ int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot,
hdr->loadflags |= HEAP_FLAG;
}
if (cmd_line) {
if (bootproto >= 0x0202) {
hdr->cmd_line_ptr = (uintptr_t)cmd_line;
} else if (bootproto >= 0x0200) {
@ -255,6 +256,8 @@ int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot,
/* build command line at COMMAND_LINE_OFFSET */
build_command_line(cmd_line, auto_boot);
}
return 0;
}