diff options
author | Simon Glass <sjg@chromium.org> | 2021-12-29 21:57:39 +0300 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2021-12-31 08:45:01 +0300 |
commit | 440c6645aa501e9dfe96fa314c1db78cbb42f453 (patch) | |
tree | 8ef1f2448ee4ff3be84f5eba31a2c452c9eef42c /arch/x86 | |
parent | 6e7ad4a45f6e2b036fc56942293b8471ece3341d (diff) | |
download | u-boot-440c6645aa501e9dfe96fa314c1db78cbb42f453.tar.xz |
x86: Don't process the kernel command line unless enabled
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@chromium.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/lib/zimage.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c index 7ce02226ef..9cc0449030 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); |