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 EEE53C25B0C for ; Thu, 11 Aug 2022 16:49:00 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 99DF384A37; Thu, 11 Aug 2022 18:48:58 +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="KyriaVO0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 576BE84A39; Thu, 11 Aug 2022 18:48:57 +0200 (CEST) Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) (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 D723584A26 for ; Thu, 11 Aug 2022 18:48:54 +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-qk1-x733.google.com with SMTP id c16so4477992qkk.10 for ; Thu, 11 Aug 2022 09:48:54 -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=KYBdQlkJp8TiGoAe2WeYSP/kGYEkpstpQ8oMe+RHr7k=; b=KyriaVO0ihOkZzRySbqQ8Xf5KcOquhx0LTnJg2BlEdyD70tMGUWneoKhICliZIK8WO NxyXcMnHBuizj3R6FtXdYyMXHjWE48lnxflU3Az3NvH79nsEVFv0VxFbM9rKEs/smX9h fRZa1j3JSMGZIGjdSQXFvd+M+IjLrI5v8CvTQ= 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=KYBdQlkJp8TiGoAe2WeYSP/kGYEkpstpQ8oMe+RHr7k=; b=J6oxhbp1beVKU22OKhmHHGbUjrDucIWeA9c+coQD4xqOvtbKgwLhEvk7tXP9OozLDG LXeR/QXGnZLPQ9MDI5S5maHdb55RMMLV38HxeEauNvRbZE4BPTFQDPjeevDVolHkPgk+ 2HwJRtm9NOi2SBxN8GLzw3jy34XrDEqGrk4N48AbgQCJ+ycJPqNiOwgnN39fWcLzjO1D T1WjkkZJCNOMY2j0Q6i3QDGynZ4p81n4ptKrxqhxCHnRIAYPFI6/3ja8zFoSIMiF56pD OOYhFsup7/85vA2BRF9ulJPsHQmyFv6P9HAq3HoXbIMwrIMwCgW7XtSo4SD/MieKmFLe MACQ== X-Gm-Message-State: ACgBeo2aVOsr2CrIvKSnh98lXk3pdg6f1XcItKH3uO6kCFMovXDqcsHG XaMKCK1wM3qXL5ZlBCXo0ha19Q== X-Google-Smtp-Source: AA6agR7Z01zVxCA6kaVhBI77DSD8T2ujbRs99yhipSvuxMB5GLoutBqRSDbSllxdwAlGtNFYSR6ggw== X-Received: by 2002:a05:620a:2889:b0:6b6:5410:b2c7 with SMTP id j9-20020a05620a288900b006b65410b2c7mr25102994qkp.697.1660236533419; Thu, 11 Aug 2022 09:48:53 -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 r17-20020ae9d611000000b006b91d06044asm2161705qkk.127.2022.08.11.09.48.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Aug 2022 09:48:52 -0700 (PDT) Date: Thu, 11 Aug 2022 12:48:50 -0400 From: Tom Rini To: Tim Harvey , Simon Glass Cc: u-boot Subject: Re: binman warning/failure when blobs are missing Message-ID: <20220811164850.GY1146598@bill-the-cat> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="eq/sBfhdEWw9U7TR" 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 --eq/sBfhdEWw9U7TR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 11, 2022 at 09:27:44AM -0700, Tim Harvey wrote: > Greetings, >=20 > 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. >=20 > 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. >=20 > 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. >=20 > 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: lpdd= r4_pmu_ > train_1d_imem_202006.bin lpddr4_pmu_train_1d_dmem_202006.bin lpddr4_pmu_t= rain_2d > _imem_202006.bin lpddr4_pmu_train_2d_dmem_202006.bin >=20 > 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 --eq/sBfhdEWw9U7TR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmL1Mu8ACgkQFHw5/5Y0 tyz1jQv/ckw65GxuH0AtZjgx4zy9QorKSYNbmoKhDjzez+Jpdu++hgLaPJ0AQK+5 EToaRH/EZg8doP8BN3QtrxBrP94pwYp9xEA+lupNX60OF+B0KwOigpeoZXe6iW/I M+hKvM8m9PCKZBGhKLtX+GByfoNt1d3TEMp9v44k9Ix9TRltzbI85vzPPuMPApid Ag3RU4vk5HMbhdmZMOtN92V1g9ATGNvCWVcbXVdSeYrgwB/Wwi89ngjqpHH4Mmq8 hfrjihsOpU95HiEsFZkj3RlbPK7074wQV6WIm/grYxkepMQ/mkp16tB589xqss2T LVQQgBezWy+BSp/vfF/cH0lod8AVl1Fm8Q19BoaHlu20Rj9ndN/lkEcuBgpjMvzD 9OUONnHxwjviBOdJgB5s4dnx8J0Fl8c0WZWnqxXdxhKugmDai8XnLDxpz++z1LFj B9fGk9aBYDGJ2nrY8tPS9FkpNuDUe2GRJ2tfv4GvevsuZ8TNT2Yu8FinVjZqWeT6 LskYq8eY =T9ve -----END PGP SIGNATURE----- --eq/sBfhdEWw9U7TR--