From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76581C433F5 for ; Sat, 25 Sep 2021 00:44:13 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D0F9C6103B for ; Sat, 25 Sep 2021 00:44:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D0F9C6103B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DEB8E83548; Sat, 25 Sep 2021 02:44:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="ABWZnK2U"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E7E0F8352E; Sat, 25 Sep 2021 02:32:35 +0200 (CEST) Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com [IPv6:2607:f8b0:4864:20::235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1DB43834D8 for ; Sat, 25 Sep 2021 02:31:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-oi1-x235.google.com with SMTP id a3so16861590oid.6 for ; Fri, 24 Sep 2021 17:31:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nXB5psFLIXtR/N5snAX5ey8+EvgCzhaspTMIV5ciNZg=; b=ABWZnK2UvXChUYCu1OlzimyJ5bVAd4ZLYUuEfYX5f8mT2ZlfSWaG4jN5cN0pCoAYbA mrHNnoZ+eii+53lHKOF+lXzu6q5rHWFjDSdAfzY8L7nMjDhFOQ1r7LLlGzH/ZjxauZy8 YSjTT0wK4O101Fx8QwjPOXvmkzQ84FN4I1F8I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nXB5psFLIXtR/N5snAX5ey8+EvgCzhaspTMIV5ciNZg=; b=Kwn/bcTdcVLlCiNJ1dEW3/gS9g7Fht/BgggEifaj5eU5FFu00+lSgQR9KjRNkZwcRM 2m5mbWypc6410OSAOnBcn1nXOMadsK6LftGKkRVS25m5WBsgcgXHoC8Xw8X5ek3iQRk2 Y+bleTimpNMuk+9jrXV2LjkYW/bOldpbsnZ0vi5EPDksyREVrYZ5UmWGqirCYhT27ljY EtFmE75AAoGVTy6pkzg5yXRUYxCsO/6nKCXvmPk91xnqofefRKkPTHPVD3uzYF+jeQCH MYJqPLXcTlnXcYXIhMQ1CnF/3Jl4ELcZmQXgRC4LaNSsjSb8RdJs+jtsJa8t4ZTHK2kb guOg== X-Gm-Message-State: AOAM531jsf2jXg0youmI+GwY3SzANS47VfkItYDGYaDOqQDqHwjV9L85 upJ3n5ccfb/ELZAxoa3MhsUCBJ9xHqjJuw== X-Google-Smtp-Source: ABdhPJw4H2c1tIwcsh1t5/4mBhXrQ3RaL2ueT6MOn4BIG44V/x7EYrCFq3XQD8xYRyUPdikXqljT8w== X-Received: by 2002:a05:6808:150c:: with SMTP id u12mr3665469oiw.136.1632529886605; Fri, 24 Sep 2021 17:31:26 -0700 (PDT) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id y83sm2491462oia.47.2021.09.24.17.31.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Sep 2021 17:31:26 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Heinrich Schuchardt , Bin Meng , Christian Melki , Tom Rini , Ilias Apalodimas , Simon Glass Subject: [PATCH v2 27/39] x86: Don't process the kernel command line unless enabled Date: Fri, 24 Sep 2021 18:30:43 -0600 Message-Id: <20210925003055.759305-12-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.685.g46640cef36-goog In-Reply-To: <20210925003055.759305-1-sjg@chromium.org> References: <20210925003055.759305-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean 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 --- (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.33.0.685.g46640cef36-goog