Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2882592rdb; Mon, 4 Dec 2023 10:00:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IFZL4XTIpjUY/E/vTH72Q5k4z97BebcIvQlY6P6tVZ0+/VzqsOR7/pHNZH4Y8sMDPcUS2bo X-Received: by 2002:a05:6a20:4315:b0:18f:97c:6145 with SMTP id h21-20020a056a20431500b0018f097c6145mr5842259pzk.66.1701712832039; Mon, 04 Dec 2023 10:00:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701712832; cv=none; d=google.com; s=arc-20160816; b=0qLBwZLBGm/rhU2OOdeH4l6urz+KICbzc3xcsvUuZ/aLAdD520Dd/SZfBr5p4lmrFc GxzD2SLUfmaG2hcW1DKAWrGKB5FDtLBEvhyhkuX9qvjgkobp3a4RBJOi/PaDGOK7JTCw QX7d3++FX+qAOVEb5riKQ1DRZ+gz7qhAYznZKSor1vxgYmVLtQaoEA6kAd3spulBZiIb QRb394cb+kPz6vawyQYyKGyncRaO7q/2YctzmuFCb6UKhaJjD27nD+xOeDXyfaC2gdHF 6iG48IOHOb0hvdxCjfaANL+FoqUvQwQcJbLQHd+2PHiw60/j7IEcGFfDa+bb3BrqL55p /ROA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=8KOWg0c793AA36Q8QFZqHeT1AW9T8lmslgvjW44SEH4=; fh=yBgMHCSAJlvz+eFAOgkXRHnBofG+v5pPOv0GXMe8VEg=; b=v7fGQo6UWizF3MZMFc8tf9TZ1E195zd5CXd5waA6xyg5bKdIFkYcVVef4XzQGOYflp q38LgRgkzxmzqF0nd+ahEsIj1POftZSN1fPM9ENK5tRQxCs2D8eT58gBJ/kQbOoQEBT8 zx9bL6VatVelIM9GaW2jwQIsehGKaky24WpFvZZ5CpDNqhrQTtDVH7CRSrEPv8BOIWo0 onlGUWwBnrQrT/eFx3SnUYfpuXdqW6KYz/Q/GWGsSWBsquBW+GRGawYk2yQklE/nAHCy yqP3a1T9g0EsBPWsB96qJbCxG0sxDJ9wZc4WYBCt3Z2sTYN8O+SFxbJsi55y9Kox4o9g cj6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=CSgdC2ML; 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 be26-20020a056a001f1a00b00690f9e835d8si8324366pfb.132.2023.12.04.10.00.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 10:00:32 -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=CSgdC2ML; 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 C64B4807BEF5; Mon, 4 Dec 2023 10:00:14 -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 S231209AbjLDR7y (ORCPT + 99 others); Mon, 4 Dec 2023 12:59:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231206AbjLDR7w (ORCPT ); Mon, 4 Dec 2023 12:59:52 -0500 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB091130 for ; Mon, 4 Dec 2023 09:59:57 -0800 (PST) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-40c07ed92fdso18980295e9.3 for ; Mon, 04 Dec 2023 09:59:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1701712796; x=1702317596; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=8KOWg0c793AA36Q8QFZqHeT1AW9T8lmslgvjW44SEH4=; b=CSgdC2MLzKvq4gTj6SA7h7FTU5RYjRJ7TXb7gnlJd1xhBzShlycc5RncBv6dJis3Kr j5jZ1ZmyiEIFw3eLPl9zYW+PFVal6ClXEdM50Ipv8Lf9UEhX+KF9PvPdBeRToGEQYRD0 97LRIbM6X8zx2kf1U9V/HdRjOpT24XiOwvweA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701712796; x=1702317596; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8KOWg0c793AA36Q8QFZqHeT1AW9T8lmslgvjW44SEH4=; b=TdYNnXGYVX7NovMsXHjeKfvHekZrmMWk+eMGjQVsf1nwXpfi7Iquq1m35suGmGY25e cY4KG45OL6K6Wj59AqxwSmk0hMQQ70zLaCOxjR8y93zWkE/o+ujzJBm2QDHil8mPeZVp KTXKW3lCw9+R64rxfmqvw7TBEag6CWtmjShwqBXafr0wYsI7aqKxTJSHw7u0HkV5hKP3 xp8KVrs+sFVVxPnkPiyrFfGSCexbG4B51JxkacPNykt0SYM8o2S0VTAc/br7r8bG7xsy abypRrgP8cjlVSLwF5EjSDY2CzK+Z5i8zdd6Sxl0AIIv2oNMQf2rilwboeTuQwpIPP0b a0Lg== X-Gm-Message-State: AOJu0YzlNQ9JkSAicf6zf3hfyaoj3lNDpKOa2X/+ts05zlP2e9APDvil ARAc0eeqoCxF2P+WnATM3fc1c5iGnz0M03rtquGOrg== X-Received: by 2002:a7b:ce0f:0:b0:40c:8ad:1ae5 with SMTP id m15-20020a7bce0f000000b0040c08ad1ae5mr1453493wmc.106.1701712796064; Mon, 04 Dec 2023 09:59:56 -0800 (PST) MIME-Version: 1.0 References: <20231202035511.487946-1-sjg@chromium.org> <20231202035511.487946-3-sjg@chromium.org> <20231203153401.GV8402@pendragon.ideasonboard.com> In-Reply-To: <20231203153401.GV8402@pendragon.ideasonboard.com> From: Simon Glass Date: Mon, 4 Dec 2023 10:59:44 -0700 Message-ID: Subject: Re: [PATCH v9 2/2] arm64: boot: Support Flat Image Tree To: Laurent Pinchart 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 , Will Deacon , linux-doc@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, workflows@vger.kernel.org Content-Type: text/plain; charset="UTF-8" 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,SPF_HELO_NONE,SPF_PASS,T_PDS_OTHER_BAD_TLD, 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]); Mon, 04 Dec 2023 10:00:15 -0800 (PST) Hi Laurent, On Sun, 3 Dec 2023 at 08:33, 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. OK, sounds good! > > 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 > 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 ? The script as written is internal to the kernel, but I am sure it could be expanded in some ways. I am waiting to see it merged before worrying too much about what might happen in the future! [..] Regards, Simon