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 E109FC433F5 for ; Fri, 7 Jan 2022 20:39:44 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 420DE836CB; Fri, 7 Jan 2022 21:39:43 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (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="lMBz5WdR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D4EA9834DE; Fri, 7 Jan 2022 21:39:41 +0100 (CET) Received: from mail-qv1-xf2b.google.com (mail-qv1-xf2b.google.com [IPv6:2607:f8b0:4864:20::f2b]) (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 D6D39836CB for ; Fri, 7 Jan 2022 21:39:37 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qv1-xf2b.google.com with SMTP id q4so6564825qvh.9 for ; Fri, 07 Jan 2022 12:39:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Gst8zX8XIlmzPngDdeHVs1K4LDBDU8c9CIGOQmyP0Mg=; b=lMBz5WdRdbSXVu5K4v0aUSYZL5/PM7g5GU4pnMXLWG+fCkFF/v40xW4pH7nzIFuKPF dOgL6EuBqOW2BBYrIc2ELqm8AD4SZaPNIlzkidTiJ91qE+wvsqyUei7bq2j+6gJMQHI/ 88aHRkcRiQrR+m+/yM9QiOReu5aLCVOrBJ6qY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Gst8zX8XIlmzPngDdeHVs1K4LDBDU8c9CIGOQmyP0Mg=; b=L14BjkamUXUoN22W7bpX9Oc7Uff1rRokdtyfIesJd5Pld43weOtO1bo2ByWaPjWFi+ vxG3Y+/TlXdkMLylckN1iIPgNo6a40EdwxEYK9baexHezuHhBclGOOnCVyd1TcQxNYwU /ynt8TJHZBTkrfW+Fg3ruoPQDw+6dqSK5XbyjWbo10EMOxUl+yErdIkJKzQdCjDha6C/ De2FTJLM7OQG80HCmMQQVDxujmUIbUx5C+490a1oRcDpwQw8IB23mPu4o8eki07v7Iv2 S0aEESy/yuz5Qj/fFR4UhdTEUg1as7JcDkkEcFDV0q1gVataUMfolXnuthOZQInCSyOO acpA== X-Gm-Message-State: AOAM532XLBlRK3rRLZJKL+sYQSgl7uSM+siUSJ01nuTrmx23uKCwTJWC I2pUsrRpHcBzzXmIQluMyz2ekQ== X-Google-Smtp-Source: ABdhPJwJ3LBr1EoFKrJeziIdwpQHUMYUFSMlrSSYZx3HGAajLMwcpbughwNDzWh5S0r7Tpgp6DA/rQ== X-Received: by 2002:ad4:5c8c:: with SMTP id o12mr60056951qvh.84.1641587976635; Fri, 07 Jan 2022 12:39:36 -0800 (PST) Received: from bill-the-cat (2603-6081-7b01-cbda-f174-9b83-85b8-612f.res6.spectrum.com. [2603:6081:7b01:cbda:f174:9b83:85b8:612f]) by smtp.gmail.com with ESMTPSA id bq36sm3965997qkb.6.2022.01.07.12.39.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jan 2022 12:39:36 -0800 (PST) Date: Fri, 7 Jan 2022 15:39:34 -0500 From: Tom Rini To: Tim Harvey Cc: Adam Ford , ZHIZHIKIN Andrey , "u-boot@lists.denx.de" , Marcel Ziswiler Subject: Re: [PATCH] Revert "tree: imx: remove old fit generator script" Message-ID: <20220107203934.GI2773246@bill-the-cat> References: <20220107173751.GE2773246@bill-the-cat> <20220107182550.GF2773246@bill-the-cat> <20220107202700.GH2773246@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="EUpy5YnDgVCdz9yy" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett 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 --EUpy5YnDgVCdz9yy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 07, 2022 at 12:37:52PM -0800, Tim Harvey wrote: > On Fri, Jan 7, 2022 at 12:27 PM Tom Rini wrote: > > > > On Fri, Jan 07, 2022 at 12:24:57PM -0800, Tim Harvey wrote: > > > On Fri, Jan 7, 2022 at 12:08 PM Adam Ford wrote: > > > > > > > > > > > > > > > > On Fri, Jan 7, 2022 at 12:25 PM Tom Rini wrote: > > > >> > > > >> On Fri, Jan 07, 2022 at 12:21:18PM -0600, Adam Ford wrote: > > > >> > On Fri, Jan 7, 2022 at 11:38 AM Tom Rini wr= ote: > > > >> > > > > >> > > On Fri, Jan 07, 2022 at 09:27:05AM -0800, Tim Harvey wrote: > > > >> > > > On Thu, Jan 6, 2022 at 12:27 PM Tim Harvey > > > >> > > wrote: > > > >> > > > > > > > >> > > > > On Thu, Jan 6, 2022 at 11:18 AM ZHIZHIKIN Andrey > > > >> > > > > wrote: > > > >> > > > > > > > > >> > > > > > Hello Tom, > > > >> > > > > > > > > >> > > > > > > -----Original Message----- > > > >> > > > > > > From: U-Boot On Behalf = Of Tom Rini > > > >> > > > > > > Sent: Thursday, January 6, 2022 7:52 PM > > > >> > > > > > > To: u-boot@lists.denx.de > > > >> > > > > > > Cc: Tim Harvey > > > >> > > > > > > Subject: [PATCH] Revert "tree: imx: remove old fit gen= erator > > > >> > > script" > > > >> > > > > > > > > > >> > > > > > > This reverts commit d9a6f0eed66a39206b13513ec914f14084= c3bb73. > > > >> > > > > > > > > > >> > > > > > > For right now, it's too close to the release to merge = the series > > > >> > > that > > > >> > > > > > > allows for binman to be used to generate the final ima= ges, and > > > >> > > also not > > > >> > > > > > > break CI, and then also merge all of the series that c= onvert > > > >> > > currently > > > >> > > > > > > broken platforms to use binman instead. So, bring bac= k this > > > >> > > script now > > > >> > > > > > > and remove it again for real after the release. > > > >> > > > > > > > > >> > > > > > Please note that this might not work, as the FIT generat= or script > > > >> > > would > > > >> > > > > > generate ITS with '@' symbols which are not compatible w= ith mkimage > > > >> > > due > > > >> > > > > > to CVE-2021-27138. This revert should be complemented wi= th the fix to > > > >> > > > > > remove those '@' symbols as well. > > > >> > > > > > > > >> > > > > Correct, the revert is not enough anymore: > > > >> > > > > MKIMAGE u-boot.itb > > > >> > > > > u-boot.its:7.11-15.5: Warning (unit_address_vs_reg): /imag= es/uboot@1: > > > >> > > > > node has a unit name, but no reg property > > > >> > > > > u-boot.its:16.9-21.5: Warning (unit_address_vs_reg): /imag= es/fdt@1: > > > >> > > > > node has a unit name, but no reg property > > > >> > > > > u-boot.its:22.9-27.5: Warning (unit_address_vs_reg): /imag= es/fdt@2: > > > >> > > > > node has a unit name, but no reg property > > > >> > > > > u-boot.its:28.9-33.5: Warning (unit_address_vs_reg): /imag= es/fdt@3: > > > >> > > > > node has a unit name, but no reg property > > > >> > > > > u-boot.its:34.9-39.5: Warning (unit_address_vs_reg): /imag= es/fdt@4: > > > >> > > > > node has a unit name, but no reg property > > > >> > > > > u-boot.its:40.9-45.5: Warning (unit_address_vs_reg): /imag= es/fdt@5: > > > >> > > > > node has a unit name, but no reg property > > > >> > > > > u-boot.its:46.9-55.5: Warning (unit_address_vs_reg): /imag= es/atf@1: > > > >> > > > > node has a unit name, but no reg property > > > >> > > > > u-boot.its:60.12-65.5: Warning (unit_address_vs_reg): > > > >> > > > > /configurations/config@1: node has a unit name, but no reg= property > > > >> > > > > u-boot.its:66.12-71.5: Warning (unit_address_vs_reg): > > > >> > > > > /configurations/config@2: node has a unit name, but no reg= property > > > >> > > > > u-boot.its:72.12-77.5: Warning (unit_address_vs_reg): > > > >> > > > > /configurations/config@3: node has a unit name, but no reg= property > > > >> > > > > u-boot.its:78.12-83.5: Warning (unit_address_vs_reg): > > > >> > > > > /configurations/config@4: node has a unit name, but no reg= property > > > >> > > > > u-boot.its:84.12-89.5: Warning (unit_address_vs_reg): > > > >> > > > > /configurations/config@5: node has a unit name, but no reg= property > > > >> > > > > ./tools/mkimage: verify_header failed for FIT Image suppor= t with exit > > > >> > > code 1 > > > >> > > > > Makefile:1433: recipe for target 'u-boot.itb' failed > > > >> > > > > make: *** [u-boot.itb] Error 1 > > > >> > > > > make: *** Deleting file 'u-boot.itb' > > > >> > > > > make: *** Waiting for unfinished jobs.... > > > >> > > > > > > > >> > > > > I don't know what had changed to cause this or when (again= , I stopped > > > >> > > > > worrying about it because I thought we were moving to binm= an for this > > > >> > > > > release). There was a patch that resolved this from Oliver= at > > > >> > > > > https://lists.denx.de/pipermail/u-boot/2021-August/457997.= html but I > > > >> > > > > don't think that fully solves anything 'at this point' eit= her. > > > >> > > > > > > > >> > > > > Even with that applied to current master I then end up wit= h: > > > >> > > > > MKIMAGE flash.bin > > > >> > > > > ./tools/mkimage: Can't open spl/u-boot-spl-ddr.bin: No suc= h file or > > > >> > > directory > > > >> > > > > arch/arm/mach-imx/Makefile:167: recipe for target 'flash.b= in' failed > > > >> > > > > make[1]: *** [flash.bin] Error 1 > > > >> > > > > make[1]: *** Deleting file 'flash.bin' > > > >> > > > > Makefile:1526: recipe for target 'flash.bin' failed > > > >> > > > > > > > >> > > > > At some point over the past couple of months that patch re= solved the > > > >> > > > > building issue when using the FIT generator but I also don= 't know what > > > >> > > > > else has changed that now causes that to not work. > > > >> > > > > > > > >> > > > > As Tom pointed out in another thread these build failures = did not get > > > >> > > > > caught by CI apparently because CI does a 'make all' which= did not > > > >> > > > > include the FIT images (that was accomplished with the 'fl= ash.bin' > > > >> > > > > target prior to binman conversion). > > > >> > > > > > > > >> > > > > Is it too late to apply the CI fix and the pending binman = conversions? > > > >> > > > > > > > >> > > > > I know that my series has been reviewed by Marcel [1] and = as far as I > > > >> > > > > know didn't get merged simply because of the CI issue. It = still > > > >> > > > > applies and produces a valid flash.bin image. > > > >> > > > > I was also able to merge Peng's series [2] which converts > > > >> > > > > imx8mq_evk/imx8mq_phanbell/pico-imx8mq to binman and was a= ble to build > > > >> > > > > flash.bin images for them > > > >> > > > > > > > >> > > > > I tried to merge Adam's series that moves imx8mm_beacon to= binman [3] > > > >> > > > > and imx8mn_beacon to binman [4] but they no longer apply d= ue to > > > >> > > > > defconfig/Kconfig changes > > > >> > > > > > > > >> > > > > That still leaves the following unbuildable with > > > >> > > > > CONFIG_SPL_FIT_GENERATOR =3D "arch/arm/mach-imx/mkimage_fi= t_atf.sh": > > > >> > > > > > > > >> > > configs/cgtqmx8_defconfig:CONFIG_SPL_FIT_GENERATOR=3D"arch/arm= /mach-imx/mkimage_fit_atf.sh" > > > >> > > > > > > > >> > > configs/imx8mm-icore-mx8mm-ctouch2_defconfig:CONFIG_SPL_FIT_GE= NERATOR=3D"arch/arm/mach-imx/mkimage_fit_atf.sh" > > > >> > > > > > > > >> > > configs/imx8mm-icore-mx8mm-edimm2.2_defconfig:CONFIG_SPL_FIT_G= ENERATOR=3D"arch/arm/mach-imx/mkimage_fit_atf.sh" > > > >> > > > > > > > >> > > configs/imx8mm_beacon_defconfig:CONFIG_SPL_FIT_GENERATOR=3D"ar= ch/arm/mach-imx/mkimage_fit_atf.sh" > > > >> > > > > > > > >> > > configs/imx8mn_beacon_2g_defconfig:CONFIG_SPL_FIT_GENERATOR=3D= "arch/arm/mach-imx/mkimage_fit_atf.sh" > > > >> > > > > > > > >> > > configs/imx8mn_beacon_defconfig:CONFIG_SPL_FIT_GENERATOR=3D"ar= ch/arm/mach-imx/mkimage_fit_atf.sh" > > > >> > > > > > > > >> > > configs/imx8qm_rom7720_a1_4G_defconfig:CONFIG_SPL_FIT_GENERATO= R=3D"arch/arm/mach-imx/mkimage_fit_atf.sh" > > > >> > > > > > > > >> > > > > Tim > > > >> > > > > [1] https://patchwork.ozlabs.org/project/uboot/list/?serie= s=3D265765 > > > >> > > > > [2] https://patchwork.ozlabs.org/project/uboot/list/?serie= s=3D268380 > > > >> > > > > [3] https://patchwork.ozlabs.org/project/uboot/list/?serie= s=3D261640 > > > >> > > > > [4] https://patchwork.ozlabs.org/project/uboot/list/?serie= s=3D261822 > > > >> > > > > > > > >> > > > > > > >> > > > Tom, > > > >> > > > > > > >> > > > I'm not familiar with the U-boot CI tool. > > > >> > > > > > >> > > It's at https://u-boot.readthedocs.io/en/latest/develop/ci_tes= ting.html > > > >> > > (and in-tree under doc/develop/ci_testing.rst). > > > >> > > > > > >> > > > Is it a show-stopper that it > > > >> > > > does not build for boards using binman for release? From wha= t you > > > >> > > > mentioned in another thread it was never building the flash.= bin target > > > >> > > > for the boards using the FIT generator anyway. > > > >> > > > > > >> > > Yes, breaking CI is a ship-stopper. That all of these boards = were not > > > >> > > previously building the final image as part of "all" is a prob= lem. > > > >> > > > > > >> > > So, here's what I'm at right now. I've grabbed Heiko's patch. > > > >> > > Everything is currently visible at > > > >> > > > > > >> > > https://patchwork.ozlabs.org/bundle/trini/2022-01-07-imx8-and-= binman-updates/ > > > >> > > and with this, we get some boards building and complaining as = expected: > > > >> > > aarch64: w+ imx8mn_evk > > > >> > > +(imx8mn_evk) Image 'main-section' is missing external blobs a= nd is > > > >> > > non-functional: blob-ext@1 > > > >> > > blob-ext@2 blob-ext@3 blob-ext@4 > > > >> > > +(imx8mn_evk) Image 'main-section' is missing external blobs a= nd is > > > >> > > non-functional: blob-ext > > > >> > > +(imx8mn_evk) > > > >> > > +(imx8mn_evk) Some images are invalid > > > >> > > > > > >> > > But others are: > > > >> > > aarch64: + imx8mn_beacon_2g > > > >> > > +(imx8mn_beacon_2g) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D WARNING =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D > > > >> > > +(imx8mn_beacon_2g) This board uses CONFIG_SPL_FIT_GENERATOR. = Please > > > >> > > migrate > > > >> > > +(imx8mn_beacon_2g) to binman instead, to avoid the proliferat= ion of > > > >> > > +(imx8mn_beacon_2g) arch-specific scripts with no tests. > > > >> > > +(imx8mn_beacon_2g) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > >> > > +(imx8mn_beacon_2g) Image 'main-section' is missing external b= lobs and is > > > >> > > non-functional: blob- > > > >> > > ext@1 blob-ext@2 blob-ext@3 blob-ext@4 > > > >> > > +(imx8mn_beacon_2g) binman: Error 1 running 'mkimage -d > > > >> > > ./mkimage.spl.mkimage -n spl/u-boot-spl > > > >> > > .cfgout -T imx8mimage -e 0x912000 ./mkimage-out.spl.mkimage': > > > >> > > spl/u-boot-spl-ddr.bin: Can't ope > > > >> > > n: No such file or directory > > > >> > > +(imx8mn_beacon_2g) > > > >> > > +(imx8mn_beacon_2g) make[1]: *** [Makefile:1088: all] Error 1 > > > >> > > +(imx8mn_beacon_2g) make: *** [Makefile:177: sub-make] Error 2 > > > >> > > > > > >> > > > > >> > The beacon boards are mine. I can work on this one today. Do I= just grab > > > >> > the binman updates and apply it to master and fix it from that s= tarting > > > >> > point? > > > >> > > > >> So, yes, grabbing the series from the above link and applying it o= n top > > > >> of master, and making builds work with fake binaries would be very > > > >> helpful. As best I can tell there's still something missing with = making > > > >> fake blobs link and not fail. For example, imx8mm_venice is part = of the > > > >> series above but still fails with 'make BINMAN_FAKE_EXT_BLOBS=3D1 = =2E..': > > > >> Image 'main-section:u-boot-spl-ddr' has faked external blobs and i= s non-functional: lpddr4_pmu_train_1d_imem.bin lpddr4_pmu_train_1d_dmem.bin= lpddr4_pmu_train_2d_imem.bin lpddr4_pmu_train_2d_dmem.bin > > > >> Image 'main-section' is missing external blobs and is non-function= al: atf_blob blob-ext > > > >> Wrote map file './imx-boot.map' to show errors > > > >> binman: Node '/binman/imx-boot/blob-ext@1': Offset 0x0 (0) overlap= s with previous entry '/binman/imx-boot/uboot' ending at 0x1aee08 (1764872) > > > >> > > > > > > > > From what I can tell looking at the imx8mm_venice board is that the= imx8mm-u-boot.dtsi has the binman nodes to build the image, but arch/arm/d= ts/imx8mm-venice-u-boot.dtsi duplicates that work, so there are two copies = trying to occupy the same space. Deleting the &binman node from the venice= -u-boot.dtsi file appears to make the problem go away, and binman is still = making the image. > > > > > > > > > > Adam, > > > > > > I don't quite follow. I don't see any binman nodes in > > > arch/arm/dts/imx8mm-u-boot.dtsi. > > > > > > I know that Marcel submitted a patch that added them (and I'm not sure > > > if he added them yet in a way that was compatible with multiple fdt's) > > > but this hasn't been merged yet so I don't see any duplicate binman > > > nodes for venice. > > > > Right, so this is with > > https://patchwork.ozlabs.org/bundle/trini/2022-01-07-imx8-and-binman-up= dates/ > > applied and I did have to manually apply Marcel's 4/7 and 7/7, so maybe > > I mismerged something there too? The tree is also at > > https://github.com/trini/u-boot/tree/WIP/2022-01-07-imx8-and-buildman-u= pdates > > >=20 > Tom, >=20 > Thank you for helping with this. During the merge window we had a lot > of collisions because of things moving to defconfig that I think > caused a lot of imx patches to have to be rebased. Then as most of us > were submitting binman patches this CI issue popped up and as Stefano > was unavailable I think it all got left hanging. In the middle of that > Marcel's patch moved binman nodes to a common place so some rebasing > is needed there as well. Fun times! >=20 > Yes, I couldn't get all from your patchwork bundle to apply - I didn't > try as hard as you to manually merge :) >=20 > I pulled your tree and see Marcel's patches there now. With the binman > node removed from arch/arm/dts/imx8mm-venice-u-boot.dtsi venice works. > I will submit a v3 for you that does this. Great, thanks! --=20 Tom --EUpy5YnDgVCdz9yy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmHYpQMACgkQFHw5/5Y0 tyzahAv/aOJcYL8W1h7V2Rf4nbD4vbqceABO7BI34aQflWVN5kyipsD2Lj3u0I7M EzgnNMKhpjMPK9/AkkdYA0HOJ+90xiKE37QmYvSSTsM/nLsgIm9YNWP7vmFwjtPf /LuSp6wU15sCG+gjhMMHKtMwFyLJsyG+/AFzKkLRDDjLfnSwX3p7xFhaiqEv5vuH 4LTkaRvv0LXvqy1/AghIarMdLrmVeyQuW0bXo3wSZclnbBwchBZIOD/Kto6X8Kzs hMWxcgDuSdvb83JlcJBhDtazIkMmpOMn1zLRohmuhUGidra1rigIZOYDoD0BXxFK VmMuN7o3omc3u/1DpWeblSgWTGwzJQgeevhRfr6YsJkkDK1n8C5ZdNRakmKA6mIb nTlx/q3zNRb1re7drxb3oyhnKyyl2FtvStav3IKUrS1uc+Oa3O1Tkew38kapwgt+ cFY2zZnwyGDQmDHL6Pc/cw+f3cRoX32zQL5hBbJh027xkedQWyariXiWaOXZOCKx NVKcrkQf =1aZ7 -----END PGP SIGNATURE----- --EUpy5YnDgVCdz9yy--