diff mbox series

scripts: dtc: Start building fdtoverlay and fdtdump

Message ID 5a416b44155409e45b99c5624d66992a2138cd4c.1609927722.git.viresh.kumar@linaro.org
State New
Headers show
Series scripts: dtc: Start building fdtoverlay and fdtdump | expand

Commit Message

Viresh Kumar Jan. 6, 2021, 10:09 a.m. UTC
We will start building overlays for platforms soon in the kernel and
would need these tools going forward. Lets fetch and build these.

Note that a copy of fdtdump.c was already copied back in the year 2012,
but it was never updated or built for some reason.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

---
 scripts/dtc/Makefile             | 8 +++++++-
 scripts/dtc/update-dtc-source.sh | 6 +++---
 2 files changed, 10 insertions(+), 4 deletions(-)

-- 
2.25.0.rc1.19.g042ed3e048af

Comments

kernel test robot Jan. 6, 2021, 12:24 p.m. UTC | #1
Hi Viresh,

I love your patch! Yet something to improve:

[auto build test ERROR on robh/for-next]
[also build test ERROR on v5.11-rc2 next-20210104]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Viresh-Kumar/scripts-dtc-Start-building-fdtoverlay-and-fdtdump/20210106-181140
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: x86_64-randconfig-a013-20210106 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 5c951623bc8965fa1e89660f2f5f4a2944e4981a)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/5ee2a6ba3d6de17f6e9b9dc259081630b6deffb8
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Viresh-Kumar/scripts-dtc-Start-building-fdtoverlay-and-fdtdump/20210106-181140
        git checkout 5ee2a6ba3d6de17f6e9b9dc259081630b6deffb8
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> make[2]: *** No rule to make target 'scripts/dtc/fdtoverlay.c', needed by 'scripts/dtc/fdtoverlay.o'.

   In file included from scripts/dtc/fdtdump.c:12:
>> scripts/dtc/libfdt/fdt.h:13:2: error: unknown type name 'fdt32_t'; did you mean 'int32_t'?

           fdt32_t magic;                   /* magic word FDT_MAGIC */
           ^~~~~~~
           int32_t
   /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   typedef __int32_t int32_t;
                     ^
   In file included from scripts/dtc/fdtdump.c:12:
   scripts/dtc/libfdt/fdt.h:14:2: error: unknown type name 'fdt32_t'; did you mean 'int32_t'?
           fdt32_t totalsize;               /* total size of DT block */
           ^~~~~~~
           int32_t
   /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   typedef __int32_t int32_t;
                     ^
   In file included from scripts/dtc/fdtdump.c:12:
   scripts/dtc/libfdt/fdt.h:15:2: error: unknown type name 'fdt32_t'; did you mean 'int32_t'?
           fdt32_t off_dt_struct;           /* offset to structure */
           ^~~~~~~
           int32_t
   /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   typedef __int32_t int32_t;
                     ^
   In file included from scripts/dtc/fdtdump.c:12:
   scripts/dtc/libfdt/fdt.h:16:2: error: unknown type name 'fdt32_t'; did you mean 'int32_t'?
           fdt32_t off_dt_strings;          /* offset to strings */
           ^~~~~~~
           int32_t
   /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   typedef __int32_t int32_t;
                     ^
   In file included from scripts/dtc/fdtdump.c:12:
   scripts/dtc/libfdt/fdt.h:17:2: error: unknown type name 'fdt32_t'; did you mean 'int32_t'?
           fdt32_t off_mem_rsvmap;          /* offset to memory reserve map */
           ^~~~~~~
           int32_t
   /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   typedef __int32_t int32_t;
                     ^
   In file included from scripts/dtc/fdtdump.c:12:
   scripts/dtc/libfdt/fdt.h:18:2: error: unknown type name 'fdt32_t'; did you mean 'int32_t'?
           fdt32_t version;                 /* format version */
           ^~~~~~~
           int32_t
   /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   typedef __int32_t int32_t;
                     ^
   In file included from scripts/dtc/fdtdump.c:12:
   scripts/dtc/libfdt/fdt.h:19:2: error: unknown type name 'fdt32_t'; did you mean 'int32_t'?
           fdt32_t last_comp_version;       /* last compatible version */
           ^~~~~~~
           int32_t
   /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   typedef __int32_t int32_t;
                     ^
   In file included from scripts/dtc/fdtdump.c:12:
   scripts/dtc/libfdt/fdt.h:22:2: error: unknown type name 'fdt32_t'; did you mean 'int32_t'?
           fdt32_t boot_cpuid_phys;         /* Which physical CPU id we're
           ^~~~~~~
           int32_t
   /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   typedef __int32_t int32_t;
                     ^
   In file included from scripts/dtc/fdtdump.c:12:
   scripts/dtc/libfdt/fdt.h:25:2: error: unknown type name 'fdt32_t'; did you mean 'int32_t'?
           fdt32_t size_dt_strings;         /* size of the strings block */
           ^~~~~~~
           int32_t
   /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   typedef __int32_t int32_t;
                     ^
   In file included from scripts/dtc/fdtdump.c:12:
   scripts/dtc/libfdt/fdt.h:28:2: error: unknown type name 'fdt32_t'; did you mean 'int32_t'?
           fdt32_t size_dt_struct;          /* size of the structure block */
           ^~~~~~~
           int32_t
   /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   typedef __int32_t int32_t;
                     ^
   In file included from scripts/dtc/fdtdump.c:12:
>> scripts/dtc/libfdt/fdt.h:32:2: error: unknown type name 'fdt64_t'; did you mean 'int64_t'?

           fdt64_t address;
           ^~~~~~~
           int64_t
   /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:27:19: note: 'int64_t' declared here
   typedef __int64_t int64_t;
                     ^
   In file included from scripts/dtc/fdtdump.c:12:
   scripts/dtc/libfdt/fdt.h:33:2: error: unknown type name 'fdt64_t'; did you mean 'int64_t'?
           fdt64_t size;
           ^~~~~~~
           int64_t
   /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:27:19: note: 'int64_t' declared here
   typedef __int64_t int64_t;
                     ^
   In file included from scripts/dtc/fdtdump.c:12:
   scripts/dtc/libfdt/fdt.h:37:2: error: unknown type name 'fdt32_t'; did you mean 'int32_t'?
           fdt32_t tag;
           ^~~~~~~
           int32_t
   /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   typedef __int32_t int32_t;
                     ^
   In file included from scripts/dtc/fdtdump.c:12:
   scripts/dtc/libfdt/fdt.h:42:2: error: unknown type name 'fdt32_t'; did you mean 'int32_t'?
           fdt32_t tag;
           ^~~~~~~
           int32_t
   /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   typedef __int32_t int32_t;
                     ^
   In file included from scripts/dtc/fdtdump.c:12:
   scripts/dtc/libfdt/fdt.h:43:2: error: unknown type name 'fdt32_t'; did you mean 'int32_t'?
           fdt32_t len;
           ^~~~~~~
           int32_t
   /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   typedef __int32_t int32_t;
                     ^
   In file included from scripts/dtc/fdtdump.c:12:
   scripts/dtc/libfdt/fdt.h:44:2: error: unknown type name 'fdt32_t'; did you mean 'int32_t'?
           fdt32_t nameoff;
           ^~~~~~~
           int32_t
   /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   typedef __int32_t int32_t;
                     ^
>> scripts/dtc/fdtdump.c:156:28: error: too few arguments to function call, expected 2, have 1

           buf = utilfdt_read(argv[1]);
                 ~~~~~~~~~~~~        ^
   scripts/dtc/util.h:97:7: note: 'utilfdt_read' declared here
   char *utilfdt_read(const char *filename, size_t *len);
         ^
   17 errors generated.
   make[2]: *** [scripts/Makefile.host:112: scripts/dtc/fdtdump.o] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [Makefile:1356: scripts_dtc] Error 2
   make[1]: Target 'modules_prepare' not remade because of errors.
   make: *** [Makefile:185: __sub-make] Error 2
   make: Target 'modules_prepare' not remade because of errors.
--
>> make[2]: *** No rule to make target 'scripts/dtc/fdtoverlay.c', needed by 'scripts/dtc/fdtoverlay.o'.

   In file included from scripts/dtc/fdtdump.c:12:
>> scripts/dtc/libfdt/fdt.h:13:2: error: unknown type name 'fdt32_t'; did you mean 'int32_t'?

           fdt32_t magic;                   /* magic word FDT_MAGIC */
           ^~~~~~~
           int32_t
   /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   typedef __int32_t int32_t;
                     ^
   In file included from scripts/dtc/fdtdump.c:12:
   scripts/dtc/libfdt/fdt.h:14:2: error: unknown type name 'fdt32_t'; did you mean 'int32_t'?
           fdt32_t totalsize;               /* total size of DT block */
           ^~~~~~~
           int32_t
   /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   typedef __int32_t int32_t;
                     ^
   In file included from scripts/dtc/fdtdump.c:12:
   scripts/dtc/libfdt/fdt.h:15:2: error: unknown type name 'fdt32_t'; did you mean 'int32_t'?
           fdt32_t off_dt_struct;           /* offset to structure */
           ^~~~~~~
           int32_t
   /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   typedef __int32_t int32_t;
                     ^
   In file included from scripts/dtc/fdtdump.c:12:
   scripts/dtc/libfdt/fdt.h:16:2: error: unknown type name 'fdt32_t'; did you mean 'int32_t'?
           fdt32_t off_dt_strings;          /* offset to strings */
           ^~~~~~~
           int32_t
   /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   typedef __int32_t int32_t;
                     ^
   In file included from scripts/dtc/fdtdump.c:12:
   scripts/dtc/libfdt/fdt.h:17:2: error: unknown type name 'fdt32_t'; did you mean 'int32_t'?
           fdt32_t off_mem_rsvmap;          /* offset to memory reserve map */
           ^~~~~~~
           int32_t
   /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   typedef __int32_t int32_t;
                     ^
   In file included from scripts/dtc/fdtdump.c:12:
   scripts/dtc/libfdt/fdt.h:18:2: error: unknown type name 'fdt32_t'; did you mean 'int32_t'?
           fdt32_t version;                 /* format version */
           ^~~~~~~
           int32_t
   /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   typedef __int32_t int32_t;
                     ^
   In file included from scripts/dtc/fdtdump.c:12:
   scripts/dtc/libfdt/fdt.h:19:2: error: unknown type name 'fdt32_t'; did you mean 'int32_t'?
           fdt32_t last_comp_version;       /* last compatible version */
           ^~~~~~~
           int32_t
   /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   typedef __int32_t int32_t;
                     ^
   In file included from scripts/dtc/fdtdump.c:12:
   scripts/dtc/libfdt/fdt.h:22:2: error: unknown type name 'fdt32_t'; did you mean 'int32_t'?
           fdt32_t boot_cpuid_phys;         /* Which physical CPU id we're
           ^~~~~~~
           int32_t
   /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   typedef __int32_t int32_t;
                     ^
   In file included from scripts/dtc/fdtdump.c:12:
   scripts/dtc/libfdt/fdt.h:25:2: error: unknown type name 'fdt32_t'; did you mean 'int32_t'?
           fdt32_t size_dt_strings;         /* size of the strings block */
           ^~~~~~~
           int32_t
   /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   typedef __int32_t int32_t;
                     ^
   In file included from scripts/dtc/fdtdump.c:12:
   scripts/dtc/libfdt/fdt.h:28:2: error: unknown type name 'fdt32_t'; did you mean 'int32_t'?
           fdt32_t size_dt_struct;          /* size of the structure block */
           ^~~~~~~
           int32_t
   /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   typedef __int32_t int32_t;
                     ^
   In file included from scripts/dtc/fdtdump.c:12:
>> scripts/dtc/libfdt/fdt.h:32:2: error: unknown type name 'fdt64_t'; did you mean 'int64_t'?

           fdt64_t address;
           ^~~~~~~
           int64_t
   /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:27:19: note: 'int64_t' declared here
   typedef __int64_t int64_t;
                     ^
   In file included from scripts/dtc/fdtdump.c:12:
   scripts/dtc/libfdt/fdt.h:33:2: error: unknown type name 'fdt64_t'; did you mean 'int64_t'?
           fdt64_t size;
           ^~~~~~~
           int64_t
   /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:27:19: note: 'int64_t' declared here
   typedef __int64_t int64_t;
                     ^
   In file included from scripts/dtc/fdtdump.c:12:
   scripts/dtc/libfdt/fdt.h:37:2: error: unknown type name 'fdt32_t'; did you mean 'int32_t'?
           fdt32_t tag;
           ^~~~~~~
           int32_t
   /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   typedef __int32_t int32_t;
                     ^
   In file included from scripts/dtc/fdtdump.c:12:
   scripts/dtc/libfdt/fdt.h:42:2: error: unknown type name 'fdt32_t'; did you mean 'int32_t'?
           fdt32_t tag;
           ^~~~~~~
           int32_t
   /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   typedef __int32_t int32_t;
                     ^
   In file included from scripts/dtc/fdtdump.c:12:
   scripts/dtc/libfdt/fdt.h:43:2: error: unknown type name 'fdt32_t'; did you mean 'int32_t'?
           fdt32_t len;
           ^~~~~~~
           int32_t
   /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   typedef __int32_t int32_t;
                     ^
   In file included from scripts/dtc/fdtdump.c:12:
   scripts/dtc/libfdt/fdt.h:44:2: error: unknown type name 'fdt32_t'; did you mean 'int32_t'?
           fdt32_t nameoff;
           ^~~~~~~
           int32_t
   /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   typedef __int32_t int32_t;
                     ^
>> scripts/dtc/fdtdump.c:156:28: error: too few arguments to function call, expected 2, have 1

           buf = utilfdt_read(argv[1]);
                 ~~~~~~~~~~~~        ^
   scripts/dtc/util.h:97:7: note: 'utilfdt_read' declared here
   char *utilfdt_read(const char *filename, size_t *len);
         ^
   17 errors generated.
   make[2]: *** [scripts/Makefile.host:112: scripts/dtc/fdtdump.o] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [Makefile:1356: scripts_dtc] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:185: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.


vim +13 scripts/dtc/libfdt/fdt.h

1cade99497c881a arch/powerpc/boot/libfdt/fdt.h David Gibson 2007-12-10  11  
1cade99497c881a arch/powerpc/boot/libfdt/fdt.h David Gibson 2007-12-10  12  struct fdt_header {
4760597116e34bd scripts/dtc/libfdt/fdt.h       Rob Herring  2015-04-29 @13  	fdt32_t magic;			 /* magic word FDT_MAGIC */
4760597116e34bd scripts/dtc/libfdt/fdt.h       Rob Herring  2015-04-29  14  	fdt32_t totalsize;		 /* total size of DT block */
4760597116e34bd scripts/dtc/libfdt/fdt.h       Rob Herring  2015-04-29  15  	fdt32_t off_dt_struct;		 /* offset to structure */
4760597116e34bd scripts/dtc/libfdt/fdt.h       Rob Herring  2015-04-29  16  	fdt32_t off_dt_strings;		 /* offset to strings */
4760597116e34bd scripts/dtc/libfdt/fdt.h       Rob Herring  2015-04-29  17  	fdt32_t off_mem_rsvmap;		 /* offset to memory reserve map */
4760597116e34bd scripts/dtc/libfdt/fdt.h       Rob Herring  2015-04-29  18  	fdt32_t version;		 /* format version */
4760597116e34bd scripts/dtc/libfdt/fdt.h       Rob Herring  2015-04-29  19  	fdt32_t last_comp_version;	 /* last compatible version */
1cade99497c881a arch/powerpc/boot/libfdt/fdt.h David Gibson 2007-12-10  20  
1cade99497c881a arch/powerpc/boot/libfdt/fdt.h David Gibson 2007-12-10  21  	/* version 2 fields below */
4760597116e34bd scripts/dtc/libfdt/fdt.h       Rob Herring  2015-04-29  22  	fdt32_t boot_cpuid_phys;	 /* Which physical CPU id we're
1cade99497c881a arch/powerpc/boot/libfdt/fdt.h David Gibson 2007-12-10  23  					    booting on */
1cade99497c881a arch/powerpc/boot/libfdt/fdt.h David Gibson 2007-12-10  24  	/* version 3 fields below */
4760597116e34bd scripts/dtc/libfdt/fdt.h       Rob Herring  2015-04-29  25  	fdt32_t size_dt_strings;	 /* size of the strings block */
1cade99497c881a arch/powerpc/boot/libfdt/fdt.h David Gibson 2007-12-10  26  
1cade99497c881a arch/powerpc/boot/libfdt/fdt.h David Gibson 2007-12-10  27  	/* version 17 fields below */
4760597116e34bd scripts/dtc/libfdt/fdt.h       Rob Herring  2015-04-29  28  	fdt32_t size_dt_struct;		 /* size of the structure block */
1cade99497c881a arch/powerpc/boot/libfdt/fdt.h David Gibson 2007-12-10  29  };
1cade99497c881a arch/powerpc/boot/libfdt/fdt.h David Gibson 2007-12-10  30  
1cade99497c881a arch/powerpc/boot/libfdt/fdt.h David Gibson 2007-12-10  31  struct fdt_reserve_entry {
4760597116e34bd scripts/dtc/libfdt/fdt.h       Rob Herring  2015-04-29 @32  	fdt64_t address;
4760597116e34bd scripts/dtc/libfdt/fdt.h       Rob Herring  2015-04-29  33  	fdt64_t size;
1cade99497c881a arch/powerpc/boot/libfdt/fdt.h David Gibson 2007-12-10  34  };
1cade99497c881a arch/powerpc/boot/libfdt/fdt.h David Gibson 2007-12-10  35  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Rob Herring Jan. 6, 2021, 3:52 p.m. UTC | #2
On Wed, Jan 6, 2021 at 3:09 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
>

> We will start building overlays for platforms soon in the kernel and

> would need these tools going forward. Lets fetch and build these.

>

> Note that a copy of fdtdump.c was already copied back in the year 2012,

> but it was never updated or built for some reason.

>

> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

> ---

>  scripts/dtc/Makefile             | 8 +++++++-

>  scripts/dtc/update-dtc-source.sh | 6 +++---


This needs to be 2 patches so we can do a dtc sync in between. So
update update-dtc-source.sh, run update-dtc-source.sh, update the
Makefile.

>  2 files changed, 10 insertions(+), 4 deletions(-)

>

> diff --git a/scripts/dtc/Makefile b/scripts/dtc/Makefile

> index 4852bf44e913..c607980a5c17 100644

> --- a/scripts/dtc/Makefile

> +++ b/scripts/dtc/Makefile

> @@ -1,12 +1,18 @@

>  # SPDX-License-Identifier: GPL-2.0

>  # scripts/dtc makefile

>

> -hostprogs-always-$(CONFIG_DTC)         += dtc

> +hostprogs-always-$(CONFIG_DTC)         += dtc fdtdump fdtoverlay

>  hostprogs-always-$(CHECK_DT_BINDING)   += dtc

>

>  dtc-objs       := dtc.o flattree.o fstree.o data.o livetree.o treesource.o \

>                    srcpos.o checks.o util.o

>  dtc-objs       += dtc-lexer.lex.o dtc-parser.tab.o

> +fdtdump-objs   := fdtdump.o util.o

> +

> +libfdt_dir     = libfdt

> +libfdt-objs    := fdt.o fdt_ro.o fdt_wip.o fdt_sw.o fdt_rw.o fdt_strerror.o fdt_empty_tree.o fdt_addresses.o fdt_overlay.o

> +libfdt         = $(addprefix $(libfdt_dir)/,$(libfdt-objs))

> +fdtoverlay-objs        := $(libfdt) fdtoverlay.o util.o

>

>  # Source files need to get at the userspace version of libfdt_env.h to compile

>  HOST_EXTRACFLAGS += -I $(srctree)/$(src)/libfdt

> diff --git a/scripts/dtc/update-dtc-source.sh b/scripts/dtc/update-dtc-source.sh

> index bc704e2a6a4a..9bc4afb71415 100755

> --- a/scripts/dtc/update-dtc-source.sh

> +++ b/scripts/dtc/update-dtc-source.sh

> @@ -31,9 +31,9 @@ set -ev

>  DTC_UPSTREAM_PATH=`pwd`/../dtc

>  DTC_LINUX_PATH=`pwd`/scripts/dtc

>

> -DTC_SOURCE="checks.c data.c dtc.c dtc.h flattree.c fstree.c livetree.c srcpos.c \

> -               srcpos.h treesource.c util.c util.h version_gen.h yamltree.c \

> -               dtc-lexer.l dtc-parser.y"

> +DTC_SOURCE="checks.c data.c dtc.c dtc.h fdtdump.c fdtoverlay.c flattree.c \

> +               fstree.c livetree.c srcpos.c srcpos.h treesource.c util.c \

> +               util.h version_gen.h yamltree.c dtc-lexer.l dtc-parser.y"

>  LIBFDT_SOURCE="fdt.c fdt.h fdt_addresses.c fdt_empty_tree.c \

>                 fdt_overlay.c fdt_ro.c fdt_rw.c fdt_strerror.c fdt_sw.c \

>                 fdt_wip.c libfdt.h libfdt_env.h libfdt_internal.h"

> --

> 2.25.0.rc1.19.g042ed3e048af

>
diff mbox series

Patch

diff --git a/scripts/dtc/Makefile b/scripts/dtc/Makefile
index 4852bf44e913..c607980a5c17 100644
--- a/scripts/dtc/Makefile
+++ b/scripts/dtc/Makefile
@@ -1,12 +1,18 @@ 
 # SPDX-License-Identifier: GPL-2.0
 # scripts/dtc makefile
 
-hostprogs-always-$(CONFIG_DTC)		+= dtc
+hostprogs-always-$(CONFIG_DTC)		+= dtc fdtdump fdtoverlay
 hostprogs-always-$(CHECK_DT_BINDING)	+= dtc
 
 dtc-objs	:= dtc.o flattree.o fstree.o data.o livetree.o treesource.o \
 		   srcpos.o checks.o util.o
 dtc-objs	+= dtc-lexer.lex.o dtc-parser.tab.o
+fdtdump-objs	:= fdtdump.o util.o
+
+libfdt_dir	= libfdt
+libfdt-objs	:= fdt.o fdt_ro.o fdt_wip.o fdt_sw.o fdt_rw.o fdt_strerror.o fdt_empty_tree.o fdt_addresses.o fdt_overlay.o
+libfdt		= $(addprefix $(libfdt_dir)/,$(libfdt-objs))
+fdtoverlay-objs	:= $(libfdt) fdtoverlay.o util.o
 
 # Source files need to get at the userspace version of libfdt_env.h to compile
 HOST_EXTRACFLAGS += -I $(srctree)/$(src)/libfdt
diff --git a/scripts/dtc/update-dtc-source.sh b/scripts/dtc/update-dtc-source.sh
index bc704e2a6a4a..9bc4afb71415 100755
--- a/scripts/dtc/update-dtc-source.sh
+++ b/scripts/dtc/update-dtc-source.sh
@@ -31,9 +31,9 @@  set -ev
 DTC_UPSTREAM_PATH=`pwd`/../dtc
 DTC_LINUX_PATH=`pwd`/scripts/dtc
 
-DTC_SOURCE="checks.c data.c dtc.c dtc.h flattree.c fstree.c livetree.c srcpos.c \
-		srcpos.h treesource.c util.c util.h version_gen.h yamltree.c \
-		dtc-lexer.l dtc-parser.y"
+DTC_SOURCE="checks.c data.c dtc.c dtc.h fdtdump.c fdtoverlay.c flattree.c \
+		fstree.c livetree.c srcpos.c srcpos.h treesource.c util.c \
+		util.h version_gen.h yamltree.c dtc-lexer.l dtc-parser.y"
 LIBFDT_SOURCE="fdt.c fdt.h fdt_addresses.c fdt_empty_tree.c \
 		fdt_overlay.c fdt_ro.c fdt_rw.c fdt_strerror.c fdt_sw.c \
 		fdt_wip.c libfdt.h libfdt_env.h libfdt_internal.h"