Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6836374rdb; Tue, 2 Jan 2024 15:47:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IHAACziawS1fQPWOYdw4mtVv8GTEf+Yrjf3hRj8haBgn/NgDD++yn0AslUHJrNEFBh+XSzY X-Received: by 2002:a17:906:6a25:b0:a27:6270:822f with SMTP id qw37-20020a1709066a2500b00a276270822fmr2227552ejc.291.1704239231006; Tue, 02 Jan 2024 15:47:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704239230; cv=none; d=google.com; s=arc-20160816; b=qeCIa/n1S18l2RhtlgIz2Ka0Dp+9vRzIZOqZzYae9CD/v9ADY1aL444w93Ubnr7Lf5 xQtQ8InOmOaSOd5olP0xEw1+Teox3loNmZ/Ibr33yTzD4tWUxdQ8p0LAh4XSij37jYqH wMuOWS4qt3TZnYGxGuXu0w1ZO+QOc+L+Kt8DnzrewgScyexf08GtkG7WjllBTq9Z09i3 t3h1lXP/1rLF1PvO0JppJVR9zlGgEj2q427UsvAvyRbGKlKY6nOlEKiwwisrgmPHddbc sgl9S8DWR8mbzSyZPJg2mBkDv/kfmZ267GoggGhXdMRbHU9+wyiOOZwUnvry9YZb7tza 0gkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=IcnI3bjOE/JR4QqtkUBLMh58U0r2t5wK4lAWbaHcRMU=; fh=8WpFJvSYWWUB0g9jKaBlTb8T2UH0WAcXagjulrfReGw=; b=Io7ckNbjWyqW8udnu3Ff/RyHSBYTVjT5t5oFra2TwuvX2zIZQvinb6sqcrXEXBZu+K TYCOlT5o4JXDb2eC876N3qLOi3wmcHITy1iCfB9tp5OJXPa2q9O6AfDcMSQAZifPf6om ozZwg1r+if1iTqh2LCVyIfuE+lJ7mRa61jAGx9NPqxKr4cq10Xx/lr+8tzWIqxZz160z Ljp6ZTcOpXSj1bN/kOOYKcAysXkR26V6AiAuReg6fpARw/0gVeo7t7/TI2zaOXa7RM+x rA8y1km/Yng+AZ/UEO3s3laZcbw3D9Sppl9vstiAB6X5RrascZHSt5s6lqDV6nhNo3qX DxTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Iwsov2jl; spf=pass (google.com: domain of linux-kernel+bounces-14983-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14983-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id ot15-20020a170906cccf00b00a2361a30b82si10441005ejb.875.2024.01.02.15.47.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 15:47:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-14983-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Iwsov2jl; spf=pass (google.com: domain of linux-kernel+bounces-14983-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14983-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 95F1E1F234FF for ; Tue, 2 Jan 2024 23:47:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A5E3E17992; Tue, 2 Jan 2024 23:47:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Iwsov2jl" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-qv1-f48.google.com (mail-qv1-f48.google.com [209.85.219.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A6F217980 for ; Tue, 2 Jan 2024 23:46:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-qv1-f48.google.com with SMTP id 6a1803df08f44-680adbf077dso19515796d6.1 for ; Tue, 02 Jan 2024 15:46:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1704239218; x=1704844018; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=IcnI3bjOE/JR4QqtkUBLMh58U0r2t5wK4lAWbaHcRMU=; b=Iwsov2jlHyi/b1Y2+3XLvr4rpFe9FCiBcOlXCybwQPcoigv3odwRKmk5KXGJRk8yhl 9YETAq3DJWwuIBktD6ZwqjIHWRAfUYr+94j+eNYTFsG2POWrcLpvUVbFM2JtaiKjhTc4 2007jM8wBDBX+Yd/RH1Rrs7vcEyv8bNHpl6V0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704239218; x=1704844018; h=content-transfer-encoding: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=IcnI3bjOE/JR4QqtkUBLMh58U0r2t5wK4lAWbaHcRMU=; b=l1tvl2rhBttOQm01lzJW86Az8v4QHflNkIOOh7Pv7YiMXQEOyTerJjvavS+sYiJnNt jE0c38Zfrr1GxnoNifnqyHRz57QVo170dc3zgaPKkMGpeR6yqgsQUT4siijAGSAIqZz7 fRN3eeesP3xpSpp18ujCsnAUawlFcDeCjdqviFRi5afzt/zmvIqIiROUCAve4ErfkEtc 49dMgJO7nnYtS0SzmzsjkEAMnn5yS7Uh7RKMb2DGLCEwEuLYxd2FnseXUFewlwDBVc4S HWOkTQY3vw5dzivrMtWccvN0aP4paZS60hckqXwKfypakvQfvok6L8TaGFyI+rur1W5x PnYQ== X-Gm-Message-State: AOJu0YzSjsrY9ugFoi8Akhz7tinvnSk7eqqOekqPB6oiTWxGXFJZdGsc f5NtEBaFESVnezoSJaNx+r20wpgghdwYlsef9TJRL1Slvu3l X-Received: by 2002:a05:6214:e8f:b0:67f:6348:ef8e with SMTP id hf15-20020a0562140e8f00b0067f6348ef8emr30015254qvb.17.1704239218454; Tue, 02 Jan 2024 15:46:58 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231202035511.487946-1-sjg@chromium.org> <20231202035511.487946-3-sjg@chromium.org> <20231213121353.GA31326@willie-the-truck> In-Reply-To: <20231213121353.GA31326@willie-the-truck> From: Simon Glass Date: Tue, 2 Jan 2024 16:46:47 -0700 Message-ID: Subject: Re: [PATCH v9 2/2] arm64: boot: Support Flat Image Tree To: Will Deacon 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Masahiro, On Wed, Dec 13, 2023 at 5:14=E2=80=AFAM Will Deacon wrote= : > > 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. Any thoughts on this request, please? Regards, Simon