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 C2670FF885E for ; Mon, 27 Apr 2026 12:22:16 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5AFDD83C14; Mon, 27 Apr 2026 14:22:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=cherry.de 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=cherry.de header.i=@cherry.de header.b="UEWdhqlo"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E34BC83FDB; Mon, 27 Apr 2026 14:22:13 +0200 (CEST) Received: from DUZPR83CU001.outbound.protection.outlook.com (mail-northeuropeazlp170120005.outbound.protection.outlook.com [IPv6:2a01:111:f403:c200::5]) (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 D8B9580433 for ; Mon, 27 Apr 2026 14:22:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=cherry.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=quentin.schulz@cherry.de ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=W8Kp0e+VBnFwY9kTSeR+Xr7k/M656Pc38Otd0Ilx/4hy1XbM/r/6EPG3wSasTKP/OMKhvaEpoY9+Z9aIMgFzD0PZCWQZ4xyaDJ53Lg1gs6n7kzYDgGpLwMiQ0i7/M3HRCnu1SH+pZr1prM9EuoHM/KqkSYHvxBXHJ+VCvrfjbbHN2McHN4TiP+IN7Goi8ONEe8JWpNt8acBJDZbkWa6/rSRM9EGFAJEMDfiReMup5NM4So//53bAdIVnVUBDpQrCYL6hVEcTOE+mpiAtBdcAGx2wMyDq/kBR/x1/+TsWJXQqBAZ7KJH03I8Mo0rVAew4qP80GRw6ootMnk13gdz9hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=hh55B0H1/9anFHifl9NnuH5Mzw02eM9vCQDCfpaUR7o=; b=BsFW8da42tL5ToZ0ToUBGXYbn1OGDCuhKygUYfZdn/Xpm8QadHGRgbvoyVn/2hdcMsPv9V2BoSqYHTG5TJ6Se69K1MifigYqgp4LIHHbMyy45r0VqHzy289n+hT/Rgnsp39AKahBJlqNbPkxaEkv7RSayYMm2FBAKii+bicEY6oBkw3kO33eollJ8tIvhdKbhS/4Se7iTHbaoBDpyb7vGc6FIe74JEcNEENbXGsbakowRVvN6BQOVOg/J+/oGzpH0+frvapqkLDwpFClepa/oPLXi6qkypN29SiSo7dLJMeGOG2v3Ynau3eKBwF+A0LU79uPR0gRAUmO2UTV80rUbw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cherry.de; dmarc=pass action=none header.from=cherry.de; dkim=pass header.d=cherry.de; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cherry.de; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hh55B0H1/9anFHifl9NnuH5Mzw02eM9vCQDCfpaUR7o=; b=UEWdhqloV3U+iXdTshUrmpXFuME7X+S3oiN83mzLlYwUFYmncxgcd9dS8J1kxN/Lc/haxjv+buB8HL9DButEeP80yTHZmQIvckdrmzxYkPKAM4eajdxq6Nt+xbBPmPQZ/ygl5R51WF6msuaKt+31pXmB6fsuPgtdLnPbAgVSCIo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=cherry.de; Received: from PA4PR04MB7743.eurprd04.prod.outlook.com (2603:10a6:102:b8::20) by DU0PR04MB9348.eurprd04.prod.outlook.com (2603:10a6:10:358::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9846.26; Mon, 27 Apr 2026 12:22:08 +0000 Received: from PA4PR04MB7743.eurprd04.prod.outlook.com ([fe80::9a4e:252f:2fd:97b7]) by PA4PR04MB7743.eurprd04.prod.outlook.com ([fe80::9a4e:252f:2fd:97b7%6]) with mapi id 15.20.9846.016; Mon, 27 Apr 2026 12:22:08 +0000 Message-ID: <5a27f1b5-c876-4daf-9394-ec1377ae3ee7@cherry.de> Date: Mon, 27 Apr 2026 14:22:06 +0200 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] fdtgrep: Add option to reserve free space in the output FDT To: Marek Vasut , Simon Glass , u-boot@lists.denx.de Cc: Alper Nebi Yasak , Ilias Apalodimas , Tom Rini References: <20260422023131.2813748-1-sjg@chromium.org> <04536c1e-c732-4d55-a98d-c14acf2d8336@cherry.de> <7edd2c18-4f09-42c0-98be-1dfcb23b755b@mailbox.org> Content-Language: en-US From: Quentin Schulz In-Reply-To: <7edd2c18-4f09-42c0-98be-1dfcb23b755b@mailbox.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: ZR2P278CA0008.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:50::11) To PA4PR04MB7743.eurprd04.prod.outlook.com (2603:10a6:102:b8::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PA4PR04MB7743:EE_|DU0PR04MB9348:EE_ X-MS-Office365-Filtering-Correlation-Id: 48fd9ef6-0d76-4b5e-7f2b-08dea45799bb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|10070799003|376014|366016|1800799024|22082099003|18002099003|56012099003; X-Microsoft-Antispam-Message-Info: D3T/C1zL9U9QVIw/Js0WIpNnrgiuFSe6u4gCmchIoVfQX3hwEN2FXG33P7hnQcWGts4uJChUid7r05JE48q+3Iu1uUUcY3y5xgxVZdpehYYbsBABY3Cfk7UPQq/pXh8l6GIrgMNg19PLO4MPaerPzys31fA4MNlMgdPkfbPSk6tZKjo6LCnbH9XpYCn/Um7wHiEXFnBqzniGfsRlVvhjaE6vbrkBWvsK1/7EnT4qeO+EFOgUYCZ7wsQhkTiLGIVqwJMCYOM1jpLzJHE2uxHK6lHYNXi9T0hZz/9l5wKDQfG5l0RQh+9s+hLptWvnxDe0b4oUF+sBGrbZ7dsMEcmTFOxz0ipFeRQObVeZJYuu7W8CrqyAKdhWRYzX9gv1sJSWnghfBhcPlymsM06RTYrkKkKxHwxX1lPYtSM9GqUjf5o23wJsLIv2srUmITVyU1jbG3U+1cveA3JIpuhPPqrTLdBdwEAzbE8cs2Rt1PV3bLDRxgaVNiLNG7ke4rKo3cWHNZiTZpXIdceSB2JE+3FL9nmKo5zUGDJDSFo6xdUPWF1K13sOc1iWKhQ87h8krOXdb6SJHjl19RCKg8pP8olxYZcc9ujHTD+8A/oQzveGP4mIu9STISCLKgy51+pZVO7kyxIfC11Cf/OcpBWjX1P+nExPbeqChhU1HzZgrjHjkPC+/rgV+wnTRAYKAdqpMgHIbHZjjqn2tonwlqlcdfsXE3TY/6yp5TyFB2zhayCxcmc= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PA4PR04MB7743.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(10070799003)(376014)(366016)(1800799024)(22082099003)(18002099003)(56012099003); D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mU0U3NQUGpTMERibXpZeFVyQVpWdkJSZHMvc2xLcmdI?= =?utf-8?B?VlMyTVpZVDdISUxXaXAzemt6OWNsK1VXYVh1eG01enNCemR1bGJldWpZYzFl?= =?utf-8?B?SSs5U08rMUt4VFJheFVjaENhTXZxY1V2V3ByVDlHVUJEQ0FlSkU3Y0pMcFJk?= =?utf-8?B?SWNEUWJ3bmVCVXFhUTl0UXkreHlVQ1RqYW95dUE1UjlTeGtWZzg2YXl2bzAy?= =?utf-8?B?bTZZQ2NINWdmdnA3NEVMTk92WGhyaEtmNG0zeitxYkEyZExjWDhwakpWakZl?= =?utf-8?B?Qi9uZVE3TWp6SUI4STcrUU5DVGVodzh2ZTBGaDhQQWVENjZzTEVaY2w2aGdJ?= =?utf-8?B?dFQ3WHRPNHFWYjIyZmw2QllhL3hSbEl6ZHBHMkk4Q2ppY0JGanZlZDhzeWUx?= =?utf-8?B?UytFdWQwV1RUMTdacW1odmR0MlVWNklCQXovdmsxWFA4a1dVMFg1cmxzUXRo?= =?utf-8?B?U2U1MVF4Q3dXQXVjNDh3NUkvM3IremRRd2VKdjZoeUIyczlRTDYyeUM3QVFs?= =?utf-8?B?WCtIWDJQUHNvY2NZN2NlUmgxSVFYY2hIMXBQQU5yaW1ab1RMaDYvTHcwaGNs?= =?utf-8?B?THhtQnljaDJsNU5DeXMyZWNzaVJCeVNTM1ZCa1dkVS9Fa0xnQ01qRnZHS1ZR?= =?utf-8?Q?Wbc2DMuFKBMSfzWDhRqlhhdNTIDC/Q7syKRsX?= X-OriginatorOrg: cherry.de X-MS-Exchange-CrossTenant-Network-Message-Id: 48fd9ef6-0d76-4b5e-7f2b-08dea45799bb X-MS-Exchange-CrossTenant-AuthSource: PA4PR04MB7743.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Apr 2026 12:22:08.3332 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5e0e1b52-21b5-4e7b-83bb-514ec460677e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: jBxHtm1M5WtTbuR4Tl48+2RJ+X15P2jfFPpghtG0ZfVWcfNc08V5EncCeltveQAeTMpHnZENztVCd7NN3FOcuxJOJp65KJMLDfcUVAfkyQM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR04MB9348 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.8 at phobos.denx.de X-Virus-Status: Clean Hi Marek, On 4/27/26 12:11 PM, Marek Vasut wrote: > On 4/27/26 11:13 AM, Quentin Schulz wrote: >> Hi Simon, Marek, >> >> On 4/22/26 4:31 AM, Simon Glass wrote: >>> When producing a DTB from fdtgrep, there is no way to reserve extra >>> space so that more nodes/properties can be added at runtime without >>> growing totalsize first. >>> >> >> Ok but why is that an issue? What is the actual usecase? What I'm >> afraid of is that you pad enough and you hit random bugs because you >> forget that adding enough properties can now hit the size limit and >> you forgot to add the logic to resize/grow the fdt when it's too small >> to fit new properties. > This is needed to prevent fdtgrep from inhibiting this and stripping the > pad bytes again: > > scripts/Makefile.dts:DTC_FLAGS += -p $(CONFIG_SYS_DTC_PAD_BYTES) > > That ^ is used by early U-Boot stages in place of 'fdt resize' , it > provides enough space to add basic modifications to the DT at those stages. It'd have been soooo nice to explain what CONFIG_SYS_DTC_PAD_BYTES is useful for. The default for arm64 is 4096 but it doesn't explain where it came from and if we can have more, or less and what's the impact on the system. But ok, the commit log should be updated to add this additional piece of information (and also in the same series have whatever's going to use this new option). Something like "This is the counterpart to DTC_FLAGS += -p $(CONFIG_SYS_DTC_PAD_BYTES) in scripts/Makefile.dts because xPL device trees are passed through fdtgrep which packs the DTB after stripping nodes and properties and therefore do not respect this for now. In the next commit(s), we'll make use of that new property such that xPL devices also respect that." Now I'm wondering if we want the same value for xPL DTB padding as some systems are heavily size-constrained (and next stages may not allow enough space for storing the new DTB with that much padding; TF-A on Rockchip for example was notorious for only allowing very small DTBs). Cheers, Quentin