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 91BE9C433EF for ; Tue, 15 Feb 2022 16:51:47 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E41A583A9B; Tue, 15 Feb 2022 17:50:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=siemens.com 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=siemens.com header.i=@siemens.com header.b="vXdYVme9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AD75383A89; Tue, 15 Feb 2022 17:50:37 +0100 (CET) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on0624.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0c::624]) (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 BD7D6838F0 for ; Tue, 15 Feb 2022 17:50:32 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=siemens.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jan.kiszka@siemens.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D+YNn1dPMFqbehpbSaj6YUMBnqTZuh6UxwV44iuRkH/PfQakvtB0K+fiR36Y+wZTohv9tZtgnOKKF91PL/AJXfXeJu7IZZIAQuZyeYTUI7Uw99KoOAo7VK6bwq64+X2Dd3WxxY3/H2x3B/XG4MSKk6sVs99ap84GgZSi3Zhp4J5wnjdi5jbeitvFOQfRrv2SHDo45/Z5dlaPQ2cA43iUpECJ6V6WTyyJMe31nzQIl5mGthkppzUfmx5gNRKZKJDMjGTqknDV2hETfwV8fT8AKIyGVzD6rY0ZA7ASR+doLHkm+jJyReoKQ3ziTqrq5GfAT9j1zHKwHsa8X/V9jV1FWA== 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=jNxpSfvsr+JwgSJKDn3xP0CopB1SXHqtO81Nt3tP/ck=; b=LwrHTFdAAGKuZddUxsgzIm9QV9WXesmqK2m5FMObIKJSo5TU4Ek2I5MeylXk6I7TbL9dZgunVsUF+gQ6zr6/FL4YUFw/E9T+UXx31dgcb07OUygTiGefrAaNQk/eZhCsIyBbeAKb3LJGyuvEi20LZvIPBGZ0Sg625X03pV3fyiVbABqLK0REJViKTDnlcOtENOaXDJJ58FWMkO82m2BWUadc1UGmQFZt0BOAmvJkhxFAIvXYu1DJHs6xYBuVbotKZkul6yN39pU6nN8KjlNLmz1g2EJ6kuG8mh4dH7cZXGW/+JA7lBepJjQRjDq9yqnV38pUHHf1cIZ3O8nFHTQL9A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 194.138.21.71) smtp.rcpttodomain=gmail.com smtp.mailfrom=siemens.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=siemens.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=siemens.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jNxpSfvsr+JwgSJKDn3xP0CopB1SXHqtO81Nt3tP/ck=; b=vXdYVme9vhX9OWGwHP0peWkcukcWHWt1xEkUnrAItUO6C+3L+NKTCzUVQx415gWA0z5W6zOXEQYqp9IoFhunSK0eI5MoBzOD7O6QGR95++xWvmErNEL23+31usNKrvjOMSufTUOxsiLxJfP78eJrQgKmiZFXHLW0fFlBRWe8MvRWADt1nLy2iaUVVlKei/6Qyme3h0P4Rn29H2f3fPDhD7UXbrF/TKKtbLlrcWJwmLJnaMoeb/X4Y3t0wFoOzaGEGDFcfntN/d2Zil1eMloziOVmPvBVJIl7GpzU9hL0IwumdqclmN5L+0x7624s9ymV9pb/RrBsj7LIb5iYuQ5bZg== Received: from DB8PR03CA0024.eurprd03.prod.outlook.com (2603:10a6:10:be::37) by DB8PR10MB2667.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:a9::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4995.14; Tue, 15 Feb 2022 16:50:31 +0000 Received: from DB5EUR01FT012.eop-EUR01.prod.protection.outlook.com (2603:10a6:10:be:cafe::c9) by DB8PR03CA0024.outlook.office365.com (2603:10a6:10:be::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.19 via Frontend Transport; Tue, 15 Feb 2022 16:50:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 194.138.21.71) smtp.mailfrom=siemens.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=siemens.com; Received-SPF: Pass (protection.outlook.com: domain of siemens.com designates 194.138.21.71 as permitted sender) receiver=protection.outlook.com; client-ip=194.138.21.71; helo=hybrid.siemens.com; Received: from hybrid.siemens.com (194.138.21.71) by DB5EUR01FT012.mail.protection.outlook.com (10.152.4.235) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4975.11 via Frontend Transport; Tue, 15 Feb 2022 16:50:31 +0000 Received: from DEMCHDC8A0A.ad011.siemens.net (139.25.226.106) by DEMCHDC9SKA.ad011.siemens.net (194.138.21.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.18; Tue, 15 Feb 2022 17:50:30 +0100 Received: from [167.87.0.44] (167.87.0.44) by DEMCHDC8A0A.ad011.siemens.net (139.25.226.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.18; Tue, 15 Feb 2022 17:50:30 +0100 Message-ID: <3d176bab-dc74-3ee2-9014-81401971ba8d@siemens.com> Date: Tue, 15 Feb 2022 17:50:29 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v2 4/5] binman: Convert FIT entry type to a subclass of Section entry type Content-Language: en-US To: Alper Nebi Yasak , CC: Heiko Thiery , Simon Glass References: <20220207220809.4497-1-alpernebiyasak@gmail.com> <20220207220809.4497-5-alpernebiyasak@gmail.com> <1c7e5656-87f8-7d87-cb50-aead7b9a5ff1@siemens.com> From: Jan Kiszka In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [167.87.0.44] X-ClientProxiedBy: DEMCHDC89XA.ad011.siemens.net (139.25.226.103) To DEMCHDC8A0A.ad011.siemens.net (139.25.226.106) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2710eb48-de45-4602-eb89-08d9f0a34703 X-MS-TrafficTypeDiagnostic: DB8PR10MB2667:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:182; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vr+orKakDSlmQSZAt6v/1l0e+koM8L4WSqvMkza6Y80FeR/ANU8rZlBQ+x7lQLRWslQWDci6UT7OBjHLcs9fATCgF38wURmsILJpor1z3aXv0O0C7zJZS8MWZFgiURQj3rt+pVq97kt+GMrxhCAYeImL/CIq9nMGGsHW4NP1Kep8E1jo3cb0tCTNPsOwaL9DbJZ3pZmARSO6gARQpuRYYcVD2D4NBSEntw/auL0CR/z/jVKezzaENtVn0nt6n+JBczKbSKm3OzBmJYcJXeMZsBcma1bRQwqMF7asLUbX7UNyzyF0x0ID9/8SXri6XhWQe3fMblvN6IdCRFqA2RZ4JtZ5zzqCeY66TbZBBJZR5zRlu3CbD+rWN0ucSMpvw/ls1laTVgAZ4LqIFQxQtmNsBNlXyK1GhaZj6fFHBkHIf4LfE3Tgd3GT7923uy0BEuywvC9aeenFsgf01u9UazMueFA7V8xns4YeBdwS7SQdsoZ23JO264iPxBhX2vYREhH/12B+vy7wadlXDZ3Rja3I7CIl1tFoEBk6jqDMOfECAuFlck5RL3vncitDnKqxPPZheSRX5REAaXDDwGur4MJhG+QxRKQIN+g2gy0ERmNsZmC75Na9HgogHsr4uC5vKZkJfSNqQB84RZNWVecwHXfffLgIHYQusidmgV1Pf0kGZNETi4JHhjwDnom5JGYI+rXl/chOcf3HzQN1J9xArUqf16I/Bmg6b2s11PL1e1ZooiFvohtopooKLGi7jHIUHOhpwR1FNY7aunnblDOm9xzQWVKDXmK01B8vClEO5mqBbAkCZv/KcrDXy//1/GrCI3O/nA1Dlx1kepgadiVeWpoXi/SGR78xgLkJQEuVpJHxUOQ= X-Forefront-Antispam-Report: CIP:194.138.21.71; CTRY:DE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:hybrid.siemens.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230001)(4636009)(36840700001)(46966006)(40470700004)(82960400001)(47076005)(2906002)(966005)(82310400004)(83380400001)(110136005)(31696002)(54906003)(16576012)(6706004)(40460700003)(70586007)(498600001)(70206006)(5660300002)(8936002)(36860700001)(8676002)(31686004)(44832011)(4326008)(336012)(86362001)(2616005)(16526019)(81166007)(356005)(186003)(26005)(53546011)(956004)(36756003)(3940600001)(43740500002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2022 16:50:31.0629 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2710eb48-de45-4602-eb89-08d9f0a34703 X-MS-Exchange-CrossTenant-Id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=38ae3bcd-9579-4fd4-adda-b42e1495d55a; Ip=[194.138.21.71]; Helo=[hybrid.siemens.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR01FT012.eop-EUR01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR10MB2667 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.5 at phobos.denx.de X-Virus-Status: Clean On 15.02.22 13:27, Alper Nebi Yasak wrote: > On 14/02/2022 12:09, Jan Kiszka wrote: >> On 07.02.22 23:08, Alper Nebi Yasak wrote: >>> The binman FIT entry type shares some code with the Section entry type. >>> This shared code is bound to grow, since FIT entries are conceptually a >>> variation of Section entries. >>> >>> Make FIT entry type a subclass of Section entry type, simplifying it a >>> bit and providing us the features that Section implements. Also fix the >>> subentry alignment test which now attempts to write symbols to a >>> nonexistent SPL ELF test file by creating it first. >>> >>> Signed-off-by: Alper Nebi Yasak >>> Reviewed-by: Simon Glass >>> --- >> >> Only came to testing this now, and it causes a regression. >> >> Before this commit (I've added fdtmap to >> arch/arm/dts/k3-am65-iot2050-boot-image.dtsi for this): >> >> $ source/tools/binman/binman -D ls -i flash.bin >> Name Image-pos Size Entry-type Offset Uncomp-size >> ---------------------------------------------------------------------------------- >> main-section 0 8c0000 section 0 >> blob-ext@0x000000 0 37373 blob-ext@0x000000 0 >> blob@0x080000 80000 84484 blob@0x080000 80000 >> fit@0x280000 280000 f445f fit@0x280000 280000 >> fdtmap 37445f cf9 fdtmap 37445f >> fill@0x680000 680000 20000 fill@0x680000 680000 >> fill@0x6a0000 6a0000 20000 fill@0x6a0000 6a0000 >> blob-ext@0x6c0000 6c0000 415de blob-ext@0x6c0000 6c0000 >> blob-ext@0x740000 740000 43952 blob-ext@0x740000 740000 >> blob-ext@0x7c0000 7c0000 415e2 blob-ext@0x7c0000 7c0000 >> blob-ext@0x840000 840000 4395a blob-ext@0x840000 840000 >> >> With this commit: >> >> $ source/tools/binman/binman -D ls -i flash.bin >> Name Image-pos Size Entry-type Offset Uncomp-size >> ------------------------------------------------------------------------------------------- >> main-section 0 8c0000 section 0 >> blob-ext@0x000000 0 37373 blob-ext@0x000000 0 >> blob@0x080000 80000 84484 blob@0x080000 80000 >> fit@0x280000 fit@0x280000 280000 >> u-boot section >> u-boot-nodtb u-boot-nodtb >> fdt-iot2050-basic section >> blob blob >> fdt-iot2050-basic-pg2 section >> blob blob >> fdt-iot2050-advanced section >> blob blob >> fdt-iot2050-advanced-pg2 section >> blob blob >> k3-rti-wdt-firmware section >> blob-ext blob-ext >> fdtmap 37445f cd9 fdtmap 37445f >> fill@0x680000 680000 20000 fill@0x680000 680000 >> fill@0x6a0000 6a0000 20000 fill@0x6a0000 6a0000 >> blob-ext@0x6c0000 6c0000 415de blob-ext@0x6c0000 6c0000 >> blob-ext@0x740000 740000 43952 blob-ext@0x740000 740000 >> blob-ext@0x7c0000 7c0000 415e2 blob-ext@0x7c0000 7c0000 >> blob-ext@0x840000 840000 4395a blob-ext@0x840000 840000 >> > > The AddMissingProperties() and SetCalculatedProperties() methods were > disabled for FIT as a fixup to this patch, that's why image-pos etc. > aren't available. See comments at [1] for some context. > > Hopefully my two patches [2][3] fix things, can you test with them? > > [1] "binman: Correct the error message for a bad hash algorithm" > https://patchwork.ozlabs.org/project/uboot/patch/20220208105941.1.I8f212a1150defebaf8b7b15a79f7a2fc62c276b2@changeid/ > > [2] "binman: Skip processing "hash" subnodes of FIT subsections" > https://patchwork.ozlabs.org/project/uboot/patch/20220209190236.26479-1-alpernebiyasak@gmail.com/ > This one helped, indeed. Thanks, Jan > [3] "binman: Update image positions of FIT subentries" > https://patchwork.ozlabs.org/project/uboot/patch/20220207220809.4497-6-alpernebiyasak@gmail.com/ > >> The fit is nicely shown but its Image-pos column is now empty. And that >> leads to: >> >> $ source/tools/binman/binman -D extract -i flash.bin -f extr.bin fit@0x280000 >> binman: unsupported operand type(s) for +: 'int' and 'NoneType' >> >> Traceback (most recent call last): >> File "source/tools/binman/binman", line 141, in RunBinman >> ret_code = control.Binman(args) >> File "/data/u-boot/tools/binman/control.py", line 639, in Binman >> not args.uncompressed, args.format) >> File "/data/u-boot/tools/binman/control.py", line 260, in ExtractEntries >> data = entry.ReadData(decomp, alt_format) >> File "/data/u-boot/tools/binman/etype/section.py", line 763, in ReadData >> data = parent_data[offset:offset + self.size] >> TypeError: unsupported operand type(s) for +: 'int' and 'NoneType' >> >> Similar breakages for "replace" and likely more sub-commands. > > OTOH, Entry_section docstring does say subentry offsets can be None, so > it might be a good idea to fix these TypeErrors regardless. > >> >> I have to revert this locally for now - no time to debug. >> >> Jan >> -- Siemens AG, Technology Competence Center Embedded Linux