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 0C987C433F5 for ; Thu, 4 Nov 2021 03:16:58 +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 7FF4160EDF for ; Thu, 4 Nov 2021 03:16:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7FF4160EDF 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 DC52E83121; Thu, 4 Nov 2021 04:16:32 +0100 (CET) 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="OxEOh0//"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E885F82DB4; Thu, 4 Nov 2021 04:16:26 +0100 (CET) Received: from mail-oi1-x22d.google.com (mail-oi1-x22d.google.com [IPv6:2607:f8b0:4864:20::22d]) (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 1B69783693 for ; Thu, 4 Nov 2021 04:10:08 +0100 (CET) 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-x22d.google.com with SMTP id o4so6971726oia.10 for ; Wed, 03 Nov 2021 20:10:08 -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=waDbaQ0rp9IzJwdqqOMg5urlB/GvVcbsvkjdYvMtX6I=; b=OxEOh0//jgdNuNIilyH1gl/bH3rRqbdiyEdlmVNH2qjl6qZScxPkbmmMuTUH/bsreP fpQEfOHNfRt8nOA+O4g7M7f3cpaLbDeBu2S/gJ4kC8gytyhgLBxJlXt8g4edH7d2y5OS d+Rfr5b5h86H8/ZnZsnxCYA8+DDo+B4Nff6Zo= 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=waDbaQ0rp9IzJwdqqOMg5urlB/GvVcbsvkjdYvMtX6I=; b=205X8vAbbD/+5iofTPbSY1ebfNcqGItzzsMecpESZ62j/an00spVG8vkUFEXzB+r9U xHDxGZEbgscNUX17+KchQhUNa9P+NovRARmLiWlZfegrddOS6NDtFEoWyoQkkksQN2hc gRKhrx8GDtoN8Zy1RarZVZ11tKYe9a3YhKAKeQBBDAOhNLxIz+//fUW7LpgisPDgZeVG SqRiDjfUXNcY6BqyE5HiBa01B++E7j70EJyMikWTAomgu1e7ht1e2ChLirz2/Zqgnqdb A8f9aLXFtm62zrskL1NA8lfaSub4FpygN42OgE2j2AqDbnJD2cUrNP/mZLj81GglJsjG t6CQ== X-Gm-Message-State: AOAM530I3VrFLX8pGcAJcYjV0pFtFIkZne3TzjdLwQrab3RgyzelEeOA qpJ0IANki8YhUfLBs3HW/Hqz/NM9Q1n8dA== X-Google-Smtp-Source: ABdhPJwOJMt4QvfGaN+T21e3K/dEeIhlxT39QfHEiPHbJW/yb707q0P7Mdf1fTZVZ00Iip4R5njH0Q== X-Received: by 2002:aca:1219:: with SMTP id 25mr13480141ois.149.1635995404919; Wed, 03 Nov 2021 20:10:04 -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 j25sm1050197oos.23.2021.11.03.20.10.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Nov 2021 20:10:04 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Ilias Apalodimas , Tom Rini , Christian Melki , Heinrich Schuchardt , Bin Meng , Simon Glass Subject: [PATCH v4 20/34] x86: Don't process the kernel command line unless enabled Date: Wed, 3 Nov 2021 21:09:22 -0600 Message-Id: <20211104030936.2446706-10-sjg@chromium.org> X-Mailer: git-send-email 2.34.0.rc0.344.g81b53c2807-goog In-Reply-To: <20211104030936.2446706-1-sjg@chromium.org> References: <20211104030936.2446706-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.34.0.rc0.344.g81b53c2807-goog