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 X-Spam-Level: X-Spam-Status: No, score=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21395C433EF for ; Wed, 8 Sep 2021 13:39:17 +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 A292261164 for ; Wed, 8 Sep 2021 13:39:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A292261164 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 EFAA9834AB; Wed, 8 Sep 2021 15:36:14 +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="Y83NIHIn"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EC62B833BD; Wed, 8 Sep 2021 15:35:12 +0200 (CEST) Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) (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 E576B833AB for ; Wed, 8 Sep 2021 15:34:49 +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-wm1-x331.google.com with SMTP id g74so1740421wmg.5 for ; Wed, 08 Sep 2021 06:34:49 -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=VWe1FTGwbG4aXHYjwycvOtySfXdbvnzJzAfL2JMxQ28=; b=Y83NIHInQTP5nd68MztLZtJyATovVKeO2IVNQt64GvGjEaGsavSUVTAFIQqBk9FR54 hZ/Q083Ah4v2Y3fz0RUPsfJDYPHUdtgUDKRSpTWJdnujouYOk4R4S6OOv0fhJu3Oy7wL sLTJodQvFyVb/FWOC2MINyuZ1TV1XKZvr/ICM= 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=VWe1FTGwbG4aXHYjwycvOtySfXdbvnzJzAfL2JMxQ28=; b=iyfhHub3QvcM4fEp7ZMEiYBrmLNOq9JK8kyYH1TJC2DwWpjYBkLzwqHm5i2k4FNvKp jikGc/nTx3Fm7cdcrJKjDHJ7LfC/KsNSkNRh1GWGL63yt2gfxPPvSpBejZTFl7h677E0 0X5tFJofz/qbCyrjjcCCYQYjPv/52q9Y97dpe/7EPlHOnDkf7TgxLoGMB2PNXdo8r3kB 613YbfGqQ6LmQyZ/Y62o/pUC1L6vwOnK0YKk+c6VechwT89RzMHbQH9bkKCLjmj+b01k yMyjooP62Dv9vkh00QgQqInxcNno+24B9b+Tmy9sU25KAd0bK+3OmcNkwpascKpbCHhd 5Vrw== X-Gm-Message-State: AOAM5306t6eA7rHC+BaW6e9mGhRQjtkairKyaO5X9qwm9gNNWtKfrA97 qlOxHMuXyLnOhuUXuv6A7HkwgiGNpGJcWbH0 X-Google-Smtp-Source: ABdhPJz1I2PdxoJZ7NxEjbNqgnIjw/mepyS24tmfgPfEbpwh1oLXNbZmfGFpWgHxdtbn8aeqihYflg== X-Received: by 2002:a05:600c:2295:: with SMTP id 21mr3662411wmf.84.1631108089155; Wed, 08 Sep 2021 06:34:49 -0700 (PDT) Received: from sjg1.roam.corp.google.com (82-69-54-180.dsl.in-addr.zen.co.uk. [82.69.54.180]) by smtp.gmail.com with ESMTPSA id l2sm2209065wmi.1.2021.09.08.06.34.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Sep 2021 06:34:48 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Ilias Apalodimas , Heinrich Schuchardt , Bin Meng , Tom Rini , Christian Melki , Simon Glass Subject: [PATCH 25/35] x86: Don't process the kernel command line unless enabled Date: Wed, 8 Sep 2021 07:33:55 -0600 Message-Id: <20210908133405.696481-10-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.153.gba50c8fa24-goog In-Reply-To: <20210908133405.696481-1-sjg@chromium.org> References: <20210908133405.696481-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 --- 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.153.gba50c8fa24-goog