summaryrefslogtreecommitdiff
path: root/arch/x86
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-10-19 21:11:21 -0600
committerSimon Glass <sjg@chromium.org>2014-10-22 09:03:05 -0600
commit97d1e0c85018d061ffa4ae612903cd26a795d385 (patch)
tree4e51ae6053d281345199f7904c10863b885cfb20 /arch/x86
parent0d0ba59ccd135addc345568e5678400d01d356db (diff)
downloadu-boot-imx-97d1e0c85018d061ffa4ae612903cd26a795d385.zip
u-boot-imx-97d1e0c85018d061ffa4ae612903cd26a795d385.tar.gz
u-boot-imx-97d1e0c85018d061ffa4ae612903cd26a795d385.tar.bz2
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>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/lib/zimage.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c
index 1f59bf2..2f0e92f 100644
--- a/arch/x86/lib/zimage.c
+++ b/arch/x86/lib/zimage.c
@@ -243,18 +243,21 @@ int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot,
hdr->loadflags |= HEAP_FLAG;
}
- if (bootproto >= 0x0202) {
- hdr->cmd_line_ptr = (uintptr_t)cmd_line;
- } else if (bootproto >= 0x0200) {
- setup_base->screen_info.cl_magic = COMMAND_LINE_MAGIC;
- setup_base->screen_info.cl_offset =
- (uintptr_t)cmd_line - (uintptr_t)setup_base;
+ if (cmd_line) {
+ if (bootproto >= 0x0202) {
+ hdr->cmd_line_ptr = (uintptr_t)cmd_line;
+ } else if (bootproto >= 0x0200) {
+ setup_base->screen_info.cl_magic = COMMAND_LINE_MAGIC;
+ setup_base->screen_info.cl_offset =
+ (uintptr_t)cmd_line - (uintptr_t)setup_base;
+
+ hdr->setup_move_size = 0x9100;
+ }
- hdr->setup_move_size = 0x9100;
+ /* build command line at COMMAND_LINE_OFFSET */
+ build_command_line(cmd_line, auto_boot);
}
- /* build command line at COMMAND_LINE_OFFSET */
- build_command_line(cmd_line, auto_boot);
return 0;
}