History log of /u-boot/scripts/dtc/pylibfdt/libfdt.i_shipped
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 7d01bb1c 13-Oct-2022 Michal Suchanek <msuchanek@suse.de>

libfdt: Fix build with python 3.10

Python 3.10 requires defining PY_SSIZE_T_CLEAN. This will be fixed in
swig 4.10 but it is not clear when it will be released. There was a
warning since python 3.8.

Link: https://github.com/swig/swig/pull/2277

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# a2cfad8e 24-May-2021 Tom Rini <trini@konsulko.com>

pylibfdt: Rework "avoid unused variable warning" lines

Clang has -Wself-assign enabled by default under -Wall and so when
building with -Werror we would get an error here. Inspired by Linux
kernel git commit a21151b9d81a ("tools/build: tweak unused value
workaround") make use of the fact that both Clang and GCC support
casting to `void` as the method to note that something is intentionally
unused.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 211cfa50 01-Sep-2020 Simon Glass <sjg@chromium.org>

libfdt: Detected out-of-space with fdt_finish()

At present the Python sequential-write interface can produce an error when
it calls fdt_finish(), since this needs to add a terminating tag to the
end of the struct section.

Fix this by automatically expanding the buffer if needed.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 97de532e 31-Oct-2019 Simon Glass <sjg@chromium.org>

pylibfdt: Correct the type for fdt_property_stub()

This function should use a void * type, not char *. This causes an error:

TypeError: in method 'fdt_property_stub', argument 3 of type 'char const *'

Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 903fe17a 31-Oct-2019 Simon Glass <sjg@chromium.org>

pylibfdt: Sync up with upstream

Sync up the libfdt Python bindings with upstream, commit:

430419c (tests: fix some python warnings)

Signed-off-by: Simon Glass <sjg@chromium.org>

# b4cf5f1d 31-Oct-2019 Simon Glass <sjg@chromium.org>

pylibfdt: Convert to Python 3

Build this swig module with Python 3.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 34967c26 14-Sep-2018 Simon Glass <sjg@chromium.org>

fdt: Add Python support for adding/removing nodes

Pull this support from these upstream commits:

bfbfab0 pylibfdt: Add a means to add and delete notes
9005f41 pylibfdt: Allow delprop() to return errors

Signed-off-by: Simon Glass <sjg@chromium.org>

# 50c59522 26-Jul-2018 Simon Glass <sjg@chromium.org>

libfdt: Update to latest pylibfdt implementation

The enhanced pylibfdt support in U-Boot needed for binman was a
placeholder while upstreaming of this work continued. This is now
complete, so bring in the changes and update the tools as needed.

There are quite a few changes since we decided to split the
implementation into three fdt classes instead of two.

The Fdt.del_node() method was unfortunately missed in this process and
will be dealt with later. It exists in U-Boot but not upstream.

Further syncing of libfdt probably needs to wait until we assess the
code-size impact of all the new checking code on SPL and possibly provide
a way to disable it.

Signed-off-by: Simon Glass <sjg@chromium.org>

# c640ed0c 06-Jul-2018 Simon Glass <sjg@chromium.org>

libfdt: Add get_property() and del_node()

Add support for these functions in the Python binding. This patch stands
in for a pending upstream change.

Signed-off-by: Simon Glass <sjg@chromium.org>

# a1e00855 06-Jul-2018 Simon Glass <sjg@chromium.org>

libfdt: Fix the Python pack() function

This currently fails to reduce the device-tree bytearray size. Fix this.

This stands in for a pending upstream change.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 3def0cf2 06-Jul-2018 Simon Glass <sjg@chromium.org>

libfdt: Bring in proposed pylibfdt changes

This provides various patches sent to the devicetree-compiler mailing list
to enhance the Python bindings. A final version of this patch may be
created once upstreaming is complete, but if it takes too long, this can
act as a placeholder.

New pylibfdt features:
- Support for most remaining, relevant libfdt functions
- Support for sequential-write functions

Changes are applied to existing U-Boot tools as needed.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 4549e789 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our multiple license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have multiple licenses (in
these cases, dual license) declared in the SPDX-License-Identifier tag.
In this case we change from listing "LICENSE-A LICENSE-B" or "LICENSE-A
or LICENSE-B" or "(LICENSE-A OR LICENSE-B)" to "LICENSE-A OR LICENSE-B"
as per the Linux Kernel style document. Note that parenthesis are
allowed so when they were used before we continue to use them.

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>

# 15b97f5c 16-Oct-2017 Masahiro Yamada <yamada.masahiro@socionext.com>

pylibfdt: move pylibfdt to scripts/dtc/pylibfdt and refactor makefile

The pylibfdt is used by dtoc (and, indirectly by binman), but there
is no reason why it must be generated in the tools/ directory.

Recently, U-Boot switched over to the bundled DTC, and the directory
structure under scripts/dtc/ now mirrors the upstream DTC project.
So, scripts/dtc/pylibfdt is the best location.

I also rewrote the Makefile in a cleaner Kbuild style.

The scripts from the upstream have been moved as follows:

lib/libfdt/pylibfdt/setup.py -> scripts/dtc/pylibfdt/setup.py
lib/libfdt/pylibfdt/libfdt.i -> scripts/dtc/pylibfdt/libfdt.i_shipped

The .i_shipped is coped to .i during building because the .i must be
located in the objtree when we build it out of tree.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

# a2cfad8e 24-May-2021 Tom Rini <trini@konsulko.com>

pylibfdt: Rework "avoid unused variable warning" lines

Clang has -Wself-assign enabled by default under -Wall and so when
building with -Werror we would get an error here. Inspired by Linux
kernel git commit a21151b9d81a ("tools/build: tweak unused value
workaround") make use of the fact that both Clang and GCC support
casting to `void` as the method to note that something is intentionally
unused.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 211cfa50 01-Sep-2020 Simon Glass <sjg@chromium.org>

libfdt: Detected out-of-space with fdt_finish()

At present the Python sequential-write interface can produce an error when
it calls fdt_finish(), since this needs to add a terminating tag to the
end of the struct section.

Fix this by automatically expanding the buffer if needed.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 97de532e 31-Oct-2019 Simon Glass <sjg@chromium.org>

pylibfdt: Correct the type for fdt_property_stub()

This function should use a void * type, not char *. This causes an error:

TypeError: in method 'fdt_property_stub', argument 3 of type 'char const *'

Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 903fe17a 31-Oct-2019 Simon Glass <sjg@chromium.org>

pylibfdt: Sync up with upstream

Sync up the libfdt Python bindings with upstream, commit:

430419c (tests: fix some python warnings)

Signed-off-by: Simon Glass <sjg@chromium.org>

# b4cf5f1d 31-Oct-2019 Simon Glass <sjg@chromium.org>

pylibfdt: Convert to Python 3

Build this swig module with Python 3.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 34967c26 14-Sep-2018 Simon Glass <sjg@chromium.org>

fdt: Add Python support for adding/removing nodes

Pull this support from these upstream commits:

bfbfab0 pylibfdt: Add a means to add and delete notes
9005f41 pylibfdt: Allow delprop() to return errors

Signed-off-by: Simon Glass <sjg@chromium.org>

# 50c59522 26-Jul-2018 Simon Glass <sjg@chromium.org>

libfdt: Update to latest pylibfdt implementation

The enhanced pylibfdt support in U-Boot needed for binman was a
placeholder while upstreaming of this work continued. This is now
complete, so bring in the changes and update the tools as needed.

There are quite a few changes since we decided to split the
implementation into three fdt classes instead of two.

The Fdt.del_node() method was unfortunately missed in this process and
will be dealt with later. It exists in U-Boot but not upstream.

Further syncing of libfdt probably needs to wait until we assess the
code-size impact of all the new checking code on SPL and possibly provide
a way to disable it.

Signed-off-by: Simon Glass <sjg@chromium.org>

# c640ed0c 06-Jul-2018 Simon Glass <sjg@chromium.org>

libfdt: Add get_property() and del_node()

Add support for these functions in the Python binding. This patch stands
in for a pending upstream change.

Signed-off-by: Simon Glass <sjg@chromium.org>

# a1e00855 06-Jul-2018 Simon Glass <sjg@chromium.org>

libfdt: Fix the Python pack() function

This currently fails to reduce the device-tree bytearray size. Fix this.

This stands in for a pending upstream change.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 3def0cf2 06-Jul-2018 Simon Glass <sjg@chromium.org>

libfdt: Bring in proposed pylibfdt changes

This provides various patches sent to the devicetree-compiler mailing list
to enhance the Python bindings. A final version of this patch may be
created once upstreaming is complete, but if it takes too long, this can
act as a placeholder.

New pylibfdt features:
- Support for most remaining, relevant libfdt functions
- Support for sequential-write functions

Changes are applied to existing U-Boot tools as needed.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 4549e789 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our multiple license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have multiple licenses (in
these cases, dual license) declared in the SPDX-License-Identifier tag.
In this case we change from listing "LICENSE-A LICENSE-B" or "LICENSE-A
or LICENSE-B" or "(LICENSE-A OR LICENSE-B)" to "LICENSE-A OR LICENSE-B"
as per the Linux Kernel style document. Note that parenthesis are
allowed so when they were used before we continue to use them.

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>

# 15b97f5c 16-Oct-2017 Masahiro Yamada <yamada.masahiro@socionext.com>

pylibfdt: move pylibfdt to scripts/dtc/pylibfdt and refactor makefile

The pylibfdt is used by dtoc (and, indirectly by binman), but there
is no reason why it must be generated in the tools/ directory.

Recently, U-Boot switched over to the bundled DTC, and the directory
structure under scripts/dtc/ now mirrors the upstream DTC project.
So, scripts/dtc/pylibfdt is the best location.

I also rewrote the Makefile in a cleaner Kbuild style.

The scripts from the upstream have been moved as follows:

lib/libfdt/pylibfdt/setup.py -> scripts/dtc/pylibfdt/setup.py
lib/libfdt/pylibfdt/libfdt.i -> scripts/dtc/pylibfdt/libfdt.i_shipped

The .i_shipped is coped to .i during building because the .i must be
located in the objtree when we build it out of tree.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

# 211cfa50 01-Sep-2020 Simon Glass <sjg@chromium.org>

libfdt: Detected out-of-space with fdt_finish()

At present the Python sequential-write interface can produce an error when
it calls fdt_finish(), since this needs to add a terminating tag to the
end of the struct section.

Fix this by automatically expanding the buffer if needed.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 97de532e 31-Oct-2019 Simon Glass <sjg@chromium.org>

pylibfdt: Correct the type for fdt_property_stub()

This function should use a void * type, not char *. This causes an error:

TypeError: in method 'fdt_property_stub', argument 3 of type 'char const *'

Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 903fe17a 31-Oct-2019 Simon Glass <sjg@chromium.org>

pylibfdt: Sync up with upstream

Sync up the libfdt Python bindings with upstream, commit:

430419c (tests: fix some python warnings)

Signed-off-by: Simon Glass <sjg@chromium.org>

# b4cf5f1d 31-Oct-2019 Simon Glass <sjg@chromium.org>

pylibfdt: Convert to Python 3

Build this swig module with Python 3.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 34967c26 14-Sep-2018 Simon Glass <sjg@chromium.org>

fdt: Add Python support for adding/removing nodes

Pull this support from these upstream commits:

bfbfab0 pylibfdt: Add a means to add and delete notes
9005f41 pylibfdt: Allow delprop() to return errors

Signed-off-by: Simon Glass <sjg@chromium.org>

# 50c59522 26-Jul-2018 Simon Glass <sjg@chromium.org>

libfdt: Update to latest pylibfdt implementation

The enhanced pylibfdt support in U-Boot needed for binman was a
placeholder while upstreaming of this work continued. This is now
complete, so bring in the changes and update the tools as needed.

There are quite a few changes since we decided to split the
implementation into three fdt classes instead of two.

The Fdt.del_node() method was unfortunately missed in this process and
will be dealt with later. It exists in U-Boot but not upstream.

Further syncing of libfdt probably needs to wait until we assess the
code-size impact of all the new checking code on SPL and possibly provide
a way to disable it.

Signed-off-by: Simon Glass <sjg@chromium.org>

# c640ed0c 06-Jul-2018 Simon Glass <sjg@chromium.org>

libfdt: Add get_property() and del_node()

Add support for these functions in the Python binding. This patch stands
in for a pending upstream change.

Signed-off-by: Simon Glass <sjg@chromium.org>

# a1e00855 06-Jul-2018 Simon Glass <sjg@chromium.org>

libfdt: Fix the Python pack() function

This currently fails to reduce the device-tree bytearray size. Fix this.

This stands in for a pending upstream change.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 3def0cf2 06-Jul-2018 Simon Glass <sjg@chromium.org>

libfdt: Bring in proposed pylibfdt changes

This provides various patches sent to the devicetree-compiler mailing list
to enhance the Python bindings. A final version of this patch may be
created once upstreaming is complete, but if it takes too long, this can
act as a placeholder.

New pylibfdt features:
- Support for most remaining, relevant libfdt functions
- Support for sequential-write functions

Changes are applied to existing U-Boot tools as needed.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 4549e789 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our multiple license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have multiple licenses (in
these cases, dual license) declared in the SPDX-License-Identifier tag.
In this case we change from listing "LICENSE-A LICENSE-B" or "LICENSE-A
or LICENSE-B" or "(LICENSE-A OR LICENSE-B)" to "LICENSE-A OR LICENSE-B"
as per the Linux Kernel style document. Note that parenthesis are
allowed so when they were used before we continue to use them.

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>

# 15b97f5c 16-Oct-2017 Masahiro Yamada <yamada.masahiro@socionext.com>

pylibfdt: move pylibfdt to scripts/dtc/pylibfdt and refactor makefile

The pylibfdt is used by dtoc (and, indirectly by binman), but there
is no reason why it must be generated in the tools/ directory.

Recently, U-Boot switched over to the bundled DTC, and the directory
structure under scripts/dtc/ now mirrors the upstream DTC project.
So, scripts/dtc/pylibfdt is the best location.

I also rewrote the Makefile in a cleaner Kbuild style.

The scripts from the upstream have been moved as follows:

lib/libfdt/pylibfdt/setup.py -> scripts/dtc/pylibfdt/setup.py
lib/libfdt/pylibfdt/libfdt.i -> scripts/dtc/pylibfdt/libfdt.i_shipped

The .i_shipped is coped to .i during building because the .i must be
located in the objtree when we build it out of tree.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

# 97de532e 31-Oct-2019 Simon Glass <sjg@chromium.org>

pylibfdt: Correct the type for fdt_property_stub()

This function should use a void * type, not char *. This causes an error:

TypeError: in method 'fdt_property_stub', argument 3 of type 'char const *'

Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 903fe17a 31-Oct-2019 Simon Glass <sjg@chromium.org>

pylibfdt: Sync up with upstream

Sync up the libfdt Python bindings with upstream, commit:

430419c (tests: fix some python warnings)

Signed-off-by: Simon Glass <sjg@chromium.org>

# b4cf5f1d 31-Oct-2019 Simon Glass <sjg@chromium.org>

pylibfdt: Convert to Python 3

Build this swig module with Python 3.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 34967c26 14-Sep-2018 Simon Glass <sjg@chromium.org>

fdt: Add Python support for adding/removing nodes

Pull this support from these upstream commits:

bfbfab0 pylibfdt: Add a means to add and delete notes
9005f41 pylibfdt: Allow delprop() to return errors

Signed-off-by: Simon Glass <sjg@chromium.org>

# 50c59522 26-Jul-2018 Simon Glass <sjg@chromium.org>

libfdt: Update to latest pylibfdt implementation

The enhanced pylibfdt support in U-Boot needed for binman was a
placeholder while upstreaming of this work continued. This is now
complete, so bring in the changes and update the tools as needed.

There are quite a few changes since we decided to split the
implementation into three fdt classes instead of two.

The Fdt.del_node() method was unfortunately missed in this process and
will be dealt with later. It exists in U-Boot but not upstream.

Further syncing of libfdt probably needs to wait until we assess the
code-size impact of all the new checking code on SPL and possibly provide
a way to disable it.

Signed-off-by: Simon Glass <sjg@chromium.org>

# c640ed0c 06-Jul-2018 Simon Glass <sjg@chromium.org>

libfdt: Add get_property() and del_node()

Add support for these functions in the Python binding. This patch stands
in for a pending upstream change.

Signed-off-by: Simon Glass <sjg@chromium.org>

# a1e00855 06-Jul-2018 Simon Glass <sjg@chromium.org>

libfdt: Fix the Python pack() function

This currently fails to reduce the device-tree bytearray size. Fix this.

This stands in for a pending upstream change.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 3def0cf2 06-Jul-2018 Simon Glass <sjg@chromium.org>

libfdt: Bring in proposed pylibfdt changes

This provides various patches sent to the devicetree-compiler mailing list
to enhance the Python bindings. A final version of this patch may be
created once upstreaming is complete, but if it takes too long, this can
act as a placeholder.

New pylibfdt features:
- Support for most remaining, relevant libfdt functions
- Support for sequential-write functions

Changes are applied to existing U-Boot tools as needed.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 4549e789 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our multiple license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have multiple licenses (in
these cases, dual license) declared in the SPDX-License-Identifier tag.
In this case we change from listing "LICENSE-A LICENSE-B" or "LICENSE-A
or LICENSE-B" or "(LICENSE-A OR LICENSE-B)" to "LICENSE-A OR LICENSE-B"
as per the Linux Kernel style document. Note that parenthesis are
allowed so when they were used before we continue to use them.

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>

# 15b97f5c 16-Oct-2017 Masahiro Yamada <yamada.masahiro@socionext.com>

pylibfdt: move pylibfdt to scripts/dtc/pylibfdt and refactor makefile

The pylibfdt is used by dtoc (and, indirectly by binman), but there
is no reason why it must be generated in the tools/ directory.

Recently, U-Boot switched over to the bundled DTC, and the directory
structure under scripts/dtc/ now mirrors the upstream DTC project.
So, scripts/dtc/pylibfdt is the best location.

I also rewrote the Makefile in a cleaner Kbuild style.

The scripts from the upstream have been moved as follows:

lib/libfdt/pylibfdt/setup.py -> scripts/dtc/pylibfdt/setup.py
lib/libfdt/pylibfdt/libfdt.i -> scripts/dtc/pylibfdt/libfdt.i_shipped

The .i_shipped is coped to .i during building because the .i must be
located in the objtree when we build it out of tree.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

# 34967c26 14-Sep-2018 Simon Glass <sjg@chromium.org>

fdt: Add Python support for adding/removing nodes

Pull this support from these upstream commits:

bfbfab0 pylibfdt: Add a means to add and delete notes
9005f41 pylibfdt: Allow delprop() to return errors

Signed-off-by: Simon Glass <sjg@chromium.org>


# 50c59522 26-Jul-2018 Simon Glass <sjg@chromium.org>

libfdt: Update to latest pylibfdt implementation

The enhanced pylibfdt support in U-Boot needed for binman was a
placeholder while upstreaming of this work continued. This is now
complete, so bring in the changes and update the tools as needed.

There are quite a few changes since we decided to split the
implementation into three fdt classes instead of two.

The Fdt.del_node() method was unfortunately missed in this process and
will be dealt with later. It exists in U-Boot but not upstream.

Further syncing of libfdt probably needs to wait until we assess the
code-size impact of all the new checking code on SPL and possibly provide
a way to disable it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c640ed0c 06-Jul-2018 Simon Glass <sjg@chromium.org>

libfdt: Add get_property() and del_node()

Add support for these functions in the Python binding. This patch stands
in for a pending upstream change.

Signed-off-by: Simon Glass <sjg@chromium.org>


# a1e00855 06-Jul-2018 Simon Glass <sjg@chromium.org>

libfdt: Fix the Python pack() function

This currently fails to reduce the device-tree bytearray size. Fix this.

This stands in for a pending upstream change.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3def0cf2 06-Jul-2018 Simon Glass <sjg@chromium.org>

libfdt: Bring in proposed pylibfdt changes

This provides various patches sent to the devicetree-compiler mailing list
to enhance the Python bindings. A final version of this patch may be
created once upstreaming is complete, but if it takes too long, this can
act as a placeholder.

New pylibfdt features:
- Support for most remaining, relevant libfdt functions
- Support for sequential-write functions

Changes are applied to existing U-Boot tools as needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4549e789 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our multiple license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have multiple licenses (in
these cases, dual license) declared in the SPDX-License-Identifier tag.
In this case we change from listing "LICENSE-A LICENSE-B" or "LICENSE-A
or LICENSE-B" or "(LICENSE-A OR LICENSE-B)" to "LICENSE-A OR LICENSE-B"
as per the Linux Kernel style document. Note that parenthesis are
allowed so when they were used before we continue to use them.

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 15b97f5c 16-Oct-2017 Masahiro Yamada <yamada.masahiro@socionext.com>

pylibfdt: move pylibfdt to scripts/dtc/pylibfdt and refactor makefile

The pylibfdt is used by dtoc (and, indirectly by binman), but there
is no reason why it must be generated in the tools/ directory.

Recently, U-Boot switched over to the bundled DTC, and the directory
structure under scripts/dtc/ now mirrors the upstream DTC project.
So, scripts/dtc/pylibfdt is the best location.

I also rewrote the Makefile in a cleaner Kbuild style.

The scripts from the upstream have been moved as follows:

lib/libfdt/pylibfdt/setup.py -> scripts/dtc/pylibfdt/setup.py
lib/libfdt/pylibfdt/libfdt.i -> scripts/dtc/pylibfdt/libfdt.i_shipped

The .i_shipped is coped to .i during building because the .i must be
located in the objtree when we build it out of tree.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>