[PATCH v7 04/24] x86: Don't process the kernel command line unless enabled
Simon Glass
sjg at chromium.org
Sat Dec 18 19:28:30 CET 2021
If the 'bootm' command is not enabled then this code is not available and
this causes a link error. Fix it.
Note that for the EFI app, there is no indication of missing code. It just
hangs!
Signed-off-by: Simon Glass <sjg at chromium.org>
---
(no changes since v1)
arch/x86/lib/zimage.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c
index 7ce02226ef9..9cc04490307 100644
--- a/arch/x86/lib/zimage.c
+++ b/arch/x86/lib/zimage.c
@@ -365,11 +365,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 (max_size=%x, bootproto=%x, err=%d)\n",
- max_size, bootproto, ret);
- return ret;
+ if (IS_ENABLED(CONFIG_CMD_BOOTM)) {
+ ret = bootm_process_cmdline(cmd_line, max_size,
+ BOOTM_CL_ALL);
+ if (ret) {
+ printf("Cmdline setup failed (max_size=%x, bootproto=%x, err=%d)\n",
+ max_size, bootproto, ret);
+ return ret;
+ }
}
printf("Kernel command line: \"");
puts(cmd_line);
--
2.34.1.173.g76aa8bc2d0-goog
More information about the U-Boot
mailing list