Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1690957rdb; Thu, 7 Dec 2023 06:27:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IE1mm12VP+wM3lL10a13nhcwKu0WMVtR9fEJW5zJHU7nWJhuivK3/kQr3J9xfOktGwF1E9O X-Received: by 2002:a17:902:c946:b0:1d0:7d69:16e9 with SMTP id i6-20020a170902c94600b001d07d6916e9mr2132888pla.51.1701959259786; Thu, 07 Dec 2023 06:27:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701959259; cv=none; d=google.com; s=arc-20160816; b=np8t0PgQsHWmDY90P7n8fZWrVe49BcDPr03v8SKz+Q5dZuYhc3Tl3fXjldrZktghCI rvVEVfW7ovwfj1qZyQNRCnJihNjX309ZooHQDEpnw3/xu+SeQT+YCktkeICC3Tg3hnCm D7CcsB3jAN9ymgC7BbBYuvIHVgREkE3ahdPBiIVeFUEArXfyVFkDoukCtTtgkJK+V7FL CZebZirRvmoRgPVE+FHx7YKFBwK5ja2PGgD5cL+QImj27vKnik82366rc5PqU+cfMsWV Svku5zVt2M3PSiWuyCreYi0hIPFaUqvcpXxONOvZiKVkHHRQNIQXM8hQl6kj3Q8w1Kp2 EjAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=FnUqi8dAEgGMyEzBxdD28hEtaCGQO1gXXHV0T1kN7CU=; fh=XyWYVm281t1V34mT9HZ+XUj9r2b1YR9MjrD/B1Nmn7Y=; b=vS0GyEQXPPzb7z4uu1AT4U0ckuNWO/xK3bJ47BF5GKggfzPL1umKkgGG66ZAi9eHHI 4jo0IIwJy3y+4Q4Citr95kkq7sVAmVP2uyVS10Q8/Cf6O23F2DMDw3PKJlWuEg+bz1iW Qs6JNHOu33wJ4p074V0YPFSYa1mYE6uCdPwyFmsG1HY/Okh3byS3psBZs2qSxKVV+FXs Pxfix8KzfLLUWlqUh0zhMbrwHIGucNhbPdvRlUUHwZM+336jT8M0Fsb8DY2k/Z8+WcAE dNIFnVQFNV9wpjm7092qVpYXNZxtMTiIbPQbSbavGTDSZMZo7kEyCggrBgUxwUTS/ljC Q/HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="S/HaNrIl"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id w5-20020a170902d3c500b001cff62f4575si1240722plb.370.2023.12.07.06.27.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:27:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="S/HaNrIl"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 4D973804039D; Thu, 7 Dec 2023 06:27:37 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235251AbjLGO1X (ORCPT + 99 others); Thu, 7 Dec 2023 09:27:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232883AbjLGO1W (ORCPT ); Thu, 7 Dec 2023 09:27:22 -0500 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A0CAD53 for ; Thu, 7 Dec 2023 06:27:28 -0800 (PST) Received: by mail-pj1-x102a.google.com with SMTP id 98e67ed59e1d1-2868cf6cb82so816300a91.3 for ; Thu, 07 Dec 2023 06:27:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1701959248; x=1702564048; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=FnUqi8dAEgGMyEzBxdD28hEtaCGQO1gXXHV0T1kN7CU=; b=S/HaNrIlZ1DvlTNB0E5lv/B/jagUzSzYVkBFDPkoNIN1LiRa1I0xHQINUKVCg0TNSR SM8n1x6D6WJHzB+l3IkgyqBLYA5Jz9TniilXPvrPTiF/RF22DXM2XhS7PgktPvNbpLWh eQy/d/QFNFVcy+m/YZA/NdrB5w7zq9ehc4c6U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701959248; x=1702564048; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=FnUqi8dAEgGMyEzBxdD28hEtaCGQO1gXXHV0T1kN7CU=; b=bGqD6K0GmrLb5UWrTLDw2OlDTM1dqZobdcnc9xKN8ez4NcBIt5qAbmer0KWtl00Cia mqFYvZxLmE0IimWi2aJ5v9YYwUgsIwxySNa7sNCtB81oCprWqgawf2nx3236FFxTj99z dFMBDbQ7QJqr815pOjcDV48nN47m/iqWySTGsmbIruqNi3ojfQOtmFjpSOE+2OR+khKm c7O2KOnRbfSALDspI1xgnajQCBWgIMo4p4pleWBAPVxJ3uPxHoWkZHDLmy+FKd9d33fd B+Fohf0wI0Ups4bzoZ7v7JMWKfezigdE40kzeOII3pkCuyOfFzmBqfls6AVnP2FLmb/X jDHA== X-Gm-Message-State: AOJu0Yy5Cw4hK8C7EKV5DCkXAlcWz9BEwNc9tO5IYpKkahtzl6kqsqsD SditE2VfmxTLEDPjTNx3glpfXA== X-Received: by 2002:a17:90a:e009:b0:286:6cc0:b918 with SMTP id u9-20020a17090ae00900b002866cc0b918mr2087016pjy.79.1701959247711; Thu, 07 Dec 2023 06:27:27 -0800 (PST) Received: from google.com ([2401:fa00:1:10:e0f4:e383:e626:f567]) by smtp.gmail.com with ESMTPSA id d15-20020a170902654f00b001cfc2d024edsm1507200pln.29.2023.12.07.06.27.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:27:27 -0800 (PST) Date: Thu, 7 Dec 2023 22:27:23 +0800 From: Chen-Yu Tsai To: Laurent Pinchart 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: <20231207142723.GA3187877@google.com> References: <20231202035511.487946-1-sjg@chromium.org> <20231202035511.487946-3-sjg@chromium.org> <20231203153401.GV8402@pendragon.ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231203153401.GV8402@pendragon.ideasonboard.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Thu, 07 Dec 2023 06:27:37 -0800 (PST) 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. > 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