From: Tom Rini <trini@konsulko.com>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: Simon Glass <sjg@chromium.org>, Will Deacon <will@kernel.org>,
linux-arm-kernel@lists.infradead.org,
Ahmad Fatoum <a.fatoum@pengutronix.de>,
U-Boot Mailing List <u-boot@lists.denx.de>,
Nicolas Schier <nicolas@fjasle.eu>,
Catalin Marinas <catalin.marinas@arm.com>,
Jonathan Corbet <corbet@lwn.net>,
Nathan Chancellor <nathan@kernel.org>,
Nick Terrell <terrelln@fb.com>,
linux-doc@vger.kernel.org, linux-kbuild@vger.kernel.org,
linux-kernel@vger.kernel.org, workflows@vger.kernel.org,
Rob Herring <robh@kernel.org>
Subject: Re: [PATCH v9 2/2] arm64: boot: Support Flat Image Tree
Date: Tue, 9 Jan 2024 09:33:49 -0500 [thread overview]
Message-ID: <20240109143349.GR1610741@bill-the-cat> (raw)
In-Reply-To: <CAK7LNAQRCDC03e=TVO=k4FuD2a2RdTy7yLr3UptQjVCX7pM1CA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 5839 bytes --]
On Tue, Jan 09, 2024 at 11:01:42PM +0900, Masahiro Yamada wrote:
> Hi Simon,
>
>
> On Wed, Jan 3, 2024 at 8:47 AM Simon Glass <sjg@chromium.org> wrote:
> >
> > Hi Masahiro,
> >
> > On Wed, Dec 13, 2023 at 5:14 AM Will Deacon <will@kernel.org> 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 <sjg@chromium.org>
> > > > ---
> > > >
> > > > 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 '$(<D)/dts' instead of '$(dir $<)dts'
> > > > - 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
> >
>
>
>
> 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 = "tq,am642-tqma6442l-mbax4xxl",
> "tq,am642-tqma6442l", "ti,am642";
> description = "TQ-Systems TQMa64xxL SoM on MBax4xxL carrier board";
> fdt = "fdt-10";
> kernel = "kernel";
> };
>
> ...
>
> conf-25 {
> compatible = "tq,am642-tqma6442l-mbax4xxl",
> "tq,am642-tqma6442l", "ti,am642";
> description = "TQ-Systems TQMa64xxL SoM on MBax4xxL carrier board";
> fdt = "fdt-25";
> kernel = "kernel";
> };
I had asked Rob a while ago about if having the same compatible for two
functionally different machines is a feature, or a bug, and I don't
think either of us fully agreed either way. I'd be leaning towards
saying the above example is a bug in the dts files, it's just not been a
bug people have worried about before due to (sadly) how little the
top-level compatible has been used.
--
Tom
>
>
>
>
>
>
>
>
>
>
>
>
> --
> Best Regards
> Masahiro Yamada
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2024-01-09 14:33 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-02 3:54 [PATCH v9 0/2] arm64: Add a build target for Flat Image Tree Simon Glass
2023-12-02 3:54 ` [PATCH v9 2/2] arm64: boot: Support " Simon Glass
2023-12-03 15:34 ` Laurent Pinchart
2023-12-04 17:59 ` Simon Glass
2023-12-07 14:27 ` Chen-Yu Tsai
2023-12-07 14:38 ` Laurent Pinchart
2023-12-07 20:52 ` Simon Glass
2023-12-07 21:30 ` Laurent Pinchart
2023-12-09 13:13 ` Chen-Yu Tsai
2023-12-09 15:29 ` Laurent Pinchart
2023-12-09 16:31 ` Geert Uytterhoeven
2023-12-14 4:02 ` Chen-Yu Tsai
2023-12-14 6:12 ` Masahiro Yamada
2023-12-14 7:33 ` Masahiro Yamada
2023-12-29 6:38 ` Simon Glass
2024-01-02 3:19 ` Chen-Yu Tsai
2024-01-09 13:47 ` Masahiro Yamada
2024-01-10 3:47 ` Chen-Yu Tsai
2024-01-02 15:53 ` Ahmad Fatoum
2024-01-09 14:33 ` Rasmus Villemoes
2023-12-14 7:57 ` Geert Uytterhoeven
2023-12-14 12:48 ` Tom Rini
2023-12-05 11:48 ` Ahmad Fatoum
2023-12-06 3:54 ` Simon Glass
2023-12-08 11:49 ` Nicolas Schier
2023-12-13 12:13 ` Will Deacon
2024-01-02 23:46 ` Simon Glass
2024-01-09 14:01 ` Masahiro Yamada
2024-01-09 14:33 ` Tom Rini [this message]
2024-01-17 13:14 ` Simon Glass
2024-01-25 16:03 ` Simon Glass
2024-01-30 9:16 ` Masahiro Yamada
2024-01-31 22:02 ` Rob Herring
2024-02-01 2:08 ` Masahiro Yamada
2024-02-01 21:03 ` Rob Herring
2024-02-02 5:37 ` Masahiro Yamada
2024-02-02 16:00 ` Simon Glass
2024-02-02 16:00 ` Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240109143349.GR1610741@bill-the-cat \
--to=trini@konsulko.com \
--cc=a.fatoum@pengutronix.de \
--cc=catalin.marinas@arm.com \
--cc=corbet@lwn.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=nathan@kernel.org \
--cc=nicolas@fjasle.eu \
--cc=robh@kernel.org \
--cc=sjg@chromium.org \
--cc=terrelln@fb.com \
--cc=u-boot@lists.denx.de \
--cc=will@kernel.org \
--cc=workflows@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).