diff mbox series

[1/2] scripts/make_fit: Drop fdt image entry compatible string

Message ID 20240521065107.30371-2-wenst@chromium.org (mailing list archive)
State New
Headers show
Series scripts/make_fit fix and disabled compression for DTBs | expand

Commit Message

Chen-Yu Tsai May 21, 2024, 6:51 a.m. UTC
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(-)

Comments

Simon Glass May 23, 2024, 5:19 p.m. UTC | #1
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
Chen-Yu Tsai May 23, 2024, 5:30 p.m. UTC | #2
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
Simon Glass May 23, 2024, 5:38 p.m. UTC | #3
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
Chen-Yu Tsai May 24, 2024, 6:29 a.m. UTC | #4
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
Simon Glass May 24, 2024, 1:01 p.m. UTC | #5
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
Chen-Yu Tsai May 28, 2024, 8:31 a.m. UTC | #6
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
Simon Glass May 28, 2024, 2:14 p.m. UTC | #7
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
diff mbox series

Patch

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)