Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1953166rdb; Thu, 7 Dec 2023 13:36:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IE0byfNURunJc/WMLa7fSZ+g7BcLulqZ7VFojfuN3etBlDM+8oA89VuC4Mc9Um4a8nuthA5 X-Received: by 2002:a05:6a00:1894:b0:6cb:4361:773c with SMTP id x20-20020a056a00189400b006cb4361773cmr4342352pfh.5.1701984997139; Thu, 07 Dec 2023 13:36:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701984997; cv=none; d=google.com; s=arc-20160816; b=xdpaFrOVUvI3+8RiLjCu4QxQeBhqt379SU3LrnPMmUzZI+GrnxIJMyeSf3USTuFlkY FCjnvFK5iDT1ksmDPfE/8kJmK+cbkzljpNaFSMO0lDdGYYKZeWzn5+WaAuxJpdoBlwxA XUFLMr6SpA7ef59D/Y0+jQWotMNRderZx0bdFU981+Zp2UfupOMKSjpmRs1lQZgPlf/l 0BUkBBZeIhnbA2tRiECBNvalgsqRFoiDECk6+EmtUfxdSGqt5Bi3uuUHze439iff3eF9 wK/oN/8uxIf9C9sOrNQIUrLSyoYXv1x7OW8iV7KJcKZxcwx0Oa/Oa/8wCKEVex2yU3o7 zSVA== 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=jgcsqr4BdDoGgACBrnujheEbql9amAnQ8KQC9gtNZbI=; fh=g/1xhJa+NlZDC7StztHvpFvaV6E8QNTi2tJ+Rx08CPE=; b=iNCs6N7mevM55aK+e4LeybwDIf2JE3/0+htGXbnh9QyC4fNpCLOvJC/xYQ7bCbc5Vg 23bUgsOFYahty0GPWMCHqyA+eJQjrkX7B93HnzI4MTHAKraxVK39MW4ZhJndkrLE2TgX 9tL+dJUNIO4IxFHhgl1+zlTH0ghpnuExUwZjsKDnMMgnFi3vmOGj5kOacFWVA0Kqt0uK yzmzLiqK7AsmhJzOf3eNRCSr1gXmLPsKXKSMTpf4BRVS8OABHiitmG/9bKNKdRVk4mYC P1w6O+3jWwLcdp6nhPDX1bvrFAWSVdPeNwyE29EZzXGxWV0y07gPrpeDNIELJl/Oz/PX 39Pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b="qjHo/ZRz"; 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 Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id c12-20020a056a000acc00b006ce66363ce0si328524pfl.285.2023.12.07.13.36.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 13:36:37 -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 (test mode) header.i=@ideasonboard.com header.s=mail header.b="qjHo/ZRz"; 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 Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 645D9801CEAF; Thu, 7 Dec 2023 13:36:34 -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 S233115AbjLGVgS (ORCPT + 99 others); Thu, 7 Dec 2023 16:36:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235835AbjLGVfk (ORCPT ); Thu, 7 Dec 2023 16:35:40 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B39F16EB3; Thu, 7 Dec 2023 13:30:49 -0800 (PST) Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id DD5862B09; Thu, 7 Dec 2023 22:30:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1701984605; bh=++YvcrFz66sxa8xgV41El02Yomhcy3SFgFNd1nuRnT4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qjHo/ZRz7cMTAzyVsUjZpcWDuOQmvhscaXDaYQ1RRBxxdyqH8SRbU5uNzfrbQMi68 6U2jlkEY6KjCvzx5NSH+v9u2KvUGSz2YDo8ysALpNEtSSHkFqEFJW1ZpberVVdlgFl ceq0o2I/6kI1tIn+iHWmMCoAXdpRoWFSsl8IoTGw= Date: Thu, 7 Dec 2023 23:30:52 +0200 From: Laurent Pinchart To: Simon Glass Cc: Chen-Yu Tsai , 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: <20231207213052.GD25616@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> <20231207143814.GD15521@pendragon.ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=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 13:36:34 -0800 (PST) On Thu, Dec 07, 2023 at 01:52:53PM -0700, Simon Glass wrote: > On Thu, 7 Dec 2023 at 07:38, Laurent Pinchart wrote: > > 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 ? > > It is great to see all this discussion! I did send a proposal to the > U-Boot ML about extensions but it was mixed up with other things, so > I'll start a new thread. > > For now, I am really just waiting for this to be applied, before > talking too much about future possibilities. Sure, I don't see any reason to delay this series until you have fixed everybody's system images problems :-) -- Regards, Laurent Pinchart