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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 14619C433EF for ; Thu, 30 Dec 2021 06:12:03 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AF0A882F98; Thu, 30 Dec 2021 07:12:00 +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="JZIqksOB"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 17B5382FAF; Thu, 30 Dec 2021 07:11:59 +0100 (CET) Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) (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 D016E816A2 for ; Thu, 30 Dec 2021 07:11:55 +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@google.com Received: by mail-pf1-x42d.google.com with SMTP id t187so7041053pfb.11 for ; Wed, 29 Dec 2021 22:11:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ub6jBCDuktp+caT5FLHpY6uCn7GPO94Mbr3IrQQgz1c=; b=JZIqksOBK5Tf87kpxaJeyk3ujdVfJ9OjFOiv01RgcP7dCv147Oh+Jwxoka7xwTVzv1 izTfRWBlEdWI5XesK/k7g6OdFA39V0sbhg1NouMQwSW3xWxLc6n88ONdnFzoa3gYQxhM r8DjrX9I4hVSini1uXV2QSjrl8dLJiGf01XCE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ub6jBCDuktp+caT5FLHpY6uCn7GPO94Mbr3IrQQgz1c=; b=F8E8ljXUFvHUQ+VlC3y38gx6SgGlQ6ICasQIcMKIRm52m5pdl+E6xahWjWBDErNlQw HLfeMPxR+EPmlNcuiCVAV3rA5U4YBVm6imj2SVi50lCfK3AbK6WyLwnc8jT5KPvtBe+c TFqKoOkEn7QoOyu4e8UpKF4cEUZsebzxwXOGSz97EBRs6b6JBxOPPgMRnAP+3nzzZL50 3/yrOq+8MqgMUjAGBO1EiCe7VIct9MjAkYVVzPhJeED9lXlcTc4HbyxGZsfoB10krJOV nobPwfdp0QhCA8tXrZJB9yhNGQ5ephlqxX6uvPAwLIbovHDEp29ZO/CS7FtqxZT24BMq seag== X-Gm-Message-State: AOAM532dcWsGsRr1QxrcwmthSR187NuHjz61DjWI6FuZwLn7kEeEzYJq Uf2z2crladgtx5ZkRcD0M6bQWa2JJBLDnnzNiZGiBzBcHDrMOr6a X-Google-Smtp-Source: ABdhPJzsIBvuHWT2+jcHSP5SGONuIlOeccN6S8pHSFGaP/kYab/zjJIAKhjdhUlgUdfgyiqOMuiVzBkZ8BlMrxazaoY= X-Received: by 2002:a67:ee1a:: with SMTP id f26mr8159370vsp.51.1640844193372; Wed, 29 Dec 2021 22:03:13 -0800 (PST) MIME-Version: 1.0 References: <20211218182850.1121923-1-sjg@chromium.org> <20211218182850.1121923-4-sjg@chromium.org> <7943de60-e073-bf51-f76d-edc36f1bed5e@gmx.de> <20211229134511.GC2773246@bill-the-cat> In-Reply-To: <20211229134511.GC2773246@bill-the-cat> From: Simon Glass Date: Wed, 29 Dec 2021 23:03:02 -0700 Message-ID: Subject: Re: [PATCH v7 04/24] x86: Don't process the kernel command line unless enabled To: Tom Rini Cc: Heinrich Schuchardt , Christian Melki , Ilias Apalodimas , Bin Meng , U-Boot Mailing List Content-Type: text/plain; charset="UTF-8" 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 Hi Tom, On Wed, 29 Dec 2021 at 06:45, Tom Rini wrote: > > On Wed, Dec 29, 2021 at 06:36:30AM -0700, Simon Glass wrote: > > Hi Heinrich, > > > > On Tue, 21 Dec 2021 at 00:37, Heinrich Schuchardt wrote: > > > > > > On 12/18/21 19:28, Simon Glass wrote: > > > > 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)) { > > > > > > For zImages we have command bootz. Why would you disable this if > > > CONFIG_CMD_BOOTZ=y? > > > > Well, without the 'bootm' command, this bootm_process_cmdline() > > functoin does not exist. So it just hangs. One thing we need to fix is > > that it should give a build error when a function is missing, not just > > hang. But in any case, this would prevent a build error if that > > worked. So we still need this change. > > Perhaps a new common symbol for CMD_BOOT[IMZ] to select to control the > common do_bootm_* code inclusion, both here, other arch code and > boot/Makefile. Yes, that would be good. Regards, Simon