Skip to contentSkip to conversation

scripts/dtc: Reenable fdtget

PATCH In review Sascha Hauer 3 participants 7 messages Aug 9, 2018 – Aug 14, 2018 Device tree

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts/dtc: Reenable fdtget

compilation of fdtget was lost during the update to version 1.4.6. We need this tool internally for the build process when imd support is enabled.

Apparently our dtc code comes from the Kernel which doesn't have the upstream version of fdtget.c and it doesn't compile. This patch changes fdtget.c to the upstream version as of 1.4.6. This isn't noticed in the Kernel because fdtget isn't compiled there.

Fixes 8a8982541 scripts/dtc: Update to upstream version 1.4.6
---
 scripts/dtc/Makefile |   5 +-
 scripts/dtc/fdtget.c | 119 +++++++++++++++++++++++++------------------
 2 files changed, 73 insertions(+), 51 deletions(-)
scripts/dtc/Makefile +4 -1
index 06aaa8c550..cc4ebefcb6 100644
@@ -1,6 +1,6 @@
 # scripts/dtc makefile
 
-hostprogs-y	:= dtc
+hostprogs-y	:= dtc fdtget
 always		:= $(hostprogs-y)
 
 dtc-objs	:= dtc.o flattree.o fstree.o data.o livetree.o treesource.o \
@@ -10,6 +10,8 @@ dtc-objs	+= dtc-lexer.lex.o dtc-parser.tab.o
 libfdt-objs	= fdt.o fdt_ro.o fdt_strerror.o fdt_wip.o fdt_overlay.o
 libfdt-objs	+= fdt_empty_tree.o fdt_rw.o fdt_sw.o
 
+fdtget-objs    += fdtget.o $(libfdt-objs) util.o
+
 # Source files need to get at the userspace version of libfdt_env.h to compile
 
 HOSTCFLAGS_DTC := -I$(src)
@@ -23,6 +25,7 @@ HOSTCFLAGS_livetree.o := $(HOSTCFLAGS_DTC)
 HOSTCFLAGS_srcpos.o := $(HOSTCFLAGS_DTC)
 HOSTCFLAGS_treesource.o := $(HOSTCFLAGS_DTC)
 HOSTCFLAGS_util.o := $(HOSTCFLAGS_DTC)
+HOSTCFLAGS_fdtget.o := $(HOSTCFLAGS_DTC)
 
 HOSTCFLAGS_fdt.o := $(HOSTCFLAGS_DTC)
 HOSTCFLAGS_fdt_ro.o := $(HOSTCFLAGS_DTC)
scripts/dtc/fdtget.c +69 -50

189 lines not on this page · raw message

Signature · 7 lines
2.18.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw
Quoted 23 lines · On Thursday 09 August 2018 08:54:20 Sascha Hauer wrote:

[...]

scripts/dtc/Makefile +3 -1
index 06aaa8c550..cc4ebefcb6 100644
@@ -1,6 +1,6 @@
 # scripts/dtc makefile
 
-hostprogs-y	:= dtc
+hostprogs-y	:= dtc fdtget
 always	:= $(hostprogs-y)
 
 dtc-objs	:= dtc.o flattree.o fstree.o data.o livetree.o treesource.o \
@@ -10,6 +10,8 @@ dtc-objs	+= dtc-lexer.lex.o dtc-parser.tab.o
 libfdt-objs	= fdt.o fdt_ro.o fdt_strerror.o fdt_wip.o fdt_overlay.o
 libfdt-objs	+= fdt_empty_tree.o fdt_rw.o fdt_sw.o
 
+fdtget-objs    += fdtget.o $(libfdt-objs) util.o
+
 # Source files need to get at the userspace version of libfdt_env.h to compile
 
 HOSTCFLAGS_DTC := -I$(src)

scripts/dtc/Makefile HOSTCFLAGS_livetree.o := $(HOSTCFLAGS_DTC) · line 31

Quoted 7 lines
scripts/dtc/Makefile +1 -0
@@ -23,6 +25,7 @@ HOSTCFLAGS_livetree.o := $(HOSTCFLAGS_DTC)
 HOSTCFLAGS_srcpos.o := $(HOSTCFLAGS_DTC)
 HOSTCFLAGS_treesource.o := $(HOSTCFLAGS_DTC)
 HOSTCFLAGS_util.o := $(HOSTCFLAGS_DTC)
+HOSTCFLAGS_fdtget.o := $(HOSTCFLAGS_DTC)
 
 HOSTCFLAGS_fdt.o := $(HOSTCFLAGS_DTC)
 HOSTCFLAGS_fdt_ro.o := $(HOSTCFLAGS_DTC)

You should add "fdtget" to the "clean-files" variable as well.

jb

Signature · 7 lines
Pengutronix e.K.                             | Juergen Borleis             |
Industrial Linux Solutions                   | http://www.pengutronix.de/  |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw
Quoted 29 lines · Juergen Borleis
Quoted 28 lines · On Thursday 09 August 2018 08:54:20 Sascha Hauer wrote:

[...]

scripts/dtc/Makefile +4 -1
index 06aaa8c550..cc4ebefcb6 100644
@@ -1,6 +1,6 @@
 # scripts/dtc makefile
 
-hostprogs-y	:= dtc
+hostprogs-y	:= dtc fdtget
 always	:= $(hostprogs-y)
 
 dtc-objs	:= dtc.o flattree.o fstree.o data.o livetree.o treesource.o \
@@ -10,6 +10,8 @@ dtc-objs	+= dtc-lexer.lex.o dtc-parser.tab.o
 libfdt-objs	= fdt.o fdt_ro.o fdt_strerror.o fdt_wip.o fdt_overlay.o
 libfdt-objs	+= fdt_empty_tree.o fdt_rw.o fdt_sw.o
 
+fdtget-objs    += fdtget.o $(libfdt-objs) util.o
+
 # Source files need to get at the userspace version of libfdt_env.h to compile
 
 HOSTCFLAGS_DTC := -I$(src)
@@ -23,6 +25,7 @@ HOSTCFLAGS_livetree.o := $(HOSTCFLAGS_DTC)
 HOSTCFLAGS_srcpos.o := $(HOSTCFLAGS_DTC)
 HOSTCFLAGS_treesource.o := $(HOSTCFLAGS_DTC)
 HOSTCFLAGS_util.o := $(HOSTCFLAGS_DTC)
+HOSTCFLAGS_fdtget.o := $(HOSTCFLAGS_DTC)
 
Quoted 4 lines

scripts/dtc/Makefile HOSTCFLAGS_livetree.o := $(HOSTCFLAGS_DTC) · line 31

Quoted 2 lines
scripts/dtc/Makefile +0 -0
 HOSTCFLAGS_fdt.o := $(HOSTCFLAGS_DTC)
 HOSTCFLAGS_fdt_ro.o := $(HOSTCFLAGS_DTC)

You should add "fdtget" to the "clean-files" variable as well.

Nope, it's not necessary to add that explicitly.

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#3 lore raw
Quoted 5 lines · On Thursday 09 August 2018 09:20:24 Sascha Hauer wrote:

[...]

Quoted 2 lines

You should add "fdtget" to the "clean-files" variable as well.

Nope, it's not necessary to add that explicitly.

Hmm, then somewhere else?

$ make
[...]
$ git status
scripts/dtc/fdtget
$ make clean
[...]
$ git status
scripts/dtc/fdtget

I think that's why this issue wasn't noticed when the update to 1.4.6 was made.

jb

Signature · 7 lines
Pengutronix e.K.                             | Juergen Borleis             |
Industrial Linux Solutions                   | http://www.pengutronix.de/  |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#4 lore raw
Quoted 7 lines · Juergen Borleis
Quoted 5 lines · On Thursday 09 August 2018 09:20:24 Sascha Hauer wrote:

[...]

Quoted 2 lines

You should add "fdtget" to the "clean-files" variable as well.

Nope, it's not necessary to add that explicitly.

Quoted 7 lines

Hmm, then somewhere else?

$ make
[...]
$ git status
scripts/dtc/fdtget
$ make clean

Host tools are cleaned with 'make distclean'

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#5 lore raw

PATCH 1/1 scripts/dtc: add fdtget to .gitignore

In reply to Sascha Hauer
---
 scripts/dtc/.gitignore | 1 +
 1 file changed, 1 insertion(+)
scripts/dtc/.gitignore +1 -0
index cdabdc95a..80f6b50fd 100644
@@ -2,3 +2,4 @@ dtc
 dtc-lexer.lex.c
 dtc-parser.tab.c
 dtc-parser.tab.h
+fdtget
Signature · 7 lines
2.17.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
author Applied
#6 lore raw

Re: [PATCH] scripts/dtc: add fdtget to .gitignore

Quoted 4 lines · Peter Mamonov
---
 scripts/dtc/.gitignore | 1 +
 1 file changed, 1 insertion(+)

Applied, thanks

Sascha

Quoted 14 lines
scripts/dtc/.gitignore +1 -0
index cdabdc95a..80f6b50fd 100644
@@ -2,3 +2,4 @@ dtc
 dtc-lexer.lex.c
 dtc-parser.tab.c
 dtc-parser.tab.h
+fdtget
Signature · 1 line
2.17.0
Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox