aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-11-05 10:33:46 -0700
committerTom Rini <trini@konsulko.com>2020-12-04 16:10:00 -0500
commit488d89afb88af5f148c7c7cf97ac382a0537b4f7 (patch)
tree20a9e3fcc24ed804b7d90ff69a725babca85f040 /arch
parent4448fe8e4e7cc4dc5336a2d27fa6048057eaf1a6 (diff)
downloadu-boot-488d89afb88af5f148c7c7cf97ac382a0537b4f7.zip
u-boot-488d89afb88af5f148c7c7cf97ac382a0537b4f7.tar.gz
u-boot-488d89afb88af5f148c7c7cf97ac382a0537b4f7.tar.bz2
x86: zimage: Add silent-console processing
At present zimage does its own command-line processing and does not support the 'silent console' feature. There doesn't seem to be any good reason for this. Add support for silent console to zimage. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/lib/zimage.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c
index 50fb16d..f154827 100644
--- a/arch/x86/lib/zimage.c
+++ b/arch/x86/lib/zimage.c
@@ -15,6 +15,7 @@
#define LOG_CATEGORY LOGC_BOOT
#include <common.h>
+#include <bootm.h>
#include <command.h>
#include <env.h>
#include <irq_func.h>
@@ -330,7 +331,12 @@ int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot,
}
if (cmd_line) {
+ int max_size = 0xff;
+ int ret;
+
log_debug("Setup cmdline\n");
+ if (bootproto >= 0x0206)
+ max_size = hdr->cmdline_size;
if (bootproto >= 0x0202) {
hdr->cmd_line_ptr = (uintptr_t)cmd_line;
} else if (bootproto >= 0x0200) {
@@ -346,6 +352,14 @@ int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot,
strcpy(cmd_line, (char *)cmdline_force);
else
build_command_line(cmd_line, auto_boot);
+ ret = bootm_process_cmdline(cmd_line, max_size, BOOTM_CL_ALL);
+ if (ret) {
+ printf("Cmdline setup failed (err=%d)\n", ret);
+ return ret;
+ }
+ printf("Kernel command line: \"");
+ puts(cmd_line);
+ printf("\"\n");
}
if (IS_ENABLED(CONFIG_INTEL_MID) && bootproto >= 0x0207)