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 66CA8C433F5 for ; Fri, 1 Apr 2022 00:14:47 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A357783BB6; Fri, 1 Apr 2022 02:14:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="qZviiuXg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 07386840EC; Fri, 1 Apr 2022 02:14:43 +0200 (CEST) Received: from mail-qv1-xf36.google.com (mail-qv1-xf36.google.com [IPv6:2607:f8b0:4864:20::f36]) (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 AB30281DDF for ; Fri, 1 Apr 2022 02:14:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qv1-xf36.google.com with SMTP id kl29so877632qvb.2 for ; Thu, 31 Mar 2022 17:14:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=jQXnI0lJ2mS5Hjtd+XLi22IXYPOU1VsR6BHbeWH1m8M=; b=qZviiuXg4h1QSlkvFOUnOcj0C/EJG5+8pvJET+iMwxkV2KS1VAWpMeEda2g/wM/125 USKpL6WBrKXSdi1eQPVexnp02qCvZsunXssBgBNcPNZC/JC8tN6WnuyH/9eXU9o61qrL JfCJHaRfrD35J4+DeIzSBvGvF/zsIUncpK6Aont4Hs5gICkfDkgiRydH1Ip6grIHfETF BB/caGsdPE4wLWA1XOoo0fxJ2jiYGj5NiztCxwaazk9KGrXUUy1qwnQVYD/CHWuYB3UX KD1fHDyNmTLLw38857g0r6II/V1mRNzVv1aaGxQryMvyaslTJ4rUUCyTZidjySHzPThu g8+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=jQXnI0lJ2mS5Hjtd+XLi22IXYPOU1VsR6BHbeWH1m8M=; b=icnv4Ej7HXuuP60g9YKr/xvonRGpopPfVTG/0kOhDz2AKdtPHwh8+ZJU8XPP3YC/iQ PlX9p2YFqzYuKtzbXOB7+dAUs3Vc4BIeOoxwZfNpRbR6+1XdcV60e2C2iQJi/VIrWu3A +WYBzI3Zb4cqBsuvBTsLpLNJiRYHGQCG61kFYGVHRZss5Y0acR/GPbMedSugpFeajljc CkDjSclz5TpeSDW7tcxsGkUhCFB9sIhcd6RoqPomoFu/LC6ZfGeRZKtQZ63VCV+POTLv jT6Fm5v+SqTi0FO7x6Vjok2Gmc0Vjr6MjjQ+hFyf4Ix2HhaQ7qE195jq28GUXfQw8/55 FYpA== X-Gm-Message-State: AOAM531ubpOp3lH1cZp+bLyr9VDozgjQvvQ2ko7A/5gbsKf+ecwOC72r 1sqyH+nB1nsZgp2D+q90Y7o= X-Google-Smtp-Source: ABdhPJwXEqqREaIVT8tjSsMpp9YLjRHHZAb1SyqCxfLn4oQ82DFotholuBkOq2kpnZ3LPyhqIvhA7Q== X-Received: by 2002:a0c:c404:0:b0:431:31c3:3d15 with SMTP id r4-20020a0cc404000000b0043131c33d15mr38147363qvi.116.1648772075330; Thu, 31 Mar 2022 17:14:35 -0700 (PDT) Received: from [192.168.1.201] (pool-108-18-137-133.washdc.fios.verizon.net. [108.18.137.133]) by smtp.googlemail.com with ESMTPSA id t67-20020ae9df46000000b006809a144ac1sm479547qkf.99.2022.03.31.17.14.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 31 Mar 2022 17:14:34 -0700 (PDT) Subject: Re: [PATCH] env: Avoid using a leftover text-environment file To: Simon Glass , U-Boot Mailing List , Tom Rini Cc: Joe Hershberger , =?UTF-8?Q?Marek_Beh=c3=ban?= References: <20220312053723.517229-1-sjg@chromium.org> From: Sean Anderson Message-ID: <86d45c5a-269f-c1a8-b80c-1d204bf16281@gmail.com> Date: Thu, 31 Mar 2022 20:14:34 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20220312053723.517229-1-sjg@chromium.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.5 at phobos.denx.de X-Virus-Status: Clean Hi Tom, On 3/12/22 12:37 AM, Simon Glass wrote: > If include/generated/environment.h exists (perhaps leftover from a build > of another board) it is used, even if the board currently being built does > not have a text environment. > > This causes a build error. Fix it by emptying the file if it should not be > there. > > Fixes: https://source.denx.de/u-boot/u-boot/-/issues/9 > Signed-off-by: Simon Glass > Reported-by: Sean Anderson > --- > > Makefile | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/Makefile b/Makefile > index 9ef34ca4b7f..2351d6dacd2 100644 > --- a/Makefile > +++ b/Makefile > @@ -1834,7 +1834,9 @@ ENV_FILE := $(if $(ENV_SOURCE_FILE),$(ENV_FILE_CFG),$(wildcard $(ENV_FILE_BOARD) > > # Run the environment text file through the preprocessor, but only if it is > # non-empty, to save time and possible build errors if something is wonky with > -# the board > +# the board. > +# If there is no ENV_FILE, produce an empty output file, to prevent a previous > +# build's file being used in the case of in-tree builds. > quiet_cmd_gen_envp = ENVP $@ > cmd_gen_envp = \ > if [ -s "$(ENV_FILE)" ]; then \ > @@ -1845,6 +1847,7 @@ quiet_cmd_gen_envp = ENVP $@ > -I$(srctree)/arch/$(ARCH)/include \ > $< -o $@; \ > else \ > + rm $@; \ > touch $@ ; \ > fi > include/generated/env.in: include/generated/env.txt FORCE > Can you pick this up for the release? I find myself needing to dig it up and apply it every time I build sandbox then go back to another board. --Sean