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 00D8BC4332F for ; Wed, 23 Nov 2022 18:23:04 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A5EF18557D; Wed, 23 Nov 2022 19:23:02 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org 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=kernel.org header.i=@kernel.org header.b="S//n2z0x"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1129B855A6; Wed, 23 Nov 2022 19:23:01 +0100 (CET) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5DC0985252 for ; Wed, 23 Nov 2022 19:22:58 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BB92861E52; Wed, 23 Nov 2022 18:22:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E952BC433D7; Wed, 23 Nov 2022 18:22:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669227776; bh=rUvR8yimH8HEHjI2DkXovfpRW7/lioMYLXSZiuY2Ip4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=S//n2z0xtvASq3mr7PlF+XVJM8iS7HjZcgVPzjMVu5zZO3A7tmaqJ/27tjm8sBWBF B/3IAJAMKz/hgCqMJ0KH4zc6TpdiP4UqQBAt9Xi0TREWxQT7Tc2Ghx4BZllH1Pu4Fl xSwN5GN+aTFWyB3b+2hpypeaMWPLlgBMit+tf2wx3MsmNSuNl8r08rpJiq7Ry7LXz8 O3DcP93GAf05Vg1okj34lI0Ybjnv+/NQgQNsusLnQrCXsy0X67UfOC0Np7Yxizix8T F/NdQS7txECEpkVNSJVT6lndnMXmKx0qlzsT5lZgZbsKbYKIQIowsc0K2ZvdSdhjHK dq1EYDPxEuCHw== Received: by pali.im (Postfix) id E4D0C3F6; Wed, 23 Nov 2022 19:22:52 +0100 (CET) Date: Wed, 23 Nov 2022 19:22:52 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Tom Rini Cc: Max Krummenacher , u-boot@lists.denx.de, Patrick DELAUNAY , Patrice CHOTARD , U-Boot STM32 , Adam Ford , Max Krummenacher , AKASHI Takahiro , Du Huanpeng , Heiko Thiery , Heinrich Schuchardt , Marek =?utf-8?B?QmVow7pu?= , Quentin Schulz , Samuel Holland , Simon Glass , Stefan Roese Subject: Re: [PATCH v4 1/1] u-boot-initial-env: rework make target Message-ID: <20221123182252.d256feeti4iuaf63@pali> References: <20221108085222.1378781-1-max.oss.09@gmail.com> <20221108085222.1378781-2-max.oss.09@gmail.com> <20221123181840.GA1482451@bill-the-cat> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221123181840.GA1482451@bill-the-cat> User-Agent: NeoMutt/20180716 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.6 at phobos.denx.de X-Virus-Status: Clean On Wednesday 23 November 2022 13:18:40 Tom Rini wrote: > On Tue, Nov 08, 2022 at 09:52:22AM +0100, Max Krummenacher wrote: > > > From: Max Krummenacher > > > > With LTO enabled the U-Boot initial environment is no longer stored > > in an easy accessible section in env/common.o. I.e. the section name > > changes from build to build, its content maybe compressed and it is > > annotated with additional data. > > > > Drop trying to read the initial env with elf tools from the compiler > > specific object file in favour of adding and using a host tool with > > the only functionality of printing the initial env to stdout. > > > > See also: > > https://lore.kernel.org/all/927b122e-1f62-e790-f5ca-30bae4332c77@foss.st.com/ > > > > Signed-off-by: Max Krummenacher > > Acked-by: Pali Rohár > > Alright, so 'make tools-only_defconfig tools-only' now fails to build > because we're missing the dependencies to make sure that we have > generated/environment.h available. > https://source.denx.de/u-boot/u-boot/-/jobs/532186 We cannot generate generated/environment.h in tools-only mode without real board because environment is always board dependent. Therefore that new env tool has to be compiled only when doing full real board build, not just tools-only build. So I would suggest to extend Makefile put that new tool under some "if" to exclude compilation in tools-only mode.