Skip to contentSkip to conversation

Update in-kernel dtc and libfdt to version 1.2.0

PATCH David Gibson 1 participant 1 message Aug 7, 2008 PowerPC

lore
Share & tools
lore
#0 lore raw

Some time ago, a copies of the upstream dtc and libfdt sources were included in the kernel tree to avoid having these as external dependencies for building the kernel. Since then development on the upstream dtc and libfdt has continued. So this patch updates the in-kernel versions to match the recently released upstream dtc version 1.2.0. This includes a number of bugfixes, many cleanups and a few new features.

---

Probably should have gotten this ready for the last merge window, but I didn't, so I guess it's 2.6.28 material.

arch/powerpc/boot/dtc-src/Makefile.dtc +1 -17
Index: working-2.6/arch/powerpc/boot/dtc-src/Makefile.dtc
===================================================================
@@ -5,21 +5,5 @@
 #
 DTC_SRCS = dtc.c flattree.c fstree.c data.c livetree.c treesource.c srcpos.c \
 	checks.c
-DTC_EXTRA = dtc.h srcpos.h
-DTC_LEXFILES = dtc-lexer.l
-DTC_BISONFILES = dtc-parser.y
-
-DTC_LEX_SRCS = $(DTC_LEXFILES:%.l=%.lex.c)
-DTC_BISON_SRCS = $(DTC_BISONFILES:%.y=%.tab.c)
-DTC_BISON_INCLUDES = $(DTC_BISONFILES:%.y=%.tab.h)
-
-DTC_GEN_SRCS = $(DTC_LEX_SRCS) $(DTC_BISON_SRCS)
-DTC_GEN_ALL = $(DTC_GEN_SRCS) $(DTC_BISON_INCLUDES)
+DTC_GEN_SRCS = dtc-lexer.lex.c dtc-parser.tab.c
 DTC_OBJS = $(DTC_SRCS:%.c=%.o) $(DTC_GEN_SRCS:%.c=%.o)
-
-DTC_CLEANFILES = $(DTC_GEN_ALL)
-
-# We assume the containing Makefile system can do auto-dependencies for most
-# things, but we supply the dependencies on generated header files explicitly
-
-$(addprefix $(DTC_objdir)/,$(DTC_GEN_SRCS:%.c=%.o)): $(addprefix $(DTC_objdir)/,$(DTC_BISON_INCLUDES))
arch/powerpc/boot/dtc-src/checks.c +71 -234

346 lines not on this page · raw message

arch/powerpc/boot/dtc-src/data.c +31 -31

124 lines not on this page · raw message

arch/powerpc/boot/dtc-src/dtc-lexer.l +56 -64

284 lines not on this page · raw message

arch/powerpc/boot/dtc-src/dtc-lexer.lex.c_shipped +226 -213

799 lines not on this page · raw message

arch/powerpc/boot/dtc-src/dtc-parser.tab.c_shipped +222 -165

796 lines not on this page · raw message

arch/powerpc/boot/dtc-src/dtc-parser.tab.h_shipped +7 -5
Index: working-2.6/arch/powerpc/boot/dtc-src/dtc-parser.tab.h_shipped
===================================================================
@@ -48,7 +48,8 @@
      DT_BYTE = 264,
      DT_STRING = 265,
      DT_LABEL = 266,
-     DT_REF = 267
+     DT_REF = 267,
+     DT_INCBIN = 268
    };
 #endif
 /* Tokens.  */
@@ -62,22 +63,23 @@
 #define DT_STRING 265
 #define DT_LABEL 266
 #define DT_REF 267
+#define DT_INCBIN 268
 
 
 
 
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union YYSTYPE
-#line 34 "dtc-parser.y"
+#line 37 "dtc-parser.y"
 {
 	char *propnodename;
 	char *literal;
 	char *labelref;
 	unsigned int cbase;
-	u8 byte;
+	uint8_t byte;
 	struct data data;
 
-	u64 addr;
+	uint64_t addr;
 	cell_t cell;
 	struct property *prop;
 	struct property *proplist;
@@ -86,7 +88,7 @@
 	struct reserve_info *re;
 }
 /* Line 1489 of yacc.c.  */
-#line 90 "dtc-parser.tab.h"
+#line 92 "dtc-parser.tab.h"
 	YYSTYPE;
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
arch/powerpc/boot/dtc-src/dtc-parser.y +55 -12

127 lines not on this page · raw message

arch/powerpc/boot/dtc-src/dtc.c +18 -23

93 lines not on this page · raw message

arch/powerpc/boot/dtc-src/dtc.h +11 -34

97 lines not on this page · raw message

arch/powerpc/boot/dtc-src/flattree.c +85 -147

269 lines not on this page · raw message

arch/powerpc/boot/dtc-src/fstree.c +3 -5
Index: working-2.6/arch/powerpc/boot/dtc-src/fstree.c
===================================================================

Lines of this file are not shown. View the raw message.

arch/powerpc/boot/dtc-src/livetree.c +6 -3
Index: working-2.6/arch/powerpc/boot/dtc-src/livetree.c
===================================================================

Lines of this file are not shown. View the raw message.

arch/powerpc/boot/dtc-src/srcpos.c +66 -55

121 lines not on this page · raw message

arch/powerpc/boot/dtc-src/srcpos.h +21 -11
Index: working-2.6/arch/powerpc/boot/dtc-src/srcpos.h
===================================================================

Lines of this file are not shown. View the raw message.

arch/powerpc/boot/dtc-src/treesource.c +9 -6
Index: working-2.6/arch/powerpc/boot/dtc-src/treesource.c
===================================================================

Lines of this file are not shown. View the raw message.

arch/powerpc/boot/dtc-src/version_gen.h +1 -1
Index: working-2.6/arch/powerpc/boot/dtc-src/version_gen.h
===================================================================

Lines of this file are not shown. View the raw message.

arch/powerpc/boot/libfdt/Makefile.libfdt +1 -7
Index: working-2.6/arch/powerpc/boot/libfdt/Makefile.libfdt
===================================================================

Lines of this file are not shown. View the raw message.

arch/powerpc/boot/libfdt/fdt.c +53 -8

61 lines not on this page · raw message

arch/powerpc/boot/libfdt/fdt_ro.c +108 -225

333 lines not on this page · raw message

arch/powerpc/boot/libfdt/fdt_rw.c +109 -93

202 lines not on this page · raw message

arch/powerpc/boot/libfdt/fdt_strerror.c +19 -19
Index: working-2.6/arch/powerpc/boot/libfdt/fdt_strerror.c
===================================================================

Lines of this file are not shown. View the raw message.

arch/powerpc/boot/libfdt/fdt_sw.c +27 -28

55 lines not on this page · raw message

arch/powerpc/boot/libfdt/fdt_wip.c +5 -4
Index: working-2.6/arch/powerpc/boot/libfdt/fdt_wip.c
===================================================================

Lines of this file are not shown. View the raw message.

arch/powerpc/boot/libfdt/libfdt.h +369 -14

383 lines not on this page · raw message

arch/powerpc/boot/libfdt/libfdt_internal.h +15 -9
Index: working-2.6/arch/powerpc/boot/libfdt/libfdt_internal.h
===================================================================

Lines of this file are not shown. View the raw message.

arch/powerpc/boot/dtc-src/libfdt_env.h new file +23 -0
Index: working-2.6/arch/powerpc/boot/dtc-src/libfdt_env.h
===================================================================

Lines of this file are not shown. View the raw message.

arch/powerpc/boot/libfdt_env.h +1 -0
Index: working-2.6/arch/powerpc/boot/libfdt_env.h
===================================================================

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

Part of the diff is not shown here. View the raw message.