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 750C4C4332F for ; Thu, 22 Dec 2022 07:01:28 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8B13385278; Thu, 22 Dec 2022 08:01:26 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=maquefel.me 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=maquefel.me header.i=@maquefel.me header.b="GuiqlKrS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C97F585287; Thu, 22 Dec 2022 08:01:24 +0100 (CET) Received: from forward501b.mail.yandex.net (forward501b.mail.yandex.net [IPv6:2a02:6b8:c02:900:1:45:d181:d501]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E4A7B85245 for ; Thu, 22 Dec 2022 08:01:21 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=maquefel.me Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=nikita.shubin@maquefel.me Received: from sas8-92ddc00f49ef.qloud-c.yandex.net (sas8-92ddc00f49ef.qloud-c.yandex.net [IPv6:2a02:6b8:c1b:2988:0:640:92dd:c00f]) by forward501b.mail.yandex.net (Yandex) with ESMTP id 359775ECE0; Thu, 22 Dec 2022 10:01:19 +0300 (MSK) Received: by sas8-92ddc00f49ef.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id H1hlogHY4a61-NvGcc4KI; Thu, 22 Dec 2022 10:01:18 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maquefel.me; s=mail; t=1671692478; bh=qd9cl3wlJ2SW8jx3mwSz54UJefNRA6oQy84MzCBo5zY=; h=Cc:Message-ID:Subject:Date:References:To:From:In-Reply-To; b=GuiqlKrSNfnjJsVweYYuw7HWBejTDKvmCDK5rZSPkX6ev9NlirjWK6DPIBy8juwie r80U4LKzA9Xsc5aX/9nJ4yZORFZg3W5Ru5oUusRGWnhip0D+NrYbjzWFCLd36xojEB VplJ5VwW8STtY8sKhnoLYAvvGsp8w8N1avoMCcLI= Authentication-Results: sas8-92ddc00f49ef.qloud-c.yandex.net; dkim=pass header.i=@maquefel.me Date: Thu, 22 Dec 2022 10:01:16 +0300 From: Nikita Shubin To: Tom Rini Cc: Simon Glass , linux@yadro.com, Nikita Shubin , Pali =?UTF-8?B?Um9ow6Fy?= , Heinrich Schuchardt , Marek =?UTF-8?B?QmVow7pu?= , Quentin Schulz , u-boot@lists.denx.de Subject: Re: [PATCH] Makefile: add -W for BINMAN_ALLOW_MISSING Message-ID: <20221222100116.5cc8a248@redslave.neermore.group> In-Reply-To: <20221219133630.GL3787616@bill-the-cat> References: <20221216092745.31266-1-nikita.shubin@maquefel.me> <20221219112145.0708131d@redslave.neermore.group> <20221219133630.GL3787616@bill-the-cat> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Hello Tom! On Mon, 19 Dec 2022 08:36:30 -0500 Tom Rini wrote: > On Mon, Dec 19, 2022 at 11:21:45AM +0300, Nikita Shubin wrote: > > Hello Tom and Simon! > > > > On Sat, 17 Dec 2022 14:38:30 -0700 > > Simon Glass wrote: > > > > > +Tom Rini > > > > > > We do actually want to report the failure, since it means that the > > > image will not function. This was a recent change requested by a > > > few people. > > > > It doesn't make sense to me - if i am passing "--allow-missing" than > > binman shouldn't fail drastically, cause i literally told him "It's > > okay if files are missing". What purpose does it have now, it we > > are failing regardless we are providing this flag or not ? > > > > This breaks old behaviour by the way, when passing "--allow-missing" > > for missing blobs produced a warning instead of error. > > > > > > > > Note that buildman looks for the message 'Some images are > > > invalid' and either returning 103, or 0 if -W is given. > > > > > > There is no attempt to produce a special exit code from the > > > Makefile. It generally returns 2 (as per 'man make'), which is > > > why buildman has this extra processing. > > > > Well, there are only 3 codes for make and 2 indicates any failure: > > > > "A status of two will be returned if any errors were encountered." > > (c) > > > > This new behaviour looks the same with or without > > BINMAN_ALLOW_MISSING flag from top point of view: > > > > With BINMAN_ALLOW_MISSING=1: > > Some images are invalid > > make[1]: *** [Makefile:1114: .binman_stamp] Error 103 > > make[1]: Leaving directory '/home/maquefel/workshop/overlord/u-boot' > > make: *** [Makefile:271: u-boot/u > > > > $ echo $? > > 2-boot-nodtb.bin] Error 2 > > > > Without BINMAN_ALLOW_MISSING: > > > > binman: Filename 'fw_dynamic.bin' not found in input path > > (.,.,./board/syntacore/scr7_elct,arch/riscv/dts) > > (cwd='/home/maquefel/workshop/overlord/u-boot') make[1]: *** > > [Makefile:1114: .binman_stamp] Error 1 make[1]: Leaving directory > > '/home/maquefel/workshop/overlord/u-boot' make: *** [Makefile:271: > > u-boot/u-boot-nodtb.bin] Error 2 > > > > $ echo $? > > 2 > > > > So that's the difference if build is failing either way ? > > So, with what is in master right now, BINMAN_ALLOW_MISSING=1 should > work as intended, while it did not at its introduction. Please > confirm if your use cases work now, or not. They don't actually, a few iterations ago i didn't even needed BINMAN_ALLOW_MISSING (now it's clear for me that i never needed it), as make produced only a warning and not a error. I have kernel and ramdisk sections in my binman file and FIT image is fully functional even if they are missing. And now there is no way to tell u-boot not to fail if some blobs are missing. > The problem we needed to > solve was the one that by default previously, you could run "make > fooboard_config all", not have BL31/etc available, get a warning > printed and a zero exit code, leading to non-obvious failures if you > build indirectly (buildroot, yocto/OE, etc). > May be they shouldn't use BINMAN_ALLOW_MISSING when building u-boot at all then ? Or can we, at least, have some BINMAN_REALLY_ALLOW_MISSING option or simply passing some flags with BINMAN_OPTS for example ? Through: -W, --ignore-missing Return success even if there are missing blobs/bintools (requires -M) seems to have really good synergy with: -M, --allow-missing Allow external blobs and bintools to be missing For BINMAN_ALLOW_MISSING. Yours, Nikita Shubin.