Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp341756rdd; Tue, 9 Jan 2024 06:03:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IHvH+DRus67IazFh7iZVP9oRPGUnPg+zFE80VIlkukLkX5bqlfHOIKp+dU+bpUIRM8xOpQf X-Received: by 2002:a17:907:7f0b:b0:a26:e35b:9e1e with SMTP id qf11-20020a1709077f0b00b00a26e35b9e1emr639385ejc.109.1704809003649; Tue, 09 Jan 2024 06:03:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704809003; cv=none; d=google.com; s=arc-20160816; b=XVRlSOcGvKFfk5yao2od1bBSwjNBDJbY67FJ2y7s081aOwd8xsAJdTwswwbbuOG1F6 baVbUIDwAUuoqqMfuo4OKiaz6UVR4VT+c3tqXRdDVIGhDBvpxG8Nwn6bM48pkaUqgSLp CouMVURdqfo0Lo6tVYZ5z61hczvhN5EVbNwy3TiYPwyY2kMaC6dJ6COV60GJIdZ1WPFY 4S0uaQveBbe0rDwDdvsUxhXPHDA4eVk8mqpDDi8wRNscmNoPQ6FkJuON29+SS/CbGuGS 3EQgyNN81E4uWs1M5U4pNwuYpU5jmz+YZwkBtpBwIe9XlWYEVT5yTEoyYsH9mF5TCnAw 7F4g== 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=jYws6D1W9wGeY8KJULWH++1akKRVcvmkGKSDdzugOGg=; fh=vzVQgRKmgmifEDt5htGcLtiPkdMIHXZecFWeZFcf9x8=; b=WN27d3NDR+jfvZGpAxdBohB8TBZlzKtomEXdi09Ie9NrQ8K1hfDc9Vk9/XTEePr3ig 0/4ZSsOkkrRn4aZGSAQwgsgJ2hREY8a8NDSfbrXnNGu+JlAJh+DczJa7ETVdeG5ak/aH vgyVKsPhS4lO4iWUJ/HyFyVteFrWOoGxOdwi/rYJrNl9bSpIB3SiUo8wj6kBBcfBEjuJ 9F5wvd0gExS/YSsIAQKbbLl6VzmQHSDVpOC0BRReMnZDkKv37dGpu+eCI9M/tAGx9JZ2 WD3gSiyqbaTh2Rcl4jzqy4nvQBd2E9bfMxj8Job4rd8BgyEcgv8UmGF1voIqFJ6SG6d+ j/YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QSiKu9sm; spf=pass (google.com: domain of linux-kernel+bounces-20940-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20940-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 v9-20020a170906564900b00a28fe1894bfsi817456ejr.150.2024.01.09.06.03.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 06:03:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-20940-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=@kernel.org header.s=k20201202 header.b=QSiKu9sm; spf=pass (google.com: domain of linux-kernel+bounces-20940-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20940-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 2EF081F221ED for ; Tue, 9 Jan 2024 14:03:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9D2BB39AC9; Tue, 9 Jan 2024 14:02:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QSiKu9sm" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B27E739851; Tue, 9 Jan 2024 14:02:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 11CA0C43390; Tue, 9 Jan 2024 14:02:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704808939; bh=ySGWGM6KAkW2Wvf68TJ4tX2XgT/a98DZvuxdIxEnpFg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=QSiKu9smlPJRTZ5t2XfwSf201qynpyqIXrjx2VivuJqP+AxM9kA3+HMzIAv6H0Q7S kkSsSg4uq+IzBGkq1BkauN/kmxjau2SUxLmvu91qLuxLpD9AY2NLpAbxSVuDtGtozt DlxXZ92Qt/+2uafPOuXWTEYN95m3Bd6uRwCdBE206GrgqNHUuG5ex74X/tQlavj6nG m1qGsGL0SVmX5Z+adZKVfi16ZfqA2hn847LFRPnU3GW5pNSe+7/+BOxbwv5QWrJvwJ V4+LU3C2eKnRE9fZhQ1HV7SHD7Pf+pJFrEe9XOk04NocNe9bEaxXDvhTHw2FJTtzPs z6PeZsLKUdp/A== Received: by mail-oa1-f47.google.com with SMTP id 586e51a60fabf-204dfd7a89aso1387101fac.1; Tue, 09 Jan 2024 06:02:19 -0800 (PST) X-Gm-Message-State: AOJu0YzFqwlDRlComlDnvKZSiBcBrLNJdW5EunJ6qGnyFtkKJHiEan7X iDmRUxmD51Bx/GOPHXDJWJkOYsXn5VJecRxJnHQ= X-Received: by 2002:a05:6870:170e:b0:203:bb46:fb67 with SMTP id h14-20020a056870170e00b00203bb46fb67mr305930oae.43.1704808938423; Tue, 09 Jan 2024 06:02:18 -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: From: Masahiro Yamada Date: Tue, 9 Jan 2024 23:01:42 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v9 2/2] arm64: boot: Support Flat Image Tree To: Simon Glass Cc: Will Deacon , linux-arm-kernel@lists.infradead.org, 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 Simon, On Wed, Jan 3, 2024 at 8:47=E2=80=AFAM Simon Glass wrote= : > > Hi Masahiro, > > On Wed, Dec 13, 2023 at 5:14=E2=80=AFAM Will Deacon wro= te: > > > > 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. Supporte= d > > > compression options are the same as the Image.xxx files. For now ther= e > > > is no way to change the compression other than by editing the rule fo= r > > > $(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 usag= e > > > - 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 > As I mentioned before, I am concerned with having the same "compatible" entries, with different contents, as you use the "compatible" string as an ID to selecting the target config node, right? $ fdtdump arch/arm64/boot/image.fit ... conf-10 { compatible =3D "tq,am642-tqma6442l-mbax4xxl", "tq,am642-tqma6442l", "ti,am642"; description =3D "TQ-Systems TQMa64xxL SoM on MBax4xxL carrier b= oard"; fdt =3D "fdt-10"; kernel =3D "kernel"; }; ... conf-25 { compatible =3D "tq,am642-tqma6442l-mbax4xxl", "tq,am642-tqma6442l", "ti,am642"; description =3D "TQ-Systems TQMa64xxL SoM on MBax4xxL carrier b= oard"; fdt =3D "fdt-25"; kernel =3D "kernel"; }; --=20 Best Regards Masahiro Yamada