Message ID | 20220819140035.32760-8-stefan.herbrechtsmeier-oss@weidmueller.com |
---|---|
State | Superseded |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=weidmueller.onmicrosoft.com header.i=@weidmueller.onmicrosoft.com header.a=rsa-sha256 header.s=selector1-weidmueller-onmicrosoft-com header.b=IpFfT2Cp; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4M8Nk21tlyz1ygd for <incoming@patchwork.ozlabs.org>; Sat, 20 Aug 2022 00:02:34 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 23D7084B62; Fri, 19 Aug 2022 16:01:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=weidmueller.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=weidmueller.onmicrosoft.com header.i=@weidmueller.onmicrosoft.com header.b="IpFfT2Cp"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 37DE684B44; Fri, 19 Aug 2022 16:01:11 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2068.outbound.protection.outlook.com [40.107.22.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C5DD184B5A for <u-boot@lists.denx.de>; Fri, 19 Aug 2022 16:00:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=weidmueller.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=stefan.herbrechtsmeier-oss@weidmueller.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WbEAnhUClXub98WBiWjFUPgiO38QftfNW0T2jDAnAqqUCV8TcA0Lk/hfy5rk6GWuwtHSrJQgyovJHhtRlWPapZ4JNMGQIVSbo840txl7WeMfG9nTvDCJ872Zmk48+/lBe/5q9R9BJsJo5kU04hDsokx6fV3S5pDkrlBa8SbdOsHqpCB/lJeh3cQr72KL/vykPubDkBWGx3BDnY/Z1BjrH41PnN+fSCFJEcxTCoXyHYgVHyABoH/ZaHHlkuQX87g2YC5KymGFe10LXakKamSg08wWytBQbQKIxLksjLYFsuE2Cs0NIXPoJmPLpKFtrb4TAMdge6ohDEE7dbyA4TpFWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=X4reHGVTR4IwrW4sH7XF76HfUBfZCc99YCN68cZToM4=; b=Smm3c43gDcebFhTwNVvvgeNlCoq+Sy4XHol8LeLuxtHSgI0c/XRMlZyrEbF8sch6J+Q+oiqVWpHbUhxhnpIRm+gLHx5oTWERDy/44//bxUmKWaKw64qOg30DqUKv/R/5TH8LWy8Rp9rkJuY2VKgYXH8Psa0qVjDmoh2KsunYwcNuTCnrYXsS+VpYAIpCP6hJZn9RB9RZVXJgwyjy3M7eleP1i+Mq8BUjvRmSaAj6iuu/g6QYb54u6GCTUmftNuJpNLLksy1cmd5kPuGkheAT5VNBT/aRbYTQ7RUTvdV5rnOOPXO2r5dQPdqzpkyiaEjTeb1WGJ/YoIHiuCr7QgBa9Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=weidmueller.com; dmarc=pass action=none header.from=weidmueller.com; dkim=pass header.d=weidmueller.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=weidmueller.onmicrosoft.com; s=selector1-weidmueller-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=X4reHGVTR4IwrW4sH7XF76HfUBfZCc99YCN68cZToM4=; b=IpFfT2CpBfczAsWCxMCv/df+AmBO/zabAM2rj1PVMc36GhUYubFa9zIpHAeOWhjFbY1EtwnknDWfRsX05Rf+FHETCJtQVhBZh+vbu51Z62CwgJJB1Sj6NXY8oTHwxu9xa/P7C2fXv+r7ru0IgiPFi4gcSNPmuMLOmUdqj7PRxf4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=weidmueller.com; Received: from PAXPR08MB6969.eurprd08.prod.outlook.com (2603:10a6:102:1d8::23) by DU2PR08MB7373.eurprd08.prod.outlook.com (2603:10a6:10:2f1::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.16; Fri, 19 Aug 2022 14:00:57 +0000 Received: from PAXPR08MB6969.eurprd08.prod.outlook.com ([fe80::f95b:2e64:9ee6:4d44]) by PAXPR08MB6969.eurprd08.prod.outlook.com ([fe80::f95b:2e64:9ee6:4d44%3]) with mapi id 15.20.5546.018; Fri, 19 Aug 2022 14:00:57 +0000 From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier-oss@weidmueller.com> To: u-boot@lists.denx.de Cc: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>, Alper Nebi Yasak <alpernebiyasak@gmail.com>, Heiko Thiery <heiko.thiery@gmail.com>, Simon Glass <sjg@chromium.org> Subject: [PATCH v5 07/21] binman: Add DecompressData function to entry class Date: Fri, 19 Aug 2022 16:00:21 +0200 Message-Id: <20220819140035.32760-8-stefan.herbrechtsmeier-oss@weidmueller.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220819140035.32760-1-stefan.herbrechtsmeier-oss@weidmueller.com> References: <20220819140035.32760-1-stefan.herbrechtsmeier-oss@weidmueller.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: AS4P251CA0011.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:5d2::7) To PAXPR08MB6969.eurprd08.prod.outlook.com (2603:10a6:102:1d8::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f812e125-bd2c-41cf-69de-08da81eb3d3e X-MS-TrafficTypeDiagnostic: DU2PR08MB7373:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: I+ibB7cOJsWCy+q3e640Tdoot9q6cU7faXrRFJX3jkdP/qLOTF8YDCDhrK52N15vlB6ekHse95Ti0mnn+wHCpV7nkdk3V3uc2JT2TtVmI52K2aEBMITRxtB0Xb0hjl2yZa9spAZAwL6oCT8hx8dcqOryT+ge9qtx7UbAdAwmVzOL4s6zEVBmn12eqkNnrR7Meq9jgXW0j5Ey0fxNB+QmQ3PdbR74GosSCC/qS37Th/IqrrMATZyR8TODRrXPNJGtewmsrXYFNreuybY91hUFZv3abxp4b7c4QoY8qddPnIjkRFuETqbgUSGmY0HnZGl8hvi+XzKRVgDXOfNp2XMF3bVWM9mD15BLkCbHupX4R3l7S15kCFn88yk9yYiophFTynXKauXehc4QyoJiM63xO1dYGIlq28HyTnKDT2lDlcoI9vZWNPQ37nob1LwH21ceiLoxbtLA6qCLOWgCsUVom98b5ndT+Fcbjq48n55ZgPh3K4zBGdPykjDetDjTjj5i3H6gUwCBa8EWef7lqlbPtzJALTVw6YYmupuR8wMrqV/PS1wSi95qwxd91A2ScogcdxKNxvqyfA3nIi6OOBMKGzLYzjAIYT6iNEQPQ3PHLWq3pkP/8fcD0YEmDM5zfWZMD4dlX0RtOdZoG8c6qwt8t80bEBREUo7RqF1YKEoff9+wznlwKH3AcwXZWZ8jz49E7YKkoTv6Do2S9qSOHraaDLZDmFNG3QXoxNQZ3ThmmHiyeWMIj2JEyL/j2IGAE1V7tFaCPTxTXvlE4Sltx7i+DA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR08MB6969.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(4636009)(39860400002)(346002)(366004)(136003)(396003)(376002)(4326008)(41300700001)(52116002)(6506007)(6666004)(186003)(38100700002)(36756003)(54906003)(6916009)(5660300002)(38350700002)(8936002)(316002)(2906002)(26005)(1076003)(83380400001)(8676002)(6486002)(86362001)(478600001)(6512007)(66946007)(66556008)(66476007)(2616005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: MqUmv7xyBQJSJxT+L210wf1NgIGg4myjTmlZ0hmSY4KVjZvCYnvoGgYMckF6elK0e6t7x2oUwyXoc0w0hvA4ddX7PDXBze8LEhP5LX2qYrXDN2eC7nrqnV4mcWHJJnwDY4w7gLE2Xam1UuYqBGluviGIBdEUCsZNH8EmfKKykRqmVCR/tfg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oB97ThmjgjYIe18+VihtFVPWYD4IAinxdu1okLUUF84CcABa8tKKo2OQ3LxTfm0+gM1lDKYlpVJLShxiPonNeK7kYzflU/+YL3iMkKpqOnQf0dAsPn3r9baifjzPW3Z2PwC6Ea0MU405iO9DPZuW6IGoaHDOllQfXxxW4Grp5EJysmVCRP3p3NZ/cukIDzWj3aqFIuoNX7le9zd/mkyZ36SSLxRr76HlC3eR7FWOIUQz0YCL4KNaLAFQ+3OF/1zUCgG1bupXLd5QYhd3aajcM8MuBRXaMS0q+GwNgK0fWn5Abcwee1RR+JyF9aoY8LKe5T81V9xlLaG1e7fYJuZSAaFsDYcXLYfDkluQ== X-OriginatorOrg: weidmueller.com X-MS-Exchange-CrossTenant-Network-Message-Id: f812e125-bd2c-41cf-69de-08da81eb3d3e X-MS-Exchange-CrossTenant-AuthSource: PAXPR08MB6969.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Aug 2022 14:00:57.2407 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e4289438-1c5f-4c95-a51a-ee553b8b18ec X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 7yN6dniqTBRaT9iSCuT3NDhPTlfkKWIhpdVcnZNOw5t692bP6evif6xooVgnX7II6+37zMcna4Wqpv18S+quPA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR08MB7373 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean |
Series |
binman: Rework compression support
|
expand
|
diff --git a/tools/binman/entry.py b/tools/binman/entry.py index 8f846e55b6..6d58410e91 100644 --- a/tools/binman/entry.py +++ b/tools/binman/entry.py @@ -1086,6 +1086,21 @@ features to produce new behaviours. data = comp_util.compress(indata, self.compress) return data + def DecompressData(self, indata): + """Decompress data according to the entry's compression method + + Args: + indata: Data to decompress + + Returns: + Decompressed data + """ + data = comp_util.decompress(indata, self.compress) + if self.compress != 'none': + self.uncomp_size = len(data) + self.uncomp_data = data + return data + @classmethod def UseExpanded(cls, node, etype, new_etype): """Check whether to use an expanded entry type diff --git a/tools/binman/etype/section.py b/tools/binman/etype/section.py index 48165abf6a..b9b2f25345 100644 --- a/tools/binman/etype/section.py +++ b/tools/binman/etype/section.py @@ -13,7 +13,6 @@ import concurrent.futures import re import sys -from binman import comp_util from binman.entry import Entry from binman import state from dtoc import fdt_util @@ -777,7 +776,7 @@ class Entry_section(Entry): data = parent_data[offset:offset + child.size] if decomp: indata = data - data = comp_util.decompress(indata, child.compress) + data = child.DecompressData(indata) if child.uncomp_size: tout.info("%s: Decompressing data size %#x with algo '%s' to data size %#x" % (child.GetPath(), len(indata), child.compress,