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 A88C3C05027 for ; Sun, 19 Feb 2023 22:03:55 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 75CF9858A8; Sun, 19 Feb 2023 23:03:03 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=kwiboo.se Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kwiboo.se header.i=@kwiboo.se header.b="M/L0bTlU"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 066FA857FC; Sun, 19 Feb 2023 23:02:23 +0100 (CET) Received: from xvfrpbcd.outbound-mail.sendgrid.net (xvfrpbcd.outbound-mail.sendgrid.net [168.245.59.205]) (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 695DE8585F for ; Sun, 19 Feb 2023 23:02:07 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=kwiboo.se Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bounces+31435339-7456-u-boot=lists.denx.de@em2124.kwiboo.se DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kwiboo.se; h=from:subject:in-reply-to:references:mime-version:to:cc: content-transfer-encoding:content-type:cc:content-type:from:subject:to; s=s1; bh=KlTDXw9MJtbhgEokgwaewhAjA0iZxN6Q92Mb909nFbk=; b=M/L0bTlU65dP1ciV4cWS0WWqV3Xl22WA3AeHebQuFWKt2wF2mf1Bo8hHpjcRzVKL9p1u hBB3Do+F+McIucIz5sQIRi1bSUt/TrDtuWW4p9NgSAQFloMyJ883pJmAU88300zza1ldg0 g/GT9NtLuKan+OBnjdQcuvcsFBIfvGLlA2h+63mRHyC85827h2bWZI1iBP+T7Q93RbkIi5 IzB7Cu6e6WRycQzWe1g9BYC7hteAFl7cbdiZ2aGrDfY+acAFd6dF2wDqXouRhSXkIDSoHd zGRCcICyeWIqEm5Nbo4HXOfMbMP9IlX76dEefdHxrxDKBv0d9rfdIDIfI6C+BR3w== Received: by filterdrecv-695cbfbb87-q9b6q with SMTP id filterdrecv-695cbfbb87-q9b6q-1-63F29C5C-D1 2023-02-19 22:02:04.961642161 +0000 UTC m=+788715.771555608 Received: from bionic.localdomain (unknown) by geopod-ismtpd-canary-0 (SG) with ESMTP id 3FevGqnFTeWLZl__uvW_OQ Sun, 19 Feb 2023 22:02:04.732 +0000 (UTC) From: Jonas Karlman Subject: [PATCH 5/9] binman: Implement missing check functions in mkimage entry Date: Sun, 19 Feb 2023 22:02:05 +0000 (UTC) Message-Id: <20230219220158.4160763-6-jonas@kwiboo.se> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230219220158.4160763-1-jonas@kwiboo.se> References: <20230219220158.4160763-1-jonas@kwiboo.se> MIME-Version: 1.0 X-SG-EID: =?us-ascii?Q?TdbjyGynYnRZWhH+7lKUQJL+ZxmxpowvO2O9SQF5CwCVrYgcwUXgU5DKUU3QxA?= =?us-ascii?Q?fZekEeQsTe+RrMu3cja6a0h62kXiO4uXNR0Oi35?= =?us-ascii?Q?YeOYknTJetU+l+swvftx8T4cfUGQUBy+DkpkWUq?= =?us-ascii?Q?w2H4yUVVEhMMCJpyeJIiIqCbQB7liT4brS6v232?= =?us-ascii?Q?cQWp08FBn+ug9s1steGC3qvkMCHGipRr3aOw5CI?= =?us-ascii?Q?bi1EW1FtAdGnopKCrQNbZNu1x1VVQvar8rzlY3?= To: Simon Glass , Alper Nebi Yasak Cc: Pali =?iso-8859-1?b?Um9o4XI=?= , Heinrich Schuchardt , Marek =?iso-8859-1?b?QmVo+m4=?= , Quentin Schulz , Stefan Herbrechtsmeier , u-boot@lists.denx.de, Jonas Karlman X-Entity-ID: P7KYpSJvGCELWjBME/J5tg== Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii 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 The mkimage entry is working like a section entry but inherits from Entry not Entry_section. Copy implementations of missing Check-functions from Entry_section and adopt to Entry_mkimage. Signed-off-by: Jonas Karlman --- tools/binman/etype/mkimage.py | 44 ++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/tools/binman/etype/mkimage.py b/tools/binman/etype/mkimage.py index cb264c3cad0b..49d3462a154c 100644 --- a/tools/binman/etype/mkimage.py +++ b/tools/binman/etype/mkimage.py @@ -206,16 +206,31 @@ class Entry_mkimage(Entry): self._imagename.SetAllowMissing(allow_missing) def SetAllowFakeBlob(self, allow_fake): - """Set whether the sub nodes allows to create a fake blob + """Set whether a section allows to create a fake blob Args: allow_fake: True if allowed, False if not allowed """ + super().SetAllowFakeBlob(allow_fake) for entry in self._mkimage_entries.values(): entry.SetAllowFakeBlob(allow_fake) if self._imagename: self._imagename.SetAllowFakeBlob(allow_fake) + def CheckMissing(self, missing_list): + """Check if any entries in this section have missing external blobs + + If there are missing (non-optional) blobs, the entries are added to the + list + + Args: + missing_list: List of Entry objects to be added to + """ + for entry in self._mkimage_entries.values(): + entry.CheckMissing(missing_list) + if self._imagename: + self._imagename.CheckMissing(missing_list) + def CheckFakedBlobs(self, faked_blobs_list): """Check if any entries in this section have faked external blobs @@ -229,6 +244,33 @@ class Entry_mkimage(Entry): if self._imagename: self._imagename.CheckFakedBlobs(faked_blobs_list) + def CheckOptional(self, optional_list): + """Check the section for missing but optional external blobs + + If there are missing (optional) blobs, the entries are added to the list + + Args: + optional_list (list): List of Entry objects to be added to + """ + for entry in self._mkimage_entries.values(): + entry.CheckOptional(optional_list) + if self._imagename: + self._imagename.CheckOptional(optional_list) + + def check_missing_bintools(self, missing_list): + """Check if any entries in this section have missing bintools + + If there are missing bintools, these are added to the list + + Args: + missing_list: List of Bintool objects to be added to + """ + super().check_missing_bintools(missing_list) + for entry in self._mkimage_entries.values(): + entry.check_missing_bintools(missing_list) + if self._imagename: + self._imagename.check_missing_bintools(missing_list) + def AddBintools(self, btools): super().AddBintools(btools) self.mkimage = self.AddBintool(btools, 'mkimage') -- 2.39.2