From patchwork Sat Dec 4 15:56:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1563612 X-Patchwork-Delegate: xypron.glpk@gmx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=XOWXllZb; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4J5vW65GNsz9sCD for ; Sun, 5 Dec 2021 02:58:42 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1DE6F830F4; Sat, 4 Dec 2021 16:58:12 +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="XOWXllZb"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1B497830BC; Sat, 4 Dec 2021 16:57:33 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x335.google.com (mail-ot1-x335.google.com [IPv6:2607:f8b0:4864:20::335]) (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 D8595830B3 for ; Sat, 4 Dec 2021 16:57:20 +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-ot1-x335.google.com with SMTP id 35-20020a9d08a6000000b00579cd5e605eso7724451otf.0 for ; Sat, 04 Dec 2021 07:57:20 -0800 (PST) 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=v1HcVrUUDblhkc6PV+VCCRsFQaKGq97gJT64XCvR9pM=; b=XOWXllZblYirEzjl41x3pTYH3Wzo4SmkYVDqOBkvze3rewMKTWbGqILkTIcBZ+TRAA JLum7wiKmcRzY/QOqslIQtQxBU3Y9S7kczH6E0f1dEHUXHLN924PH/lVF5L7gs3Q93kN HA5yPA53QLuV69456tf9lrgsLfgdgc5RA/w1Y= 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=v1HcVrUUDblhkc6PV+VCCRsFQaKGq97gJT64XCvR9pM=; b=BDIj9n3RSz31bDiL59q5eKNnceUeBHy0pXhmWoWQKc55yFSOrfdk6EopD/9L4yv67D AUJyduYESHYmAQCRbGtm2jvW37a2ENBkW4wJaLAHGHbAD98JHuxCajCgQwBw+zP9FV+8 xPrxa4WNkz3kF/XF/WhxTUQClh/kkdOPU9C87QmU0GgSZ0kWMmH3rBLw7TV7ql1+RbB4 qHa3TXl5MfR2TfHm8nVB2QeW+qweaG27oFwoRil/aBGnyxfhXa+mfToIVmDzfJDpGqQP wD1YeentuNhzxj5BhrgrKtOW8OgX02l4fur3oeBCz+CKqUYQdwSvFVLegwgEsAHct4OC 9ViA== X-Gm-Message-State: AOAM532pAAQI/KbiBMW+9AKxwiQh3SF/jUlTl0hpzDERIs4mtq0gTDCJ sdyOWOI+lBTcMDpG2g8MC1RKz2DlzK93uQ== X-Google-Smtp-Source: ABdhPJzAb5GtZUrJi07OuROt5hc437WDSwjd/yb9Va5AgAb5SFwMhU5WMZBLuf1X2d4J7q9iSIfMww== X-Received: by 2002:a9d:77d1:: with SMTP id w17mr21397297otl.329.1638633439383; Sat, 04 Dec 2021 07:57:19 -0800 (PST) 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 a12sm1230513otk.35.2021.12.04.07.57.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Dec 2021 07:57:19 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Ilias Apalodimas , Christian Melki , Bin Meng , Heinrich Schuchardt , Tom Rini , Simon Glass Subject: [PATCH v5 08/28] x86: Don't process the kernel command line unless enabled Date: Sat, 4 Dec 2021 08:56:37 -0700 Message-Id: <20211204155657.2913911-5-sjg@chromium.org> X-Mailer: git-send-email 2.34.1.400.ga245620fadb-goog In-Reply-To: <20211204155657.2913911-1-sjg@chromium.org> References: <20211204155657.2913911-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 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);