Linux DT community follows the strict rule that they never locally
modify libfdt. In Linux, lib/fdt_*.c are wrapper files to
scripts/dtc/libfdt/fdt_*.c and scripts/dtc/ is synced with upstream
DTC by running scripts/dtc/update-dtc-source.sh
The local code in Linux is separated in drivers/of/.
On the other hand, U-Boot originally had own copies in lib/libfdt/,
and people locally modified them. The code diverged, and made it difficult
to re-sync with upstream.
In 2018, I worked on migrating them to wrapper files, just like Linux does.
50a327ded68b7e675389ad284ea3f8c62e683bda
87be1e9fb4dcc130e90d497cc5ce49c715efc6c2
26e961c8cfdff00c5c9389d301d9a2eb10eb844c
This series completes this work.
1/3 migrates fdt_ro.c to a wrapper.
Two years ago, it diverged from the upstream, and gave up resync.
Now, I do not see essential diff.
2/3 and 3/3 separate fdt_region out of the upstream code.
I am resending them after two years since the previous rejection.
It was unfortuate that they were rejected based on the assumption
that is unlikely to happen. They should be re-evaluated.
Masahiro Yamada (3):
libfdt: migrate fdt_ro.c to a wrapper of scripts/dtc/libfdt/fdt_ro.c
fdt_region: move fdt_region.c to common/ from lib/libfdt/
libfdt: split fdt_region declarations out to <fdt_region.h>
common/Makefile | 1 +
{lib/libfdt => common}/fdt_region.c | 1 +
common/image-fit-sig.c | 1 +
include/fdt_region.h | 304 +++++++++
include/linux/libfdt.h | 299 ---------
lib/libfdt/Makefile | 9 +-
lib/libfdt/fdt_ro.c | 925 +---------------------------
tools/Makefile | 13 +-
tools/fdtgrep.c | 1 +
tools/image-host.c | 1 +
tools/libfdt/fdt_ro.c | 2 +
11 files changed, 317 insertions(+), 1240 deletions(-)
rename {lib/libfdt => common}/fdt_region.c (99%)
create mode 100644 include/fdt_region.h
create mode 100644 tools/libfdt/fdt_ro.c