From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E8BAFC4167B for ; Thu, 7 Dec 2023 14:38:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=afsgy2QbiLZM/aARh8q16Uffrl+m9to69I7jUacFq0c=; b=qQl7rTXzBFATO5 3T3pHqHaxeJWsDQ0dW3nMhas0mfyp+Jypsfw+HqJ6z8tX+PmK5VnAA6mxFyJ1n85HCXXwU80/rZiR ERfv76Vx6a+9rEZBD9JCau878Un5lWrQoD6IZf91h02btcAUqFyDo2eNB75R4ZFe8+wB0KilMRZwj t1lET4KCXNgtr/JJbWjycbjhi7BziEJyz2IUXbdxPObsq+oVg7MqLiIwK1oGvQY4VLRbkvah84Z+u /KXBTQxfEyNZ9iJ0pD36zCjArNauWMUe/iTgjmG6HCekmgfygr81LwDqxfyRvQZ0suomSpd9zXDaA hlKhRBTHHRTe55KG5bJw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rBFW1-00D2i9-0V; Thu, 07 Dec 2023 14:38:13 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rBFVy-00D2hi-0l for linux-arm-kernel@lists.infradead.org; Thu, 07 Dec 2023 14:38:11 +0000 Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4CA62669; Thu, 7 Dec 2023 15:37:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1701959847; bh=zXe+jRGFsIALQDiNPjUbby+TY+TBluHe2uMVYoZajGE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hFvfub1kMNWT+sajOcN5s7Ix3DNF2A6Pkg5dQ9Y7g9Coz6OmKJnCPKj2yL9gUCwUK 8mnLCDDOxUytTLxkyTZeJGqrH5UF7H7W1qtp4hNUzgp15DJZLkbLfPcGsN6exWkTrZ O1MzrHNjifnFuxyRI9lkqoozUdRpBmc8Z61b/zJ0= Date: Thu, 7 Dec 2023 16:38:14 +0200 From: Laurent Pinchart To: Chen-Yu Tsai Cc: Simon Glass , 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 , Will Deacon , 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: <20231207143814.GD15521@pendragon.ideasonboard.com> References: <20231202035511.487946-1-sjg@chromium.org> <20231202035511.487946-3-sjg@chromium.org> <20231203153401.GV8402@pendragon.ideasonboard.com> <20231207142723.GA3187877@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231207142723.GA3187877@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231207_063810_413506_44835B4C X-CRM114-Status: GOOD ( 41.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Dec 07, 2023 at 10:27:23PM +0800, Chen-Yu Tsai wrote: > On Sun, Dec 03, 2023 at 05:34:01PM +0200, Laurent Pinchart wrote: > > Hi Simon, > > > > Thank you for the patch. > > > > 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. > > > > FIT images are very useful, so I think this is a very welcome addition > > to the kernel build system. It can get tricky though: given the > > versatile nature of FIT images, there can't be any > > one-size-fits-them-all solution to build them, and striking the right > > balance between what makes sense for the kernel and the features that > > users may request will probably lead to bikeshedding. As we all love > > bikeshedding, I thought I would start selfishly, with a personal use > > case :-) This isn't a yak-shaving request though, I don't see any reason > > to delay merging this series. > > > > Have you envisioned building FIT images with a subset of DTBs, or adding > > DTBOs ? Both would be fairly trivial extensions to this script by > > extending the supported command line arguments. It would perhaps be more > > difficult to integrate in the kernel build system though. This leads me > > to a second question: would you consider merging extensions to this > > script if they are not used by the kernel build system, but meant for > > users who manually invoke the script ? More generally, is the script > > We'd also be interested in some customization, though in a different way. > We imagine having a rule file that says X compatible string should map > to A base DTB, plus B and C DTBO for the configuration section. The base > DTB would carry all common elements of some device, while the DTBOs > carry all the possible second source components, like different display > panels or MIPI cameras for instance. This could drastically reduce the > size of FIT images in ChromeOS by deduplicating all the common stuff. Do you envision the "mapping" compatible string mapping to a config section in the FIT image, that would bundle the base DTB and the DTBOs ? > > meant to be used stand-alone as well, in which case its command line > > arguments need to remain backward-compatible, or do you see it as being > > internal to the kernel ? > > [...] > > ChenYu -- Regards, Laurent Pinchart _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel