* [PATCH 0/2] scripts/make_fit fix and disabled compression for DTBs
@ 2024-05-21 6:51 Chen-Yu Tsai
2024-05-21 6:51 ` [PATCH 1/2] scripts/make_fit: Drop fdt image entry compatible string Chen-Yu Tsai
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Chen-Yu Tsai @ 2024-05-21 6:51 UTC (permalink / raw)
To: Simon Glass, Masahiro Yamada, Nathan Chancellor, Nicolas Schier
Cc: Chen-Yu Tsai, linux-arm-kernel, linux-kernel, linux-kbuild
Hi folks,
Here are a couple changes for the FIT image packing script. While
unreleated, they are sent together because the change context overlaps.
The first patch drops the compatible string property from the fdt image
nodes. According to the FIT image spec, the compatible string in the
(fdt/kernel) image node is used to specify special loading mechanisms,
and is _not_ for identifying the DTB.
The second patch adds an option that disables compression for _just_ the
included DTBs. This is needed for RK3399 and MT8173 based Chromebooks,
whose firmware does not support decompressing DTBs, but does need kernel
image compression to fit the image within their relatively small image
size of 32 MiB.
Please take a look.
Thanks
ChenYu
Chen-Yu Tsai (2):
scripts/make_fit: Drop fdt image entry compatible string
scripts/make_fit: Add option to disable compression for DTBs
scripts/Makefile.lib | 1 +
scripts/make_fit.py | 14 +++++++++++---
2 files changed, 12 insertions(+), 3 deletions(-)
--
2.45.0.215.g3402c0e53f-goog
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/2] scripts/make_fit: Drop fdt image entry compatible string
2024-05-21 6:51 [PATCH 0/2] scripts/make_fit fix and disabled compression for DTBs Chen-Yu Tsai
@ 2024-05-21 6:51 ` Chen-Yu Tsai
2024-05-23 17:19 ` Simon Glass
2024-05-21 6:51 ` [PATCH 2/2] scripts/make_fit: Add option to disable compression for DTBs Chen-Yu Tsai
2024-05-22 13:08 ` [PATCH 0/2] scripts/make_fit fix and disabled " Masahiro Yamada
2 siblings, 1 reply; 11+ messages in thread
From: Chen-Yu Tsai @ 2024-05-21 6:51 UTC (permalink / raw)
To: Simon Glass, Masahiro Yamada, Nathan Chancellor, Nicolas Schier
Cc: Chen-Yu Tsai, linux-arm-kernel, linux-kernel, linux-kbuild
According to the FIT image spec, the compatible string in the fdt image
node or any image node specifies the method to load the image, not the
compatible string embedded in the FDT or used for matching.
Drop the compatible string from the fdt image entry node.
While at it also fix up a typo in the document section of output_dtb.
Fixes: 7a23b027ec17 ("arm64: boot: Support Flat Image Tree")
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
---
scripts/make_fit.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/scripts/make_fit.py b/scripts/make_fit.py
index 3de90c5a094b..263147df80a4 100755
--- a/scripts/make_fit.py
+++ b/scripts/make_fit.py
@@ -190,7 +190,7 @@ def output_dtb(fsw, seq, fname, arch, compress):
Args:
fsw (libfdt.FdtSw): Object to use for writing
seq (int): Sequence number (1 for first)
- fmame (str): Filename containing the DTB
+ fname (str): Filename containing the DTB
arch: FIT architecture, e.g. 'arm64'
compress (str): Compressed algorithm, e.g. 'gzip'
@@ -211,7 +211,6 @@ def output_dtb(fsw, seq, fname, arch, compress):
fsw.property_string('type', 'flat_dt')
fsw.property_string('arch', arch)
fsw.property_string('compression', compress)
- fsw.property('compatible', bytes(compat))
with open(fname, 'rb') as inf:
compressed = compress_data(inf, compress)
--
2.45.0.215.g3402c0e53f-goog
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/2] scripts/make_fit: Add option to disable compression for DTBs
2024-05-21 6:51 [PATCH 0/2] scripts/make_fit fix and disabled compression for DTBs Chen-Yu Tsai
2024-05-21 6:51 ` [PATCH 1/2] scripts/make_fit: Drop fdt image entry compatible string Chen-Yu Tsai
@ 2024-05-21 6:51 ` Chen-Yu Tsai
2024-05-22 13:08 ` [PATCH 0/2] scripts/make_fit fix and disabled " Masahiro Yamada
2 siblings, 0 replies; 11+ messages in thread
From: Chen-Yu Tsai @ 2024-05-21 6:51 UTC (permalink / raw)
To: Simon Glass, Masahiro Yamada, Nathan Chancellor, Nicolas Schier
Cc: Chen-Yu Tsai, linux-arm-kernel, linux-kernel, linux-kbuild
Old bootloaders found on RK3399 and MT8173 based Chromebooks only
support compression for the kernel image in the FIT image, and not the
DTBs. While compression could be disabled, aforementioned bootloaders
also limit the kernel image size to 32 MiB, making compression necessary
for any practical setup.
Add an option to disable DTB compression to support this case.
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
---
scripts/Makefile.lib | 1 +
scripts/make_fit.py | 11 ++++++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 9f06f6aaf7fc..84d9b0166cc0 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -522,6 +522,7 @@ quiet_cmd_fit = FIT $@
cmd_fit = $(MAKE_FIT) -o $@ --arch $(UIMAGE_ARCH) --os linux \
--name '$(UIMAGE_NAME)' \
$(if $(findstring 1,$(KBUILD_VERBOSE)),-v) \
+ $(if $(FIT_DISABLE_DTB_COMPRESSION),--no-dtb-compression) \
--compress $(FIT_COMPRESSION) -k $< @$(word 2,$^)
# XZ
diff --git a/scripts/make_fit.py b/scripts/make_fit.py
index 263147df80a4..626cf3422079 100755
--- a/scripts/make_fit.py
+++ b/scripts/make_fit.py
@@ -22,6 +22,10 @@ the entire FIT.
Use -c to compress the data, using bzip2, gzip, lz4, lzma, lzo and
zstd algorithms.
+Use -C to disable compression for DTBs regardless of the setting of '-c'.
+This is intended for old bootloaders that support compression of the
+kernel image but not the devicetree blobs.
+
The resulting FIT can be booted by bootloaders which support FIT, such
as U-Boot, Linuxboot, Tianocore, etc.
@@ -64,6 +68,8 @@ def parse_args():
help='Specifies the architecture')
parser.add_argument('-c', '--compress', type=str, default='none',
help='Specifies the compression')
+ parser.add_argument('-C', '--no-dtb-compression', action='store_true',
+ help='Disables compression for included DTBs')
parser.add_argument('-E', '--external', action='store_true',
help='Convert the FIT to use external data')
parser.add_argument('-n', '--name', type=str, required=True,
@@ -247,7 +253,10 @@ def build_fit(args):
if os.path.splitext(fname)[1] == '.dtb':
seq += 1
size += os.path.getsize(fname)
- model, compat = output_dtb(fsw, seq, fname, args.arch, args.compress)
+ compress = args.compress
+ if args.no_dtb_compression:
+ compress = 'none'
+ model, compat = output_dtb(fsw, seq, fname, args.arch, compress)
entries.append([model, compat])
finish_fit(fsw, entries)
--
2.45.0.215.g3402c0e53f-goog
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 0/2] scripts/make_fit fix and disabled compression for DTBs
2024-05-21 6:51 [PATCH 0/2] scripts/make_fit fix and disabled compression for DTBs Chen-Yu Tsai
2024-05-21 6:51 ` [PATCH 1/2] scripts/make_fit: Drop fdt image entry compatible string Chen-Yu Tsai
2024-05-21 6:51 ` [PATCH 2/2] scripts/make_fit: Add option to disable compression for DTBs Chen-Yu Tsai
@ 2024-05-22 13:08 ` Masahiro Yamada
2 siblings, 0 replies; 11+ messages in thread
From: Masahiro Yamada @ 2024-05-22 13:08 UTC (permalink / raw)
To: Chen-Yu Tsai
Cc: Simon Glass, Nathan Chancellor, Nicolas Schier, linux-arm-kernel,
linux-kernel, linux-kbuild
On Tue, May 21, 2024 at 3:51 PM Chen-Yu Tsai <wenst@chromium.org> wrote:
>
> Hi folks,
>
> Here are a couple changes for the FIT image packing script. While
> unreleated, they are sent together because the change context overlaps.
>
> The first patch drops the compatible string property from the fdt image
> nodes. According to the FIT image spec, the compatible string in the
> (fdt/kernel) image node is used to specify special loading mechanisms,
> and is _not_ for identifying the DTB.
This makes sense.
> The second patch adds an option that disables compression for _just_ the
> included DTBs. This is needed for RK3399 and MT8173 based Chromebooks,
> whose firmware does not support decompressing DTBs, but does need kernel
> image compression to fit the image within their relatively small image
> size of 32 MiB.
Any platform that wants to use scripts/make_fit.py
must implement decompression of DTBs.
(or does not compress anything)
Otherwise, RK3399 and MT8173 cannot use this script.
I will not add any weird knob to it.
>
> Please take a look.
>
>
> Thanks
> ChenYu
>
>
> Chen-Yu Tsai (2):
> scripts/make_fit: Drop fdt image entry compatible string
> scripts/make_fit: Add option to disable compression for DTBs
>
> scripts/Makefile.lib | 1 +
> scripts/make_fit.py | 14 +++++++++++---
> 2 files changed, 12 insertions(+), 3 deletions(-)
>
> --
> 2.45.0.215.g3402c0e53f-goog
>
>
--
Best Regards
Masahiro Yamada
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] scripts/make_fit: Drop fdt image entry compatible string
2024-05-21 6:51 ` [PATCH 1/2] scripts/make_fit: Drop fdt image entry compatible string Chen-Yu Tsai
@ 2024-05-23 17:19 ` Simon Glass
2024-05-23 17:30 ` Chen-Yu Tsai
0 siblings, 1 reply; 11+ messages in thread
From: Simon Glass @ 2024-05-23 17:19 UTC (permalink / raw)
To: Chen-Yu Tsai
Cc: Masahiro Yamada, Nathan Chancellor, Nicolas Schier,
linux-arm-kernel, linux-kernel, linux-kbuild
Hi Chen-Yu,
On Tue, 21 May 2024 at 00:51, Chen-Yu Tsai <wenst@chromium.org> wrote:
>
> According to the FIT image spec, the compatible string in the fdt image
Can you please add a link to where it says this in the spec? I cannot
find it after a short search.
I believe this patch is correct. Since the information is in the
configuration node it does not need to be in the FDT.
> node or any image node specifies the method to load the image, not the
> compatible string embedded in the FDT or used for matching.
>
> Drop the compatible string from the fdt image entry node.
>
> While at it also fix up a typo in the document section of output_dtb.
>
> Fixes: 7a23b027ec17 ("arm64: boot: Support Flat Image Tree")
> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
> ---
> scripts/make_fit.py | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/scripts/make_fit.py b/scripts/make_fit.py
> index 3de90c5a094b..263147df80a4 100755
> --- a/scripts/make_fit.py
> +++ b/scripts/make_fit.py
> @@ -190,7 +190,7 @@ def output_dtb(fsw, seq, fname, arch, compress):
> Args:
> fsw (libfdt.FdtSw): Object to use for writing
> seq (int): Sequence number (1 for first)
> - fmame (str): Filename containing the DTB
> + fname (str): Filename containing the DTB
> arch: FIT architecture, e.g. 'arm64'
> compress (str): Compressed algorithm, e.g. 'gzip'
>
> @@ -211,7 +211,6 @@ def output_dtb(fsw, seq, fname, arch, compress):
> fsw.property_string('type', 'flat_dt')
> fsw.property_string('arch', arch)
> fsw.property_string('compression', compress)
> - fsw.property('compatible', bytes(compat))
>
> with open(fname, 'rb') as inf:
> compressed = compress_data(inf, compress)
> --
> 2.45.0.215.g3402c0e53f-goog
>
Regards,
Simon
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] scripts/make_fit: Drop fdt image entry compatible string
2024-05-23 17:19 ` Simon Glass
@ 2024-05-23 17:30 ` Chen-Yu Tsai
2024-05-23 17:38 ` Simon Glass
0 siblings, 1 reply; 11+ messages in thread
From: Chen-Yu Tsai @ 2024-05-23 17:30 UTC (permalink / raw)
To: Simon Glass
Cc: Chen-Yu Tsai, Masahiro Yamada, Nathan Chancellor, Nicolas Schier,
linux-arm-kernel, linux-kernel, linux-kbuild
On Fri, May 24, 2024 at 1:19 AM Simon Glass <sjg@chromium.org> wrote:
>
> Hi Chen-Yu,
>
> On Tue, 21 May 2024 at 00:51, Chen-Yu Tsai <wenst@chromium.org> wrote:
> >
> > According to the FIT image spec, the compatible string in the fdt image
>
> Can you please add a link to where it says this in the spec? I cannot
> find it after a short search.
(Quick reply from my other email before I forget.)
From the FIT source file format document, found in U-boot source
"doc/usage/fit/source_file_format.rst", or on the website:
https://docs.u-boot.org/en/latest/usage/fit/source_file_format.html
Under "'/images' node" -> "Conditionally mandatory property", the
"compatible" property is described as "compatible method for loading image."
I'll add the reference in the next version.
ChenYu
> I believe this patch is correct. Since the information is in the
> configuration node it does not need to be in the FDT.
>
> > node or any image node specifies the method to load the image, not the
> > compatible string embedded in the FDT or used for matching.
> >
> > Drop the compatible string from the fdt image entry node.
> >
> > While at it also fix up a typo in the document section of output_dtb.
> >
> > Fixes: 7a23b027ec17 ("arm64: boot: Support Flat Image Tree")
> > Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
> > ---
> > scripts/make_fit.py | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/scripts/make_fit.py b/scripts/make_fit.py
> > index 3de90c5a094b..263147df80a4 100755
> > --- a/scripts/make_fit.py
> > +++ b/scripts/make_fit.py
> > @@ -190,7 +190,7 @@ def output_dtb(fsw, seq, fname, arch, compress):
> > Args:
> > fsw (libfdt.FdtSw): Object to use for writing
> > seq (int): Sequence number (1 for first)
> > - fmame (str): Filename containing the DTB
> > + fname (str): Filename containing the DTB
> > arch: FIT architecture, e.g. 'arm64'
> > compress (str): Compressed algorithm, e.g. 'gzip'
> >
> > @@ -211,7 +211,6 @@ def output_dtb(fsw, seq, fname, arch, compress):
> > fsw.property_string('type', 'flat_dt')
> > fsw.property_string('arch', arch)
> > fsw.property_string('compression', compress)
> > - fsw.property('compatible', bytes(compat))
> >
> > with open(fname, 'rb') as inf:
> > compressed = compress_data(inf, compress)
> > --
> > 2.45.0.215.g3402c0e53f-goog
> >
>
> Regards,
> Simon
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] scripts/make_fit: Drop fdt image entry compatible string
2024-05-23 17:30 ` Chen-Yu Tsai
@ 2024-05-23 17:38 ` Simon Glass
2024-05-24 6:29 ` Chen-Yu Tsai
0 siblings, 1 reply; 11+ messages in thread
From: Simon Glass @ 2024-05-23 17:38 UTC (permalink / raw)
To: wens
Cc: Chen-Yu Tsai, Masahiro Yamada, Nathan Chancellor, Nicolas Schier,
linux-arm-kernel, linux-kernel, linux-kbuild
Hi ChenYu,
On Thu, 23 May 2024 at 11:30, Chen-Yu Tsai <wens@kernel.org> wrote:
>
> On Fri, May 24, 2024 at 1:19 AM Simon Glass <sjg@chromium.org> wrote:
> >
> > Hi Chen-Yu,
> >
> > On Tue, 21 May 2024 at 00:51, Chen-Yu Tsai <wenst@chromium.org> wrote:
> > >
> > > According to the FIT image spec, the compatible string in the fdt image
> >
> > Can you please add a link to where it says this in the spec? I cannot
> > find it after a short search.
>
> (Quick reply from my other email before I forget.)
>
> From the FIT source file format document, found in U-boot source
> "doc/usage/fit/source_file_format.rst", or on the website:
> https://docs.u-boot.org/en/latest/usage/fit/source_file_format.html
>
> Under "'/images' node" -> "Conditionally mandatory property", the
> "compatible" property is described as "compatible method for loading image."
>
> I'll add the reference in the next version.
OK thank you.
There is also a spec version at [1] - it might be worth adding mention
of this explicitly for the fdt nodes.
Regards,
Simon
[1] https://github.com/open-source-firmware/flat-image-tree/
>
>
> ChenYu
>
> > I believe this patch is correct. Since the information is in the
> > configuration node it does not need to be in the FDT.
> >
> > > node or any image node specifies the method to load the image, not the
> > > compatible string embedded in the FDT or used for matching.
> > >
> > > Drop the compatible string from the fdt image entry node.
> > >
> > > While at it also fix up a typo in the document section of output_dtb.
> > >
> > > Fixes: 7a23b027ec17 ("arm64: boot: Support Flat Image Tree")
> > > Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
> > > ---
> > > scripts/make_fit.py | 3 +--
> > > 1 file changed, 1 insertion(+), 2 deletions(-)
> > >
> > > diff --git a/scripts/make_fit.py b/scripts/make_fit.py
> > > index 3de90c5a094b..263147df80a4 100755
> > > --- a/scripts/make_fit.py
> > > +++ b/scripts/make_fit.py
> > > @@ -190,7 +190,7 @@ def output_dtb(fsw, seq, fname, arch, compress):
> > > Args:
> > > fsw (libfdt.FdtSw): Object to use for writing
> > > seq (int): Sequence number (1 for first)
> > > - fmame (str): Filename containing the DTB
> > > + fname (str): Filename containing the DTB
> > > arch: FIT architecture, e.g. 'arm64'
> > > compress (str): Compressed algorithm, e.g. 'gzip'
> > >
> > > @@ -211,7 +211,6 @@ def output_dtb(fsw, seq, fname, arch, compress):
> > > fsw.property_string('type', 'flat_dt')
> > > fsw.property_string('arch', arch)
> > > fsw.property_string('compression', compress)
> > > - fsw.property('compatible', bytes(compat))
> > >
> > > with open(fname, 'rb') as inf:
> > > compressed = compress_data(inf, compress)
> > > --
> > > 2.45.0.215.g3402c0e53f-goog
> > >
> >
> > Regards,
> > Simon
> >
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] scripts/make_fit: Drop fdt image entry compatible string
2024-05-23 17:38 ` Simon Glass
@ 2024-05-24 6:29 ` Chen-Yu Tsai
2024-05-24 13:01 ` Simon Glass
0 siblings, 1 reply; 11+ messages in thread
From: Chen-Yu Tsai @ 2024-05-24 6:29 UTC (permalink / raw)
To: Simon Glass
Cc: wens, Masahiro Yamada, Nathan Chancellor, Nicolas Schier,
linux-arm-kernel, linux-kernel, linux-kbuild
Hi Simon,
On Fri, May 24, 2024 at 1:38 AM Simon Glass <sjg@chromium.org> wrote:
>
> Hi ChenYu,
>
> On Thu, 23 May 2024 at 11:30, Chen-Yu Tsai <wens@kernel.org> wrote:
> >
> > On Fri, May 24, 2024 at 1:19 AM Simon Glass <sjg@chromium.org> wrote:
> > >
> > > Hi Chen-Yu,
> > >
> > > On Tue, 21 May 2024 at 00:51, Chen-Yu Tsai <wenst@chromium.org> wrote:
> > > >
> > > > According to the FIT image spec, the compatible string in the fdt image
> > >
> > > Can you please add a link to where it says this in the spec? I cannot
> > > find it after a short search.
> >
> > (Quick reply from my other email before I forget.)
> >
> > From the FIT source file format document, found in U-boot source
> > "doc/usage/fit/source_file_format.rst", or on the website:
> > https://docs.u-boot.org/en/latest/usage/fit/source_file_format.html
> >
> > Under "'/images' node" -> "Conditionally mandatory property", the
> > "compatible" property is described as "compatible method for loading image."
> >
> > I'll add the reference in the next version.
>
> OK thank you.
>
> There is also a spec version at [1] - it might be worth adding mention
> of this explicitly for the fdt nodes.
It seems that this is already mentioned?
See https://github.com/open-source-firmware/flat-image-tree/blob/main/source/chapter2-source-file-format.rst?plain=1#L343
It looks like it was copied from U-boot directly.
Regards,
ChenYu
> Regards,
> Simon
>
> [1] https://github.com/open-source-firmware/flat-image-tree/
>
> >
> >
> > ChenYu
> >
> > > I believe this patch is correct. Since the information is in the
> > > configuration node it does not need to be in the FDT.
> > >
> > > > node or any image node specifies the method to load the image, not the
> > > > compatible string embedded in the FDT or used for matching.
> > > >
> > > > Drop the compatible string from the fdt image entry node.
> > > >
> > > > While at it also fix up a typo in the document section of output_dtb.
> > > >
> > > > Fixes: 7a23b027ec17 ("arm64: boot: Support Flat Image Tree")
> > > > Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
> > > > ---
> > > > scripts/make_fit.py | 3 +--
> > > > 1 file changed, 1 insertion(+), 2 deletions(-)
> > > >
> > > > diff --git a/scripts/make_fit.py b/scripts/make_fit.py
> > > > index 3de90c5a094b..263147df80a4 100755
> > > > --- a/scripts/make_fit.py
> > > > +++ b/scripts/make_fit.py
> > > > @@ -190,7 +190,7 @@ def output_dtb(fsw, seq, fname, arch, compress):
> > > > Args:
> > > > fsw (libfdt.FdtSw): Object to use for writing
> > > > seq (int): Sequence number (1 for first)
> > > > - fmame (str): Filename containing the DTB
> > > > + fname (str): Filename containing the DTB
> > > > arch: FIT architecture, e.g. 'arm64'
> > > > compress (str): Compressed algorithm, e.g. 'gzip'
> > > >
> > > > @@ -211,7 +211,6 @@ def output_dtb(fsw, seq, fname, arch, compress):
> > > > fsw.property_string('type', 'flat_dt')
> > > > fsw.property_string('arch', arch)
> > > > fsw.property_string('compression', compress)
> > > > - fsw.property('compatible', bytes(compat))
> > > >
> > > > with open(fname, 'rb') as inf:
> > > > compressed = compress_data(inf, compress)
> > > > --
> > > > 2.45.0.215.g3402c0e53f-goog
> > > >
> > >
> > > Regards,
> > > Simon
> > >
> > > _______________________________________________
> > > linux-arm-kernel mailing list
> > > linux-arm-kernel@lists.infradead.org
> > > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] scripts/make_fit: Drop fdt image entry compatible string
2024-05-24 6:29 ` Chen-Yu Tsai
@ 2024-05-24 13:01 ` Simon Glass
2024-05-28 8:31 ` Chen-Yu Tsai
0 siblings, 1 reply; 11+ messages in thread
From: Simon Glass @ 2024-05-24 13:01 UTC (permalink / raw)
To: Chen-Yu Tsai
Cc: wens, Masahiro Yamada, Nathan Chancellor, Nicolas Schier,
linux-arm-kernel, linux-kernel, linux-kbuild
Hi ChenYu,
On Fri, 24 May 2024 at 00:30, Chen-Yu Tsai <wenst@chromium.org> wrote:
>
> Hi Simon,
>
> On Fri, May 24, 2024 at 1:38 AM Simon Glass <sjg@chromium.org> wrote:
> >
> > Hi ChenYu,
> >
> > On Thu, 23 May 2024 at 11:30, Chen-Yu Tsai <wens@kernel.org> wrote:
> > >
> > > On Fri, May 24, 2024 at 1:19 AM Simon Glass <sjg@chromium.org> wrote:
> > > >
> > > > Hi Chen-Yu,
> > > >
> > > > On Tue, 21 May 2024 at 00:51, Chen-Yu Tsai <wenst@chromium.org> wrote:
> > > > >
> > > > > According to the FIT image spec, the compatible string in the fdt image
> > > >
> > > > Can you please add a link to where it says this in the spec? I cannot
> > > > find it after a short search.
> > >
> > > (Quick reply from my other email before I forget.)
> > >
> > > From the FIT source file format document, found in U-boot source
> > > "doc/usage/fit/source_file_format.rst", or on the website:
> > > https://docs.u-boot.org/en/latest/usage/fit/source_file_format.html
> > >
> > > Under "'/images' node" -> "Conditionally mandatory property", the
> > > "compatible" property is described as "compatible method for loading image."
> > >
> > > I'll add the reference in the next version.
> >
> > OK thank you.
> >
> > There is also a spec version at [1] - it might be worth adding mention
> > of this explicitly for the fdt nodes.
>
> It seems that this is already mentioned?
>
> See https://github.com/open-source-firmware/flat-image-tree/blob/main/source/chapter2-source-file-format.rst?plain=1#L343
I see that but I am suggesting that it could explicitly mention that
the FDT should not have a compatible string for the model...that
should only be in the configuration node.
>
> It looks like it was copied from U-boot directly.
Yes mostly it is the same, but there were some changes. It has evolved
slowly over the years but the bones of it is stable.
Regards,
Simon
>
>
> Regards,
> ChenYu
>
> > Regards,
> > Simon
> >
> > [1] https://github.com/open-source-firmware/flat-image-tree/
> >
> > >
> > >
> > > ChenYu
> > >
> > > > I believe this patch is correct. Since the information is in the
> > > > configuration node it does not need to be in the FDT.
> > > >
> > > > > node or any image node specifies the method to load the image, not the
> > > > > compatible string embedded in the FDT or used for matching.
> > > > >
> > > > > Drop the compatible string from the fdt image entry node.
> > > > >
> > > > > While at it also fix up a typo in the document section of output_dtb.
> > > > >
> > > > > Fixes: 7a23b027ec17 ("arm64: boot: Support Flat Image Tree")
> > > > > Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
> > > > > ---
> > > > > scripts/make_fit.py | 3 +--
> > > > > 1 file changed, 1 insertion(+), 2 deletions(-)
> > > > >
> > > > > diff --git a/scripts/make_fit.py b/scripts/make_fit.py
> > > > > index 3de90c5a094b..263147df80a4 100755
> > > > > --- a/scripts/make_fit.py
> > > > > +++ b/scripts/make_fit.py
> > > > > @@ -190,7 +190,7 @@ def output_dtb(fsw, seq, fname, arch, compress):
> > > > > Args:
> > > > > fsw (libfdt.FdtSw): Object to use for writing
> > > > > seq (int): Sequence number (1 for first)
> > > > > - fmame (str): Filename containing the DTB
> > > > > + fname (str): Filename containing the DTB
> > > > > arch: FIT architecture, e.g. 'arm64'
> > > > > compress (str): Compressed algorithm, e.g. 'gzip'
> > > > >
> > > > > @@ -211,7 +211,6 @@ def output_dtb(fsw, seq, fname, arch, compress):
> > > > > fsw.property_string('type', 'flat_dt')
> > > > > fsw.property_string('arch', arch)
> > > > > fsw.property_string('compression', compress)
> > > > > - fsw.property('compatible', bytes(compat))
> > > > >
> > > > > with open(fname, 'rb') as inf:
> > > > > compressed = compress_data(inf, compress)
> > > > > --
> > > > > 2.45.0.215.g3402c0e53f-goog
> > > > >
> > > >
> > > > Regards,
> > > > Simon
> > > >
> > > > _______________________________________________
> > > > linux-arm-kernel mailing list
> > > > linux-arm-kernel@lists.infradead.org
> > > > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] scripts/make_fit: Drop fdt image entry compatible string
2024-05-24 13:01 ` Simon Glass
@ 2024-05-28 8:31 ` Chen-Yu Tsai
2024-05-28 14:14 ` Simon Glass
0 siblings, 1 reply; 11+ messages in thread
From: Chen-Yu Tsai @ 2024-05-28 8:31 UTC (permalink / raw)
To: Simon Glass
Cc: wens, Masahiro Yamada, Nathan Chancellor, Nicolas Schier,
linux-arm-kernel, linux-kernel, linux-kbuild
On Fri, May 24, 2024 at 9:01 PM Simon Glass <sjg@chromium.org> wrote:
>
> Hi ChenYu,
>
> On Fri, 24 May 2024 at 00:30, Chen-Yu Tsai <wenst@chromium.org> wrote:
> >
> > Hi Simon,
> >
> > On Fri, May 24, 2024 at 1:38 AM Simon Glass <sjg@chromium.org> wrote:
> > >
> > > Hi ChenYu,
> > >
> > > On Thu, 23 May 2024 at 11:30, Chen-Yu Tsai <wens@kernel.org> wrote:
> > > >
> > > > On Fri, May 24, 2024 at 1:19 AM Simon Glass <sjg@chromium.org> wrote:
> > > > >
> > > > > Hi Chen-Yu,
> > > > >
> > > > > On Tue, 21 May 2024 at 00:51, Chen-Yu Tsai <wenst@chromium.org> wrote:
> > > > > >
> > > > > > According to the FIT image spec, the compatible string in the fdt image
> > > > >
> > > > > Can you please add a link to where it says this in the spec? I cannot
> > > > > find it after a short search.
> > > >
> > > > (Quick reply from my other email before I forget.)
> > > >
> > > > From the FIT source file format document, found in U-boot source
> > > > "doc/usage/fit/source_file_format.rst", or on the website:
> > > > https://docs.u-boot.org/en/latest/usage/fit/source_file_format.html
> > > >
> > > > Under "'/images' node" -> "Conditionally mandatory property", the
> > > > "compatible" property is described as "compatible method for loading image."
> > > >
> > > > I'll add the reference in the next version.
> > >
> > > OK thank you.
> > >
> > > There is also a spec version at [1] - it might be worth adding mention
> > > of this explicitly for the fdt nodes.
> >
> > It seems that this is already mentioned?
> >
> > See https://github.com/open-source-firmware/flat-image-tree/blob/main/source/chapter2-source-file-format.rst?plain=1#L343
>
> I see that but I am suggesting that it could explicitly mention that
> the FDT should not have a compatible string for the model...that
> should only be in the configuration node.
I sent a pull request on GitHub. The mailing list seemed very empty.
ChenYu
> >
> > It looks like it was copied from U-boot directly.
>
> Yes mostly it is the same, but there were some changes. It has evolved
> slowly over the years but the bones of it is stable.
>
> Regards,
> Simon
>
> >
> >
> > Regards,
> > ChenYu
> >
> > > Regards,
> > > Simon
> > >
> > > [1] https://github.com/open-source-firmware/flat-image-tree/
> > >
> > > >
> > > >
> > > > ChenYu
> > > >
> > > > > I believe this patch is correct. Since the information is in the
> > > > > configuration node it does not need to be in the FDT.
> > > > >
> > > > > > node or any image node specifies the method to load the image, not the
> > > > > > compatible string embedded in the FDT or used for matching.
> > > > > >
> > > > > > Drop the compatible string from the fdt image entry node.
> > > > > >
> > > > > > While at it also fix up a typo in the document section of output_dtb.
> > > > > >
> > > > > > Fixes: 7a23b027ec17 ("arm64: boot: Support Flat Image Tree")
> > > > > > Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
> > > > > > ---
> > > > > > scripts/make_fit.py | 3 +--
> > > > > > 1 file changed, 1 insertion(+), 2 deletions(-)
> > > > > >
> > > > > > diff --git a/scripts/make_fit.py b/scripts/make_fit.py
> > > > > > index 3de90c5a094b..263147df80a4 100755
> > > > > > --- a/scripts/make_fit.py
> > > > > > +++ b/scripts/make_fit.py
> > > > > > @@ -190,7 +190,7 @@ def output_dtb(fsw, seq, fname, arch, compress):
> > > > > > Args:
> > > > > > fsw (libfdt.FdtSw): Object to use for writing
> > > > > > seq (int): Sequence number (1 for first)
> > > > > > - fmame (str): Filename containing the DTB
> > > > > > + fname (str): Filename containing the DTB
> > > > > > arch: FIT architecture, e.g. 'arm64'
> > > > > > compress (str): Compressed algorithm, e.g. 'gzip'
> > > > > >
> > > > > > @@ -211,7 +211,6 @@ def output_dtb(fsw, seq, fname, arch, compress):
> > > > > > fsw.property_string('type', 'flat_dt')
> > > > > > fsw.property_string('arch', arch)
> > > > > > fsw.property_string('compression', compress)
> > > > > > - fsw.property('compatible', bytes(compat))
> > > > > >
> > > > > > with open(fname, 'rb') as inf:
> > > > > > compressed = compress_data(inf, compress)
> > > > > > --
> > > > > > 2.45.0.215.g3402c0e53f-goog
> > > > > >
> > > > >
> > > > > Regards,
> > > > > Simon
> > > > >
> > > > > _______________________________________________
> > > > > linux-arm-kernel mailing list
> > > > > linux-arm-kernel@lists.infradead.org
> > > > > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] scripts/make_fit: Drop fdt image entry compatible string
2024-05-28 8:31 ` Chen-Yu Tsai
@ 2024-05-28 14:14 ` Simon Glass
0 siblings, 0 replies; 11+ messages in thread
From: Simon Glass @ 2024-05-28 14:14 UTC (permalink / raw)
To: Chen-Yu Tsai
Cc: wens, Masahiro Yamada, Nathan Chancellor, Nicolas Schier,
linux-arm-kernel, linux-kernel, linux-kbuild
Hi Chen-Yu,
On Tue, 28 May 2024 at 02:31, Chen-Yu Tsai <wenst@chromium.org> wrote:
>
> On Fri, May 24, 2024 at 9:01 PM Simon Glass <sjg@chromium.org> wrote:
> >
> > Hi ChenYu,
> >
> > On Fri, 24 May 2024 at 00:30, Chen-Yu Tsai <wenst@chromium.org> wrote:
> > >
> > > Hi Simon,
> > >
> > > On Fri, May 24, 2024 at 1:38 AM Simon Glass <sjg@chromium.org> wrote:
> > > >
> > > > Hi ChenYu,
> > > >
> > > > On Thu, 23 May 2024 at 11:30, Chen-Yu Tsai <wens@kernel.org> wrote:
> > > > >
> > > > > On Fri, May 24, 2024 at 1:19 AM Simon Glass <sjg@chromium.org> wrote:
> > > > > >
> > > > > > Hi Chen-Yu,
> > > > > >
> > > > > > On Tue, 21 May 2024 at 00:51, Chen-Yu Tsai <wenst@chromium.org> wrote:
> > > > > > >
> > > > > > > According to the FIT image spec, the compatible string in the fdt image
> > > > > >
> > > > > > Can you please add a link to where it says this in the spec? I cannot
> > > > > > find it after a short search.
> > > > >
> > > > > (Quick reply from my other email before I forget.)
> > > > >
> > > > > From the FIT source file format document, found in U-boot source
> > > > > "doc/usage/fit/source_file_format.rst", or on the website:
> > > > > https://docs.u-boot.org/en/latest/usage/fit/source_file_format.html
> > > > >
> > > > > Under "'/images' node" -> "Conditionally mandatory property", the
> > > > > "compatible" property is described as "compatible method for loading image."
> > > > >
> > > > > I'll add the reference in the next version.
> > > >
> > > > OK thank you.
> > > >
> > > > There is also a spec version at [1] - it might be worth adding mention
> > > > of this explicitly for the fdt nodes.
> > >
> > > It seems that this is already mentioned?
> > >
> > > See https://github.com/open-source-firmware/flat-image-tree/blob/main/source/chapter2-source-file-format.rst?plain=1#L343
> >
> > I see that but I am suggesting that it could explicitly mention that
> > the FDT should not have a compatible string for the model...that
> > should only be in the configuration node.
>
> I sent a pull request on GitHub. The mailing list seemed very empty.
Yes it is fairly new and the spec is pretty stable.
Your PR is merged.
Regards,
Simon
>
> ChenYu
>
> > >
> > > It looks like it was copied from U-boot directly.
> >
> > Yes mostly it is the same, but there were some changes. It has evolved
> > slowly over the years but the bones of it is stable.
> >
> > Regards,
> > Simon
> >
> > >
> > >
> > > Regards,
> > > ChenYu
> > >
> > > > Regards,
> > > > Simon
> > > >
> > > > [1] https://github.com/open-source-firmware/flat-image-tree/
> > > >
> > > > >
> > > > >
> > > > > ChenYu
> > > > >
> > > > > > I believe this patch is correct. Since the information is in the
> > > > > > configuration node it does not need to be in the FDT.
> > > > > >
> > > > > > > node or any image node specifies the method to load the image, not the
> > > > > > > compatible string embedded in the FDT or used for matching.
> > > > > > >
> > > > > > > Drop the compatible string from the fdt image entry node.
> > > > > > >
> > > > > > > While at it also fix up a typo in the document section of output_dtb.
> > > > > > >
> > > > > > > Fixes: 7a23b027ec17 ("arm64: boot: Support Flat Image Tree")
> > > > > > > Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
> > > > > > > ---
> > > > > > > scripts/make_fit.py | 3 +--
> > > > > > > 1 file changed, 1 insertion(+), 2 deletions(-)
> > > > > > >
> > > > > > > diff --git a/scripts/make_fit.py b/scripts/make_fit.py
> > > > > > > index 3de90c5a094b..263147df80a4 100755
> > > > > > > --- a/scripts/make_fit.py
> > > > > > > +++ b/scripts/make_fit.py
> > > > > > > @@ -190,7 +190,7 @@ def output_dtb(fsw, seq, fname, arch, compress):
> > > > > > > Args:
> > > > > > > fsw (libfdt.FdtSw): Object to use for writing
> > > > > > > seq (int): Sequence number (1 for first)
> > > > > > > - fmame (str): Filename containing the DTB
> > > > > > > + fname (str): Filename containing the DTB
> > > > > > > arch: FIT architecture, e.g. 'arm64'
> > > > > > > compress (str): Compressed algorithm, e.g. 'gzip'
> > > > > > >
> > > > > > > @@ -211,7 +211,6 @@ def output_dtb(fsw, seq, fname, arch, compress):
> > > > > > > fsw.property_string('type', 'flat_dt')
> > > > > > > fsw.property_string('arch', arch)
> > > > > > > fsw.property_string('compression', compress)
> > > > > > > - fsw.property('compatible', bytes(compat))
> > > > > > >
> > > > > > > with open(fname, 'rb') as inf:
> > > > > > > compressed = compress_data(inf, compress)
> > > > > > > --
> > > > > > > 2.45.0.215.g3402c0e53f-goog
> > > > > > >
> > > > > >
> > > > > > Regards,
> > > > > > Simon
> > > > > >
> > > > > > _______________________________________________
> > > > > > linux-arm-kernel mailing list
> > > > > > linux-arm-kernel@lists.infradead.org
> > > > > > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-05-28 14:14 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-21 6:51 [PATCH 0/2] scripts/make_fit fix and disabled compression for DTBs Chen-Yu Tsai
2024-05-21 6:51 ` [PATCH 1/2] scripts/make_fit: Drop fdt image entry compatible string Chen-Yu Tsai
2024-05-23 17:19 ` Simon Glass
2024-05-23 17:30 ` Chen-Yu Tsai
2024-05-23 17:38 ` Simon Glass
2024-05-24 6:29 ` Chen-Yu Tsai
2024-05-24 13:01 ` Simon Glass
2024-05-28 8:31 ` Chen-Yu Tsai
2024-05-28 14:14 ` Simon Glass
2024-05-21 6:51 ` [PATCH 2/2] scripts/make_fit: Add option to disable compression for DTBs Chen-Yu Tsai
2024-05-22 13:08 ` [PATCH 0/2] scripts/make_fit fix and disabled " Masahiro Yamada
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).