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 16D43C433EF for ; Tue, 15 Feb 2022 17:07:09 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3C92F81FC6; Tue, 15 Feb 2022 18:07:06 +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="S+63LFQj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9B0BD8198A; Tue, 15 Feb 2022 18:07:03 +0100 (CET) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on20628.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e1a::628]) (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 CE0568198A for ; Tue, 15 Feb 2022 18:06:58 +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=QeCzIdvR1Le85ZVYbXYNzzd7yw/efWObEdNHu1Hlau52wMhzk8/37vl6MFGh8zMKodbmgOUdrG0Fd6ew8y4N0Q9FiZZwK6ewUkjgJdllMJGLsRb5GJExhmzbOy+/NMsPAVLV0v/8/J3WYrc8L3fP6O69co+aAJorz28RNfJNVBb5CnswqZgtT0o0uUpwT1PQaeGLCd9txOrmt2gGKliTuWnI913IG6tvQrpgmdy9KuOxJBY/gi76zjLTzw8pnsuZt1cIWvP29PwGaILy/xsWoEx50qVBDnGLF/zoHcv+nobMFP8Uy+QUfy6QMTw9g0Rfd6mvPHswdIhryX7b7Z14gw== 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=2AKn6qI9jaqNcHMPOsotuF5UdOxFoPO2yajx4lSNUhU=; b=R5BKET8EYdiYQvc4TjL6NRQ72VwsQXfhZqhXQMSHXC0NfJ7wsjKMzAcPw/URjdfh2wd8LI6DdiPGinLbeyC2zH5FmRhu2xP/jTGz4mk4YOZ8vTMWIfPkuV8h4pnukJ+5J8/EDZ5pJdMUAQ1tCiX8nnTPP7O2oxDgrSTLsoGczgA4Bqf8n0GKQMkKvyZPG9Th3HpQywXsbI948TAXjYP1JLY+gKgTT/WNN+i2zJrStk6vOpFBC6A/1XkjWI5BWVplblp1lsCOHQCFnY1a2aGZvsTjUIfONbO64sx+ft2IfhSvmhq3PlxzabJQj0ahetjzL/DjI3bpkYHCf33kGk7NBQ== 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=2AKn6qI9jaqNcHMPOsotuF5UdOxFoPO2yajx4lSNUhU=; b=S+63LFQjdVqxR30k1g9sVqKel4KYzc9hZQUncl6MRSl5+NAdBxW5/6V39YlQtkDxqgrWHiTWCBm9hQ1RblZDAwCH9ZceI5iYNvh7Ig/wMgti9satkjFD3fAAywr0RQY0zZMKTf1ZZ1VTcHtfLLCFdoqIhzzVcI6chnAp4mi/Z8J00LUANjYsa0s/uIGyQq+MF5cV86ZPNFX6RoHrxSxh+znODuYsQb6QTjjA8IDV1OUauqcAEoKCsNdY+jibf0+vR9r6AqReX1l3gAzmsC14jqHxzTfD+Q8ClFXSeqeFLZnG0AGuPJV0blFqbI6KhoFWcu8yNZYHsc+WFnk2BG8OcQ== Received: from DU2PR04CA0261.eurprd04.prod.outlook.com (2603:10a6:10:28e::26) by AM6PR10MB2231.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:41::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.15; Tue, 15 Feb 2022 17:06:57 +0000 Received: from DB5EUR01FT041.eop-EUR01.prod.protection.outlook.com (2603:10a6:10:28e:cafe::e1) by DU2PR04CA0261.outlook.office365.com (2603:10a6:10:28e::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.14 via Frontend Transport; Tue, 15 Feb 2022 17:06:57 +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 DB5EUR01FT041.mail.protection.outlook.com (10.152.5.191) 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 17:06:57 +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 18:06:56 +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 18:06:56 +0100 Message-ID: Date: Tue, 15 Feb 2022 18:06:56 +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 From: Jan Kiszka 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> <3d176bab-dc74-3ee2-9014-81401971ba8d@siemens.com> In-Reply-To: <3d176bab-dc74-3ee2-9014-81401971ba8d@siemens.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [167.87.0.44] X-ClientProxiedBy: DEMCHDC8A0A.ad011.siemens.net (139.25.226.106) To DEMCHDC8A0A.ad011.siemens.net (139.25.226.106) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 014e8236-22c3-48ae-4a20-08d9f0a592e9 X-MS-TrafficTypeDiagnostic: AM6PR10MB2231:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:363; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: i/edByDzWUIJnfwpflGplgvtm1dhaIxWEr2DWwzRMhUwgp7sgtuBkxh3BsAAjdRiJBqjOZHD9Fouzy5A1mR0BbcNSaiNH/OR9znaa+Lys4DqDf/t9oNMFUERJ4I1SFKKZ1WECiC5ZTr2rPfs4Nx3qNFsdadTbXXyU1RguSxfP1E1x7tkUcN80Fw0RMSmQJlaipiWVrCigmjSx2sXKlf1fgyK9Y51rapNV+FKs2/t19RgKXt2AEXp4R/hIjsdOgrMcLM2KKGRklSkyE4V5uNjXA/atVHpjmu0drtWTXKE4Cw9u1uH66MOO+nYcLX69iYeGXEwHGX/0dwS6xLCAJWH9Hx0hTtv0rfP+P+bdpwB/BrCnn6ijJZeA4Ah+X+nI39jAG1O3oQy+Dijumf6pTDy0UiKZqRpnVrkcJ6INwXPY+qTMDV6FNZ9Z/rT5F/dTZM+ETWiiiEVk0w+kT4Czt6i7EWlYk9fyg0ycl09IyMt7U8XWFRS/hNLMHLvRARH6olHs8RoQIdIZbSrtvc4A7nouMBR916REFrHiEzQU1kKU5XigoMFzvI8HKN5fACyff0otvUNLHxq6btQYVFlMsEE15srE7HDr3Q0GphnjWd533lRrWtJf7cForOYlJxVBbcKSNzMFBupwyKGDq1MY8fsLiaWeqaG5CYNO9ZH0ap8qJTrzQ+Ogan8fq0N7SOm3xPGksw384n4eILTzEbOLmxlf23ZwZbDQC5GZslmT9DuGScDe9aWxns1lzV7GALEQH1P/tSl6msCdU4xjj/4WpjBeN6PKITjJ14l/zK6HbMktanDM4AAi+jC+0Gy435p0QZnoNXpLG1Ug9LsyrZlKMleXj+F3Kdp1+uh7odi/q7ALl0= 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)(44832011)(4326008)(2906002)(5660300002)(31686004)(2616005)(83380400001)(336012)(356005)(8676002)(70586007)(70206006)(36756003)(8936002)(956004)(110136005)(54906003)(186003)(82310400004)(47076005)(40460700003)(16576012)(508600001)(82960400001)(53546011)(6706004)(966005)(316002)(36860700001)(81166007)(31696002)(86362001)(26005)(16526019)(3940600001)(36900700001)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2022 17:06:57.3887 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 014e8236-22c3-48ae-4a20-08d9f0a592e9 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: DB5EUR01FT041.eop-EUR01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR10MB2231 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 17:50, Jan Kiszka wrote: > 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. > ...not completely: $ source/tools/binman/binman replace -i flash.bin -f fit@0x380000.fit fit@0x380000binman: [Errno 13] Permission denied: '/.fit@0x380000.itb' Jan -- Siemens AG, Technology Competence Center Embedded Linux