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 A0F75C433F5 for ; Tue, 26 Oct 2021 03:35:24 +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 228A461074 for ; Tue, 26 Oct 2021 03:35:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 228A461074 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 E2E0483602; Tue, 26 Oct 2021 05:33:32 +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="PW6h3NiL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E5119835A6; Tue, 26 Oct 2021 05:31:41 +0200 (CEST) Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) (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 D99B5835AE for ; Tue, 26 Oct 2021 05:31:26 +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-io1-xd32.google.com with SMTP id b188so18312316iof.8 for ; Mon, 25 Oct 2021 20:31:26 -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=AvGJO7FBtsGHGd950BRYzX9TpoJwtHRRaHSNyee7Aqc=; b=PW6h3NiLoMqXkgIZciTndP5ma3LRtA2k1ois/LI3lfF8cDQTvXnW1D3A2U6DQdOmHa sFU7kyfQlu1s08y40oIw3stN4hNAJ9pY5BSHecDe6eYoQpiGwJwEfaIvVk3XiISD8v+0 6KfBP9bh4v7594f9ZWX/NVuqRjn+uYYnaHUKM= 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=AvGJO7FBtsGHGd950BRYzX9TpoJwtHRRaHSNyee7Aqc=; b=ba99Q7F6DlJ5khMbVn3HXWOpshEU6uT0xWogb4fcv6mN2ZCuvXtUOnStcz1iVZRfIZ 1neIBsBjt7yLKJY6r0mT+iuIfdysJfRpxqSYxzG2KX6yeNl1cz6A7RjpD2Kp6hhXll9V tr+q14XaX3vj6bwGLAAZ6ZEKGOFHoRN6JnQyCD3QPFPz02oWIApQbCLYayUWN0Xt3RTv LThDwC2YJbOhSUMFOUDQRAFhDI+UdEi77JaFujzK0jwMsy0qvoMvCMHz2nxFG1LsyDr6 7GYDu1/oaWMBwW4hV++5wVxak00VRySSmp2Y3GgP7+rCR9GjZRwWTh0gNTZtOABzEKvc scHg== X-Gm-Message-State: AOAM533IKRPpoTB8Y/n0BJRGnvvfXWJKD6D6G2n4M+BmzEqubr2JBuwV SWsIy0Gp2zTKUciLYFKPz0N8t8ldh03Ddg== X-Google-Smtp-Source: ABdhPJw9olWsT5ALYjN5pid+oy9ak0OMHXUvbq1SkZSg7vVQ6PEPtMpUbfOVjnrkYU6xRQwz8tCTvA== X-Received: by 2002:a05:6602:2a42:: with SMTP id k2mr13556946iov.97.1635219085419; Mon, 25 Oct 2021 20:31:25 -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 s10sm10127203ild.78.2021.10.25.20.31.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Oct 2021 20:31:25 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Ilias Apalodimas , Christian Melki , Bin Meng , Tom Rini , Heinrich Schuchardt , Simon Glass Subject: [PATCH v3 21/35] x86: Don't process the kernel command line unless enabled Date: Mon, 25 Oct 2021 21:30:44 -0600 Message-Id: <20211026033058.430010-10-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.1079.g6e70778dc9-goog In-Reply-To: <20211026033058.430010-1-sjg@chromium.org> References: <20211026033058.430010-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.1079.g6e70778dc9-goog