Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5269790rdb; Wed, 13 Dec 2023 04:14:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IH0HnJhVI62xnB3OhlWzc7kNRzDijWaqNxHh7H08yrRxaTCm8kWv3FyXBO/QeeMG8Qfnf+0 X-Received: by 2002:a05:6358:63a7:b0:170:7cd:4c5f with SMTP id k39-20020a05635863a700b0017007cd4c5fmr10426858rwh.10.1702469653816; Wed, 13 Dec 2023 04:14:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702469653; cv=none; d=google.com; s=arc-20160816; b=tkohj/MDGEaN5oB2HZdzt7RTuw8Q+hUwL4lcf+U4jMz0jjfjGhfJRLzkr2+mTOuM5O SE+ZmwNCB9bw3py+6JR82pbz7Nt8SsqB11AspJYiLUwZs8/RjJcMRvjQf9ylGXZR6is2 jwjKfVswBtOM92PpgR8vVCjmFKdngVrRTJ6ei7pscmjPrGHcnwUWI/ucC+QghO0wXumX QOEDLSMfPiCu4CnWE+b6sOg4yzmMwnIael9gDOlFVL2n0vVmRlZap6KYrQatgnAU/8MW M5NM2Qgw6uW3a+LYE3aWw6QZlnOLrNF+A40idY0Wtulmw1/pD8PKVtYbkeffTc3o7Be4 BanQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=nRmOXJ33F0qH5vkxK8ApyEK7CRbWdKb/piDMQY0kaDs=; fh=qnVOPKN1oF6NK4fD1mtm1c0uJqbzbqjpKceAiR/l2m8=; b=EExtqmW72BLatP6PPBwmLt4/XiK3+OLovIalY09SZF2vZwDfMKZVZOQqFVnsFHaQ8V qSlrLyTHGAprfrjLCGryBtIaFkP10OLRaypGHjhc2AZ3x147jpfWPJrz7pXhbCtQ2Mkw DwsBuFPzqf2Lg9qp7lP823S9Ss9O/Mzxsd6skkVVYt9bcKyUN0p2WdDmJyKNYrkYB6Yk iruG1NYIYiY/yKbG/aYz29ra8RwOmUJ5kkba+iIUCX4gKo/jEsqlEcPJzN/nB8Mg0qz5 LY/4ap6hrPPGtq/csylj4lFoej8ShHVTOAN9Ldbmo0LekogdQV9+JveLm3ah/S3LeYil N7Sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uvBXPCRo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id cp21-20020a056a00349500b006ce56664fd5si9354714pfb.157.2023.12.13.04.14.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 04:14:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uvBXPCRo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 3ADE58157DD8; Wed, 13 Dec 2023 04:14:11 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233316AbjLMMNz (ORCPT + 99 others); Wed, 13 Dec 2023 07:13:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233315AbjLMMNy (ORCPT ); Wed, 13 Dec 2023 07:13:54 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89EB7B0 for ; Wed, 13 Dec 2023 04:14:00 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D52CC433C8; Wed, 13 Dec 2023 12:13:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702469640; bh=2ypXgnL4ECCpmdKkPHhPyQw7+zd7cb6G6jntIn0W0sk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=uvBXPCRoFNVcz10CIj8UBIpbjMFwKXefOdwwu1fICqolJgD8TVfji1yCzxM8z7X3d e2plc4DaOL7/ZIN+zN9h4gIwy7aNXl6HdJ08DviZxC/rVmhappflf1g2rETpLsT/Eb qBrXqhuakwbA8sf+s8mVebkMLadD4KG+GYkGICZqdqcwldnS9K3D1ikMPeKplbxEqG XIpZatoZxQbCpN4D63NwqmhWvWoeabTSiE6ASlGnHG+DHAiYCoQO3y3xPg5Qwu0ytS IUIISRPA9t8EjdGuMgWirtz5z7Lbgvg+Qmcq+tRNg9Yqfxjr25XRrOiLQ5g7Q0woL4 Mh18eR3L9hVnw== Date: Wed, 13 Dec 2023 12:13:53 +0000 From: Will Deacon To: Simon Glass Cc: linux-arm-kernel@lists.infradead.org, Masahiro Yamada , Ahmad Fatoum , U-Boot Mailing List , Nicolas Schier , Tom Rini , Catalin Marinas , Jonathan Corbet , Nathan Chancellor , Nick Terrell , linux-doc@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, workflows@vger.kernel.org Subject: Re: [PATCH v9 2/2] arm64: boot: Support Flat Image Tree Message-ID: <20231213121353.GA31326@willie-the-truck> References: <20231202035511.487946-1-sjg@chromium.org> <20231202035511.487946-3-sjg@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231202035511.487946-3-sjg@chromium.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, PDS_OTHER_BAD_TLD,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 13 Dec 2023 04:14:11 -0800 (PST) On Fri, Dec 01, 2023 at 08:54:42PM -0700, Simon Glass wrote: > Add a script which produces a Flat Image Tree (FIT), a single file > containing the built kernel and associated devicetree files. > Compression defaults to gzip which gives a good balance of size and > performance. > > The files compress from about 86MB to 24MB using this approach. > > The FIT can be used by bootloaders which support it, such as U-Boot > and Linuxboot. It permits automatic selection of the correct > devicetree, matching the compatible string of the running board with > the closest compatible string in the FIT. There is no need for > filenames or other workarounds. > > Add a 'make image.fit' build target for arm64, as well. Use > FIT_COMPRESSION to select a different algorithm. > > The FIT can be examined using 'dumpimage -l'. > > This features requires pylibfdt (use 'pip install libfdt'). It also > requires compression utilities for the algorithm being used. Supported > compression options are the same as the Image.xxx files. For now there > is no way to change the compression other than by editing the rule for > $(obj)/image.fit > > While FIT supports a ramdisk / initrd, no attempt is made to support > this here, since it must be built separately from the Linux build. > > Signed-off-by: Simon Glass > --- > > Changes in v9: > - Move the compression control into Makefile.lib > > Changes in v8: > - Drop compatible string in FDT node > - Correct sorting of MAINTAINERS to before ARM64 PORT > - Turn compress part of the make_fit.py comment in to a sentence > - Add two blank lines before parse_args() and setup_fit() > - Use 'image.fit: dtbs' instead of BUILD_DTBS var > - Use '$( - Add 'mkimage' details Documentation/process/changes.rst > - Allow changing the compression used > - Tweak cover letter since there is only one clean-up patch > > Changes in v7: > - Add Image as a dependency of image.fit > - Drop kbuild tag > - Add dependency on dtbs > - Drop unnecessary path separator for dtbs > - Rebase to -next > > Changes in v5: > - Drop patch previously applied > - Correct compression rule which was broken in v4 > > Changes in v4: > - Use single quotes for UIMAGE_NAME > > Changes in v3: > - Drop temporary file image.itk > - Drop patch 'Use double quotes for image name' > - Drop double quotes in use of UIMAGE_NAME > - Drop unnecessary CONFIG_EFI_ZBOOT condition for help > - Avoid hard-coding "arm64" for the DT architecture > > Changes in v2: > - Drop patch previously applied > - Add .gitignore file > - Move fit rule to Makefile.lib using an intermediate file > - Drop dependency on CONFIG_EFI_ZBOOT > - Pick up .dtb files separately from the kernel > - Correct pylint too-many-args warning for write_kernel() > - Include the kernel image in the file count > - Add a pointer to the FIT spec and mention of its wide industry usage > - Mention the kernel version in the FIT description > > Documentation/process/changes.rst | 9 + > MAINTAINERS | 7 + > arch/arm64/Makefile | 7 +- > arch/arm64/boot/.gitignore | 1 + > arch/arm64/boot/Makefile | 6 +- > scripts/Makefile.lib | 16 ++ > scripts/make_fit.py | 291 ++++++++++++++++++++++++++++++ > 7 files changed, 334 insertions(+), 3 deletions(-) > create mode 100755 scripts/make_fit.py I'll need Masahiro's Ack on the scripts/ changes before I can take this one. Will