[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAFLszTjpuMb7UGgGYZ9ybg7_ZBP_8GJwq=eA8=qc=2fTHKWOUw@mail.gmail.com>
Date: Fri, 29 Mar 2024 15:46:45 +1300
From: Simon Glass <sjg@...omium.org>
To: Masahiro Yamada <masahiroy@...nel.org>
Cc: linux-arm-kernel@...ts.infradead.org,
Ahmad Fatoum <a.fatoum@...gutronix.de>, Nicolas Schier <nicolas@...sle.eu>,
Catalin Marinas <catalin.marinas@....com>, Jonathan Corbet <corbet@....net>,
Nathan Chancellor <nathan@...nel.org>, Nick Terrell <terrelln@...com>, Will Deacon <will@...nel.org>,
linux-doc@...r.kernel.org, linux-kbuild@...r.kernel.org,
linux-kernel@...r.kernel.org, workflows@...r.kernel.org
Subject: Re: [PATCH v11 2/2] arm64: boot: Support Flat Image Tree
Hi Masahiro,
On Wed, 27 Mar 2024 at 03:39, Masahiro Yamada <masahiroy@...nel.org> wrote:
>
> On Thu, Mar 14, 2024 at 1:28 PM Simon Glass <sjg@...omium.org> 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.
> >
> > The FIT can be examined using 'dumpimage -l'.
> >
> > This uses the 'dtbs-list' file but processes only .dtb files, ignoring
> > the overlay .dtbo files.
> >
> > 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. Use
> > FIT_COMPRESSION to select an algorithm other than gzip.
> >
> > 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@...omium.org>
> > ---
> >
> > Changes in v11:
> > - Use dtbslist file in image.fit rule
> > - Update cmd_fit rule as per Masahiro
> > - Don't mention ignoring files without a .dtb prefix
> > - Use argparse fromfile_prefix_chars feature
> > - Add a -v option and use it for output (with make V=1)
> > - rename srcdir to dtbs
> > - Use -o for the output file instead of -f
> >
>
>
>
>
> > --- a/scripts/Makefile.lib
> > +++ b/scripts/Makefile.lib
> > @@ -504,6 +504,21 @@ quiet_cmd_uimage = UIMAGE $@
> > -a $(UIMAGE_LOADADDR) -e $(UIMAGE_ENTRYADDR) \
> > -n '$(UIMAGE_NAME)' -d $< $@
> >
> > +# Flat Image Tree (FIT)
> > +# This allows for packaging of a kernel and all devicetrees files, using
> > +# compression.
> > +# ---------------------------------------------------------------------------
> > +
> > +MAKE_FIT := $(srctree)/scripts/make_fit.py
> > +
> > +# Use this to override the compression algorithm
> > +FIT_COMPRESSION ?= gzip
> > +
> > +quiet_cmd_fit = FIT $@
> > + cmd_fit = $(MAKE_FIT) -o $@ --arch $(UIMAGE_ARCH) --os linux \
> > + --name '$(UIMAGE_NAME)' $(if $(V),-v) \
> > + --compress $(FIT_COMPRESSION) -k $< @$(word 2,$^)
> > +
>
>
>
>
> A nit in your new code.
>
>
> $(if $(V),-v) does not work for KBUILD_VERBOSE env variable.
>
>
> It should be
>
> $(if $(findstring 1,$(KBUILD_VERBOSE)),-v)
OK, thank you. I was assuming that V=0 would not be passed, but this
is better. I will send v12.
Regards,
Simon
Powered by blists - more mailing lists