[{"id":3680882,"web_url":"http://patchwork.ozlabs.org/comment/3680882/","msgid":"<9a9194d8-65ee-4c84-a760-2a73378a7170@mailbox.org>","list_archive_url":null,"date":"2026-04-22T19:08:53","subject":"Re: [PATCH] fdtgrep: Add option to reserve free space in the output\n FDT","submitter":{"id":85664,"url":"http://patchwork.ozlabs.org/api/people/85664/","name":"Marek Vasut","email":"marek.vasut@mailbox.org"},"content":"On 4/22/26 4:31 AM, Simon Glass wrote:\n> When producing a DTB from fdtgrep, there is no way to reserve extra\n> space so that more nodes/properties can be added at runtime without\n> growing totalsize first.\n> \n> Add a -B/--pad option that appends a caller-specified number of free\n> bytes after the strings section and grows totalsize accordingly. The\n> padding is applied after fdt_pack(), so it is not reclaimed when -r is\n> used.\n> \n> Suggested-by: Marek Vasut <marek.vasut@mailbox.org>\n> Signed-off-by: Simon Glass <sjg@chromium.org>\n> ---\n> \n>   tools/binman/btool/fdtgrep.py |  3 ++-\n>   tools/fdtgrep.c               | 31 ++++++++++++++++++++++++++++++-\n>   2 files changed, 32 insertions(+), 2 deletions(-)\n> \n> diff --git a/tools/binman/btool/fdtgrep.py b/tools/binman/btool/fdtgrep.py\n> index 446b2f4144b..7b393241878 100644\n> --- a/tools/binman/btool/fdtgrep.py\n> +++ b/tools/binman/btool/fdtgrep.py\n> @@ -16,9 +16,10 @@ Output formats are:\n>   \tdtb - device tree blob (sets -Hmt automatically)\n>   \tbin - device tree fragment (may not be a valid .dtb)\n>   \n> -Options: -[haAc:b:C:defg:G:HIlLmn:N:o:O:p:P:rRsStTvhV]\n> +Options: -[haAB:c:b:C:defg:G:HIlLmn:N:o:O:p:P:rRsStTvhV]\n>     -a, --show-address                 Display address\n>     -A, --colour                       Show all nodes/tags, colour those that match\n> +  -B, --pad <arg>                    Append free space to the output FDT, for later growth\nShouldn't the parameter at least match the dtc -p parameter ? -p is not \ntaken yet.","headers":{"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;\n\tdkim=pass (2048-bit key;\n secure) header.d=mailbox.org header.i=@mailbox.org header.a=rsa-sha256\n header.s=mail20150812 header.b=kNSwvyoE;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=85.214.62.61; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)","phobos.denx.de;\n dmarc=pass (p=reject dis=none) header.from=mailbox.org","phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de","phobos.denx.de;\n\tdkim=pass (2048-bit key;\n secure) header.d=mailbox.org header.i=@mailbox.org header.b=\"kNSwvyoE\";\n\tdkim-atps=neutral","phobos.denx.de;\n dmarc=pass (p=reject dis=none) header.from=mailbox.org","phobos.denx.de;\n spf=pass smtp.mailfrom=marek.vasut@mailbox.org"],"Received":["from phobos.denx.de (phobos.denx.de [85.214.62.61])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g180F4rkgz1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 05:09:01 +1000 (AEST)","from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 89BB68437C;\n\tWed, 22 Apr 2026 21:08:59 +0200 (CEST)","by phobos.denx.de (Postfix, from userid 109)\n id 4D6428439E; Wed, 22 Apr 2026 21:08:58 +0200 (CEST)","from mout-p-201.mailbox.org (mout-p-201.mailbox.org [80.241.56.171])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 5EC7E84227\n for <u-boot@lists.denx.de>; Wed, 22 Apr 2026 21:08:56 +0200 (CEST)","from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4g18070hbsz9tr3;\n Wed, 22 Apr 2026 21:08:55 +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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,\n RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham\n autolearn_force=no version=3.4.2","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org;\n s=mail20150812; t=1776884935;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=HL1Vny/TOnkZcGcD+gCt0heChcL+ZWP0yqQpU5CPl9E=;\n b=kNSwvyoEU2LRPSrae2L+4SoRLQSsKDbKik/892jZArQRZp4ej3KwXLLvXq9/c12shNsHZq\n XZEX/4Pm4R0tTWrRGdAMKWLf3SiukM70rzO0JQ5+xyPVgAah2qJRID+dLnnOxYbyt6stpu\n Iis6ny+T70JgOhYSBuI13YFBzxIyHFFKhxOwb2qyveNp2gBCdmfv83evTO1s+HgRoNAiZE\n WA4Qm8v3kwx2EJohJJ4//ewJBLImTYQA8l9PA5Y4pstjNsQ0fVAEsw5riZpP67dvyy3R1N\n eFpMTDLazwnzCEG5n3UcF5p9Blt3LmLjfqC83uWV4FJzcSR0u1Otq9q0Kp1K0A==","Message-ID":"<9a9194d8-65ee-4c84-a760-2a73378a7170@mailbox.org>","Date":"Wed, 22 Apr 2026 21:08:53 +0200","MIME-Version":"1.0","Subject":"Re: [PATCH] fdtgrep: Add option to reserve free space in the output\n FDT","To":"Simon Glass <sjg@chromium.org>, u-boot@lists.denx.de","Cc":"Alper Nebi Yasak <alpernebiyasak@gmail.com>,\n Ilias Apalodimas <ilias.apalodimas@linaro.org>, Tom Rini <trini@konsulko.com>","References":"<20260422023131.2813748-1-sjg@chromium.org>","Content-Language":"en-US","From":"Marek Vasut <marek.vasut@mailbox.org>","In-Reply-To":"<20260422023131.2813748-1-sjg@chromium.org>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","X-MBO-RS-ID":"59319d20753677950d1","X-MBO-RS-META":"ad44kocp3bi4u49t4ctuarrebdz3ug47","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>,\n <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>,\n <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.8 at phobos.denx.de","X-Virus-Status":"Clean"}}]