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 9F921C27C40 for ; Thu, 24 Aug 2023 14:45:44 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2646E86672; Thu, 24 Aug 2023 16:45:43 +0200 (CEST) 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="DinjybyD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 255A2866E1; Thu, 24 Aug 2023 16:45:42 +0200 (CEST) Received: from mail-yw1-x112f.google.com (mail-yw1-x112f.google.com [IPv6:2607:f8b0:4864:20::112f]) (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 3E2F88077D for ; Thu, 24 Aug 2023 16:45:39 +0200 (CEST) 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-yw1-x112f.google.com with SMTP id 00721157ae682-58fb8963617so56509317b3.3 for ; Thu, 24 Aug 2023 07:45:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1692888338; x=1693493138; 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=RuZuNba/1z1BSYPHNRIyTDmuzVfAzMDhfdqChAwlfwI=; b=DinjybyDYxqzbChph6I0O09T63Mc/v9df7iW/jDgw2sn6wptW6HnbyXN/PuB7wskDH 9PVkMrGgKfQ2VPEurj8+7P+zGt/4wfelOKyPVBZ6lRnrwYVHDBf9R/jYrEPGCMOy7uWx E5OMFkP3T9BlItHPDpikCvh9TIYT1/du0WDDU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692888338; x=1693493138; 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=RuZuNba/1z1BSYPHNRIyTDmuzVfAzMDhfdqChAwlfwI=; b=IuVj3O6Yn5Q1Gp1VkTfz2MiGEmHxvLuvxcJfSTPNW/2VvQp0sNhft8E7/OjzQ82DVs JKS4dsxm7XCOPRXevbaeLFRZmij5+mewXjuDoAsZa4okbdrl9r0u6sqm92/QFXkJDvb5 gtSqQRQSOgXxJWdXiO0mxWyEj1sVmjqCdDMRcSHNiSy6CIIGLJqfIMWfe6ZfweGdqvj1 yVgaNOuVeezbm/wvbYlBtgqIUSuQ//4022hDST7gL3qKQ2uVzwZKgVC13Pt5NC0T9wsz 6HjA7FgDOWz/sIMEcz4noUibfIByMfxXa7TsP5xH6frB2qaj/18qq64bLA1LnMfUeq0r oXdQ== X-Gm-Message-State: AOJu0YyZCCI/I9Tv39GZ0oI6Y/7OAxUFvBA6a/Y/IaIlBjY5ohTlRdDX lmPyec5b8/FcQbCqpG4eUIAsMA== X-Google-Smtp-Source: AGHT+IELgZXg7ay13oUpcFbbrKsE5BUDJLNTgTUTkiB0lLy+EjakcXJMZ1z+Tm0GMEuzOjpL2LKY8w== X-Received: by 2002:a0d:df57:0:b0:584:3f4a:b790 with SMTP id i84-20020a0ddf57000000b005843f4ab790mr16372173ywe.33.1692888337782; Thu, 24 Aug 2023 07:45:37 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-37ed-1199-bcc5-406f.res6.spectrum.com. [2603:6081:7b00:6400:37ed:1199:bcc5:406f]) by smtp.gmail.com with ESMTPSA id p63-20020a0de642000000b00586b5b6347csm3938707ywe.109.2023.08.24.07.45.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Aug 2023 07:45:37 -0700 (PDT) Date: Thu, 24 Aug 2023 10:45:35 -0400 From: Tom Rini To: Simon Glass Cc: U-Boot Mailing List , Alper Nebi Yasak , Dillon Min , Ivan Mikhaylov , Jonas Karlman , Kamil Lulko , Marek Vasut , Michael Walle , Neha Malcom Francis , Patrice Chotard , Patrick Delaunay , Peng Fan , Philippe Reynes , Stefan Herbrechtsmeier , Vikas Manocha , u-boot@dh-electronics.com, uboot-stm32@st-md-mailman.stormreply.com Subject: Re: [PATCH 0/6] Attempt to enforce standard extensions for build output Message-ID: <20230824144535.GP3953269@bill-the-cat> References: <20230824030304.1555547-1-sjg@chromium.org> <20230824133814.GH3953269@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="yVQitOjrOouggXfn" Content-Disposition: inline In-Reply-To: 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.8 at phobos.denx.de X-Virus-Status: Clean --yVQitOjrOouggXfn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 24, 2023 at 08:41:21AM -0600, Simon Glass wrote: > Hi Tom, >=20 > On Thu, 24 Aug 2023 at 07:38, Tom Rini wrote: > > > > On Wed, Aug 23, 2023 at 09:02:53PM -0600, Simon Glass wrote: > > > > > In this early stage of using binman to produce output files, we are m= ostly > > > seeing people using common extensions such as '.bin' and '.rom' > > > > > > But unusual extensions appear in some places. > > > > > > We would like 'buildman -k' to keep the build outputs, but this is ha= rd if > > > there is no consistency as to the extension used. > > > > > > This series adjusts binman to enforce just 4 extensions for output im= ages: > > > > > > .bin > > > .rom > > > .itb > > > .img > > > > > > Other extensions will produce an error. With this rule observed, buil= dman > > > can keep the required files. > > > > > > Some patches are included to fix up some easy problems. But the follo= wing > > > boards generate 'custMpk.pem' and it is not clear how to fix this, so= I am > > > asking for help from the maintainers: > > > > > > am62ax_evm_r5 am62x_evm_r5 am64x_evm_r5 am65x_evm_r5 > > > am65x_evm_r5_usbdfu am65x_evm_r5_usbmsc am65x_hs_evm_r5 > > > j7200_evm_r5 j721e_evm_r5 j721s2_evm_r5 verdin-am62_r5 > > > am62ax_evm_a53 am62x_evm_a53 am64x_evm_a53 am65x_evm_a53 > > > am65x_hs_evm_a53 j7200_evm_a72 j721e_evm_a72 j721s2_evm_a72 > > > verdin-am62_a53 > > > > > > It looks like the .pem files are listed as top-level images, e.g.: > > > > > > &custmpk_pem { > > > filename =3D "../../ti/keys/custMpk.pem"; > > > }; > > > > > > but if the only objective is to pick up an existing file, it is bette= r to > > > set BINMAN_INDIRS to include that directory. Also we should only have > > > simple leafnames in the 'filename' property, so the '../../ti/keys' i= s not > > > correct. It makes it harder for people to get the files from other pl= aces. > > > Making this easier is one of binman's goals. > > > > > > Most likely the custmpk_pem node can be removed and the .pem file can= be > > > included directly in the place that needs it, e.g. by adjusting the > > > ti-secure-rom etype (or ex509_cert) to use tools.get_input_filename()= when > > > reading the key file. > > > > > > For example, this: > > > > > > custMpk { > > > filename =3D "custMpk.pem"; > > > custmpk_pem: blob-ext { > > > filename =3D "../keys/custMpk.pem"; > > > }; > > > }; > > > > > > is really just copying a file from '../keys/custMpk.pem' to 'custMpk.= pem' > > > so is equivalent to: > > > > > > custMpk { > > > type =3D "blob"; > > > filename =3D "custMpk.pem"; > > > } > > > > > > (note that blob-ext implies that the blob may be missing, so blob is a > > > better choice, since the key cannot be missing) > > > > > > The fact that the .pem files are at the top level means that they are > > > output images, which surely is not intended. They should be buried in= the > > > image description, at a lower level, as part of something else. > > > > > > So please take a loke at the above and see if the binman descriptions= can > > > be reworked slightly to follow these new rules. > > > > > > > > > Simon Glass (6): > > > binman: Require image filenames to have certain extensions > > > buildman: Keep all permitted output files > > > buildman: Show progress when regenerating the board.cfg file > > > buildman: Start the clock when the build starts > > > kontron_sl28: Use u-boot-update.bin instead of u-boot.update > > > stm32mp15: Use u-boot-spl-stm32.bin instead of u-boot-spl.stm32 > > > > > > .../dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi | 2 +- > > > arch/arm/dts/stm32mp15-u-boot.dtsi | 2 +- > > > doc/board/kontron/sl28.rst | 4 ++-- > > > doc/board/st/stm32mp1.rst | 18 +++++++++-------= -- > > > include/configs/stm32mp15_dh_dhsom.h | 2 +- > > > tools/binman/binman.rst | 5 +++++ > > > tools/binman/etype/section.py | 3 +-- > > > tools/binman/ftest.py | 12 ++++++++++-- > > > tools/binman/image.py | 9 +++++++++ > > > tools/binman/test/022_image_name.dts | 4 ++-- > > > tools/binman/test/311_bad_image_name.dts | 17 +++++++++++++++++ > > > tools/buildman/boards.py | 15 ++++++++++++--- > > > tools/buildman/builder.py | 3 ++- > > > tools/buildman/builderthread.py | 11 +++++++---- > > > tools/buildman/control.py | 3 ++- > > > 15 files changed, 81 insertions(+), 29 deletions(-) > > > create mode 100644 tools/binman/test/311_bad_image_name.dts > > > > This doesn't seem to address the ones I pointed out on IRC as being the > > first order (to me anyhow) problem of needing the _unsigned files on the > > platforms you list above for PEM files. >=20 > I think it should be xxx-unsigned.bin instead of xxx.bin_unsigned As I was saying on IRC, you need to make that change then, if we're going to go down this path, before v2023.10 is out. And to repeat what I said inside another part of the thread, the u-boot* glob is hiding other "arbitrary" extensions that we've had in-use for forever. --=20 Tom --yVQitOjrOouggXfn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmTnbQ8ACgkQFHw5/5Y0 tyw10wwAoEilPrKKp0Sqf67Ainq6eXkGu+zGLB+ug7wd2OGfV/ah6j7dzlAqtzk3 8l+9UZEjfZTMSVYBzm/erGkRm6FcEDv32EBjpG1aH9PZFjSs+PfnDmm81iqTu1mZ yLbixirQWZuMntkyNs+Sx88DWlnOeKAbvOXT0ce+Nnb+CGg47st7fiXsr+AxZ2T3 pYIJ2ATvFiZVBZfqFrOC4MIiJogXDLTykk9U4Q54FJAVEtztHImAtVtv1L4V57j/ cI2SbKmtrlus0qRfZXS8uEkzxkdkUsRr3MHAdoLmsJHkSNhp8txHYRDYJo3MaHIJ l2ck2aG++uepgxyZ+mdH1kMg/dsDEDVM5eqkN+a+Gr41jl6+XRXQS+qoAObNaXOl Rg5ynMrgnZ2p2aJ0oDPVWE5HHiqpLiFHpkEVHjas0bmWVMV8LVAtiKt6ofDbn0iP FSogpuugRK1ggSGBkiflVkDxiSzeRVZL5OhelXYHO77BVqt8LoxPDdDNF9OmcEOj tuFDdh5d =LgU3 -----END PGP SIGNATURE----- --yVQitOjrOouggXfn--