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 4F80BC19F2A for ; Thu, 11 Aug 2022 17:44:08 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AA8B484947; Thu, 11 Aug 2022 19:44:05 +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="fzrJ607u"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0763B84947; Thu, 11 Aug 2022 19:44:04 +0200 (CEST) Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) (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 8EB7D8492C for ; Thu, 11 Aug 2022 19:44:00 +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-qt1-x832.google.com with SMTP id h22so8578816qtu.2 for ; Thu, 11 Aug 2022 10:44:00 -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; bh=NpfTvY2tVkpN2BDljmPvUOzu0trlIOSu2LXRjr7lCTo=; b=fzrJ607uWCeFOosb5OrF863FzB592L3xcqBekzC+iKp3cB2wbqGtrrwxiVbYfb8Sgi NT4+XquCz6PqBfQxksAdS2RtoqDGyJxxptYnvmeUiDsMX74LxRSEevSZyAETUjWzrar2 F1KyT5v0QSn4+xsJVD0Qv04e4y+nYZjYDZnJg= 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; bh=NpfTvY2tVkpN2BDljmPvUOzu0trlIOSu2LXRjr7lCTo=; b=WsT9LcP72nyLs0pHNksx+dr+z/1OhnkNqI/EMU/sSKKVQyhZWgrQOp9o3v3fmXbOjo KNF2YL/OG1sYscMwSopP9qvBXagLQJjhP1xK0F4qMezZ9+WoEcAOCjdEyOr73haf/2GY gka4ZgGzBlOMyqtsov+YgQuQpIPCX4xIPNo20KnL7R9VMKQ4mrQZ5A2t/0PimWoTe9Eo tidkxhEfC7WQU3+HAAcC9RWyXMWhqHkvTqBe99MBPHH2Kt4A/TN63TQfwnOMcqeJfIpp Vg275Q02ktDNrSoRy3o7kjBwhXksY+jQ0udfxdOOS9VUkH0nr1hJ1Tw5espkk1euQmkp ljuQ== X-Gm-Message-State: ACgBeo2S/rJYKymaEr5Jh7szsBP8O8JNRFN7ThpLLAVzE5lV5Yvb7HBh Kshmhfh8UOIWbAppHr9BtCJlSgSOWgAa2CFm X-Google-Smtp-Source: AA6agR6LnIP0i5o94KjqGyXFcnMOKl3Wp9I7Uu+X8+CKnx5/68ce5ZyGJ4au7/nsrs6Gatyhx90Hgw== X-Received: by 2002:a05:622a:346:b0:343:5eaf:43e6 with SMTP id r6-20020a05622a034600b003435eaf43e6mr238506qtw.110.1660239839302; Thu, 11 Aug 2022 10:43:59 -0700 (PDT) Received: from bill-the-cat (cpe-65-184-195-139.ec.res.rr.com. [65.184.195.139]) by smtp.gmail.com with ESMTPSA id s12-20020a05620a29cc00b006af147d4876sm2741068qkp.30.2022.08.11.10.43.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Aug 2022 10:43:58 -0700 (PDT) Date: Thu, 11 Aug 2022 13:43:56 -0400 From: Tom Rini To: Tim Harvey Cc: Simon Glass , u-boot Subject: Re: binman warning/failure when blobs are missing Message-ID: <20220811174356.GB1146598@bill-the-cat> References: <20220811164850.GY1146598@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="K6rEYkVND7DTL3ck" 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.6 at phobos.denx.de X-Virus-Status: Clean --K6rEYkVND7DTL3ck Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 11, 2022 at 09:59:05AM -0700, Tim Harvey wrote: > On Thu, Aug 11, 2022 at 9:48 AM Tom Rini wrote: > > > > On Thu, Aug 11, 2022 at 09:27:44AM -0700, Tim Harvey wrote: > > > > > Greetings, > > > > > > After a couple of hours troubleshooting a bad boot image today I > > > realized the issue was that I had some 0 byte files for the lpddr4 > > > training blobs that are part of the imx8mp binman created image. > > > > > > Digging in I found that if a blob referenced in the binman node is > > > missing a warning will be output but the missing files will be > > > 'created' as 0 byte files such that the next time you build you will > > > get no warning (but will have a non-working image). Additionally the > > > error does not cause a non-zero exit code. > > > > > > I'm not that fluent in python these days, and don't have the time for > > > a while to try and fix this but I figured I would at least send this > > > email in case someone else does. > > > > > > Example: > > > # rm *lpddr4*.bin # make sure lpddr4*.bin files referenced in binman > > > nodes are missing > > > # make distclean imx8mp_venice_defconfig flash.bin && echo "build ok" > > > ... > > > BINMAN flash.bin > > > Image 'main-section' is missing external blobs and is non-functional:= ddr-1d-ime > > > m-fw ddr-1d-dmem-fw ddr-2d-imem-fw ddr-2d-dmem-fw > > > Image 'main-section' has faked external blobs and is non-functional: = lpddr4_pmu_ > > > train_1d_imem_202006.bin lpddr4_pmu_train_1d_dmem_202006.bin lpddr4_p= mu_train_2d > > > _imem_202006.bin lpddr4_pmu_train_2d_dmem_202006.bin > > > > > > Some images are invalid > > > ^^^ excellent warning > > > build ok > > > ^^^ not so great that there is a successful exit code > > > # make flash.bin && echo "build ok" > > > ... > > > BINMAN flash.bin > > > build ok > > > ^^^ absolutely horrible that 0 byte files were created and thus > > > everything looks good this time around! > > > # stat -c "%s %n" lpddr4*.bin > > > 0 lpddr4_pmu_train_1d_dmem_202006.bin > > > 0 lpddr4_pmu_train_1d_imem_202006.bin > > > 0 lpddr4_pmu_train_2d_dmem_202006.bin > > > 0 lpddr4_pmu_train_2d_imem_202006.bin > > > > So, this isn't the first time someone has had this problem. On the one > > hand, we need CI to pass, and not require fetching of arbitrary further > > images to assemble the binary. On the other hand, we don't want users > > spending a bunch of time because something didn't work and the normal > > way of conveying THIS WON'T WORK is a non-zero exit status. Can we > > easily make some flag for buildman or binman that we do set in CI but > > won't be set by users? > > >=20 > Tom, >=20 > Ok - that makes sense as far as the exit status goes. It would be MUCH > easier to catch an error like this if binman didn't create 0 byte > files for missing files so that you at least get the (ascii colored) > message indicating the image is wrong. >=20 > I do love the idea of a flag for CI also! So, that's part of the root of the problem here. We're passing --fake-ext-blobs to binman so that it will create those 0 byte files and it in turn complain. I think we didn't figure out a good way to tell buildman to pass that to binman tho? --=20 Tom --K6rEYkVND7DTL3ck Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmL1P9kACgkQFHw5/5Y0 tywdlgwAqmYNkZaJLUwSDEhrNWfAcJls1oTIsosOXB3+9riDebH+pjGBmaycSQZ4 TsFTxHMFEhb3WDdafqdBaz3Wt+7niMG87lOYofZFeDpeIwdESOQ5Udh7KwS1T2gL GXL3pjmkDO7l9J+5NBmS2AVoL7Y6hON0i+dO6HeFOsi3ecNQyiPH6gw/A+aLA6SD dnpJ7nurvnGU4VbySjLS+G2LWC1AqPzeVDxqR7pZJqDdSQfJZZ+wZZv1Y7rU7auY ardXu2BOgMbljdXHDmykmlAEoT67mlIMlLOYGhkMK+7fgMBDn2UVJkabkWbXi9x8 E8rw1BfXLRMPPHjk0YM2eOYfNx0yy/5RkgrRc9N6+foCfIlJ+aBkS0N8LeK/9zQx PpXZHMxAhuu0uyBIBG6LV6ywI5OoImlmfn3eikcG0GCi9WsmxaLp+Ay8dYkPWO9u HubCJfuhO+iDGT6jv68XkLsoXpwKg1y73vsHBXkaQzs0pLdT5B8JMVy7Um7IYbjg +LMiw0l9 =xyzd -----END PGP SIGNATURE----- --K6rEYkVND7DTL3ck--