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 41749C4332F for ; Tue, 1 Nov 2022 20:00:49 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E08A184DFC; Tue, 1 Nov 2022 21:00:46 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com 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=konsulko.com header.i=@konsulko.com header.b="I03sDmzi"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 95AFB84DFC; Tue, 1 Nov 2022 21:00:44 +0100 (CET) Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) (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 F0EBC84A90 for ; Tue, 1 Nov 2022 21:00:41 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x731.google.com with SMTP id z30so10331254qkz.13 for ; Tue, 01 Nov 2022 13:00:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=2FHLhECpYZS0PwsqJWvZdPz/zfDXjCzymfpU7La+XqA=; b=I03sDmzivEOj97Vp7yMqK1qs5gzM8up7capJBhZ+6rArrr0ezel/X7fbKYjzKMqPy/ cQ2ISYOrrQ3wNZR+5MD5MQdMzoYGjmwswYkKfXjpaT7o27ExZobO2HvhHx4MysWFmFDa pmQSyezuV//ko9NcpVIkkcE86jl8G+U6+jNt4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2FHLhECpYZS0PwsqJWvZdPz/zfDXjCzymfpU7La+XqA=; b=1a8NfAUzOj9223Qaecn1gZgkA2M2aHg0acIWWSF/KWwblNJkLiZmdReR2MdcDmqies X8d4rtr6B7IAlg01Iwbm2Dz5yIIZddaJlDCmESzH8N9bqoK+XSE96EF3/tUFpl+iqr9F KXNXJ/CBEh4N7IY5ntksMJSo0zDNTP0XxwySxOztqHY28HW0t36bfm+3vJLdlTAgzCht Ygv0X1JMysIU2YXPMa7GjRzl50D5Pt8Kbo9dlPUeLWx1mXc8TuuXaCM90HcYSdVcojM2 pGWxdXHu7fk4K/L5XIvgxNJytOEq8JCOPMrjMtvqSEkCCOSs+dxqEItRU7d4c+eTwq2P 1njg== X-Gm-Message-State: ACrzQf1WpLRTuTXQUvRCfwEkKv6GuVLKGohhc5NWrLRkVoRFMgxcNlp6 2Peu+HTkDHArLUB57Rj6sSmXdQ== X-Google-Smtp-Source: AMsMyM7//8dibABSBFSBUEmMJ4u8ZdBNYDd/gP3UN4i08MvnfFb6OBMa9YJFEGJVCjIOPgfI/btVVQ== X-Received: by 2002:a05:620a:2984:b0:6ee:cc6b:5945 with SMTP id r4-20020a05620a298400b006eecc6b5945mr14296231qkp.323.1667332840709; Tue, 01 Nov 2022 13:00:40 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-e15b-227c-17a8-c48a.res6.spectrum.com. [2603:6081:7b00:6400:e15b:227c:17a8:c48a]) by smtp.gmail.com with ESMTPSA id bn4-20020a05620a2ac400b006f9f714cb6asm7005950qkb.50.2022.11.01.13.00.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Nov 2022 13:00:40 -0700 (PDT) Date: Tue, 1 Nov 2022 16:00:38 -0400 From: Tom Rini To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Max Krummenacher , u-boot@lists.denx.de, U-Boot STM32 , Adam Ford , Patrick DELAUNAY , Patrice CHOTARD , Max Krummenacher , Heinrich Schuchardt , Marek =?iso-8859-1?Q?Beh=FAn?= , Philippe Reynes , Quentin Schulz , Simon Glass Subject: Re: [PATCH v2 1/1] Makefile: rework u-boot-initial-env target Message-ID: <20221101200038.GL2116612@bill-the-cat> References: <20221028161850.565610-1-max.oss.09@gmail.com> <20221028161850.565610-2-max.oss.09@gmail.com> <20221028164047.ljcy67r2itkkrkeb@pali> <20221101173504.25gdj4by7wqclvsv@pali> <20221101194834.GK2116612@bill-the-cat> <20221101195509.bmpsxmhii2wya4f3@pali> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="rPF8rPXpDlNr1aSW" Content-Disposition: inline In-Reply-To: <20221101195509.bmpsxmhii2wya4f3@pali> X-Clacks-Overhead: GNU Terry Pratchett 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 --rPF8rPXpDlNr1aSW Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 01, 2022 at 08:55:09PM +0100, Pali Roh=E1r wrote: > On Tuesday 01 November 2022 15:48:34 Tom Rini wrote: > > On Tue, Nov 01, 2022 at 06:35:04PM +0100, Pali Roh=E1r wrote: > > > On Monday 31 October 2022 11:51:45 Max Krummenacher wrote: > > > > On Fri, Oct 28, 2022 at 6:40 PM Pali Roh=E1r wrot= e: > > > > > On Friday 28 October 2022 18:18:49 Max Krummenacher wrote: > > > > > > quiet_cmd_genenv =3D GENENV $@ > > > > > > -cmd_genenv =3D $(OBJCOPY) --dump-section .rodata.default_envir= onment=3D$@ env/common.o; \ > > > > > > - sed --in-place -e 's/\x00/\x0A/g' $@; sed --in-place -e '= /^\s*$$/d' $@; \ > > > > > > - sort --field-separator=3D=3D -k1,1 --stable $@ -o $@ > > > > > > +cmd_genenv =3D \ > > > > > > + scripts/printinitialenv | \ > > > > > > + sed -e 's/\x00/\x0A/g' -e '/^\s*$$/d' | \ > > > > > > > > > > I think that you do not need this sed anymore as you print newlin= e in > > > > > host tool. > > > >=20 > > > > Missed that one, will change in a V3. > > > >=20 > > > > > > > > > > > + sort --field-separator=3D=3D -k1,1 --stable -o $@ > > > > > > > > > > > > u-boot-initial-env: u-boot.bin > > > > > > > > > > It is needed to update dependencies for u-boot-initial-env target= =2E Now > > > > > it does not depend on u-boot.bin but rather on printinitialenv to= ol. > > > >=20 > > > > I'm unsure if that is the best way forward. The initial solution wo= uld > > > > also not need to depend on u-boot.bin but rather on env/common.o. > > >=20 > > > Yea, it was wrong too. > > >=20 > > > > I guess that the intention was that the U-Boot binary and the > > > > u-boot-initial-env file should not be out of sync. > > >=20 > > > This is not possible to achieve with Makefile build system and is > > > probably also against the logic of make to achieve the best paralleli= sm > > > during build of the project. > > >=20 > > > In _my_ opinion, Makefile targets should have correct dependencies, on > > > which they depend. This will prevent circular dependences and also > > > faster building as make tool can run in parallel as much jobs as > > > possible -- and do not have to wait until main u-boot.bin is built and > > > then call other jobs. > > >=20 > > > Tom, or do you think something different? > >=20 > > Well, this tool has the same environment requirements as tools/env does, > > so we should be able to use the same dependency info? >=20 > Yes, build tool is _able_ to use it. (I think we all agree on this > ability of make) >=20 > But the question is if it _should_ be used. Because Max wrote some > arguments why not to use this env dependency info. Er, I'm lost I guess, sorry. Yes, it should not depend on env/common.o nor u-boot.bin. I guess looking again, we can't borrow just the envtools rules as we also would need to update the section that adds $(defaultenv_h) to envtools would also need to be done for this tool. --=20 Tom --rPF8rPXpDlNr1aSW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmNheuEACgkQFHw5/5Y0 tyxFPwwAinCyKqIO2ezJ+Ldy9Gy0nLbg3i83AGF+0dyHHnMWgnVp0fdMwDa1Nidz oAPQm4gemdT3CBkKgntrcHFKlYfz3GpcX8fnQajeTaYIoYArjheBSjqyxvUVgPIR u1WGzTiNmJgm9IswAHo6EBCsjNouvvu6JlsijyhUZMZXP9D07eEiRI2aqLrR+HlV LeD5O7WwRqUFbzo5s1LIRBt35pKqc/QBg29f4lKjNBOD5T5WUm5WkpMkOAeNB3jo vaIZKS3s2upAqfhmisYzifYIJpfByUTxN1j0IdKnyvB1qMwGwxEcJGKYG67tupC9 MpufSvsJbMqgvK5M2W+ttOs+krzLsYvnyOlGL03OXqyouHc18AwIeXQ+L5EJC+AV 08/3r/rPTelJCS4xL77D62W7oN5iV4MtMTR2lJn6Ah6k6xEzlU1nHW0LUFtAgfY6 F4B/FmiGz9h+HLi/XqAKl34/5eYflyOqOOVdey0FZaBuqEATrLWEmoQOsYj0fkry utoQK9Lz =ZqNn -----END PGP SIGNATURE----- --rPF8rPXpDlNr1aSW--