[coreboot] [PATCH] Fix v3 build dependencies on build.h

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Thu Nov 6 15:29:13 CET 2008


Not a single file is being rebuilt in v3 if build.h changes. That means
the console banner and the option table will never be updated with more
recent build.h strings.

The fix is not yet ready for committing because the x86emu changes could
be avoided if someone fixed two or three lines in x86emu. Hint: x86emu
doesn't care about the contents of build.h, it just uses build.h to
check whether it is compiled in conjunction with coreboot.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>

Index: corebootv3-build_h_dependencies/lib/console.c
===================================================================
--- corebootv3-build_h_dependencies/lib/console.c	(Revision 984)
+++ corebootv3-build_h_dependencies/lib/console.c	(Arbeitskopie)
@@ -6,6 +6,7 @@
 #include <stdarg.h>
 #include <string.h>
 #include <globalvars.h>
+#include <build.h>
 
 int vtxprintf(void (*)(unsigned char, void *arg), 
 		void *arg, const char *, va_list);
Index: corebootv3-build_h_dependencies/lib/Makefile
===================================================================
--- corebootv3-build_h_dependencies/lib/Makefile	(Revision 984)
+++ corebootv3-build_h_dependencies/lib/Makefile	(Arbeitskopie)
@@ -44,6 +44,11 @@
 nrv2b:
 endif
 
+$(obj)/lib/console.o: $(src)/lib/console.c $(obj)/build.h
+	$(Q)mkdir -p $(dir $@)
+	$(Q)printf "  CC      $(subst $(shell pwd)/,,$(@))\n"
+	$(Q)$(CC) $(INITCFLAGS) -c $< -o $@
+
 $(obj)/lib/%.o: $(src)/lib/%.c
 	$(Q)mkdir -p $(dir $@)
 	$(Q)printf "  CC      $(subst $(shell pwd)/,,$(@))\n"
Index: corebootv3-build_h_dependencies/Makefile
===================================================================
--- corebootv3-build_h_dependencies/Makefile	(Revision 984)
+++ corebootv3-build_h_dependencies/Makefile	(Arbeitskopie)
@@ -88,8 +88,7 @@
 			-I$(src)/include \
 			-I$(src)/include/arch/$(ARCH)/ \
 			-I$(src)/mainboard/$(MAINBOARDDIR)/ \
-			-include $(obj)/config.h \
-			-include $(obj)/build.h
+			-include $(obj)/config.h
 
 CC := $(CC_$(ARCH))
 AS := $(AS_$(ARCH))
Index: corebootv3-build_h_dependencies/util/x86emu/include/x86emu/x86emu.h
===================================================================
--- corebootv3-build_h_dependencies/util/x86emu/include/x86emu/x86emu.h	(Revision 984)
+++ corebootv3-build_h_dependencies/util/x86emu/include/x86emu/x86emu.h	(Arbeitskopie)
@@ -43,6 +43,7 @@
 #define __X86EMU_X86EMU_H
 
 /* FIXME: undefine printk for the moment */
+#include <build.h>
 #ifdef COREBOOT_VERSION
 #include <console.h>
 #define printk(x...) printk(BIOS_DEBUG, x)
Index: corebootv3-build_h_dependencies/util/x86emu/Makefile
===================================================================
--- corebootv3-build_h_dependencies/util/x86emu/Makefile	(Revision 984)
+++ corebootv3-build_h_dependencies/util/x86emu/Makefile	(Arbeitskopie)
@@ -44,7 +44,7 @@
 # This rule is also valid for all subdirectories
 #
 
-$(obj)/util/x86emu/%.o: $(src)/util/x86emu/%.c
+$(obj)/util/x86emu/%.o: $(src)/util/x86emu/%.c $(obj)/build.h
 	$(Q)mkdir -p $(dir $@)
 	$(Q)printf "  CC      $(subst $(shell pwd)/,,$(@))\n"
 	$(Q)$(CC) $(INITCFLAGS) -I$(src)/util/x86emu/include -c $< -o $@
Index: corebootv3-build_h_dependencies/arch/x86/coreboot_table.c
===================================================================
--- corebootv3-build_h_dependencies/arch/x86/coreboot_table.c	(Revision 984)
+++ corebootv3-build_h_dependencies/arch/x86/coreboot_table.c	(Arbeitskopie)
@@ -31,6 +31,7 @@
 //#include <pirq_routing.h>
 //#include <smp/mpspec.h>
 //#include <acpi.h>
+#include <build.h>
 
 struct lb_header *lb_table_init(unsigned long addr)
 {
Index: corebootv3-build_h_dependencies/arch/x86/Makefile
===================================================================
--- corebootv3-build_h_dependencies/arch/x86/Makefile	(Revision 984)
+++ corebootv3-build_h_dependencies/arch/x86/Makefile	(Arbeitskopie)
@@ -243,6 +243,11 @@
 # Build rules.
 #
 
+$(obj)/arch/x86/coreboot_table.o: $(src)/arch/x86/coreboot_table.c $(obj)/build.h
+	$(Q)mkdir -p $(dir $@)
+	$(Q)printf "  CC      $(subst $(shell pwd)/,,$(@))\n"
+	$(Q)$(CC) $(INITCFLAGS) -c $< -o $@
+	
 $(obj)/arch/x86/%.o: $(src)/arch/x86/%.c
 	$(Q)mkdir -p $(dir $@)
 	$(Q)printf "  CC      $(subst $(shell pwd)/,,$(@))\n"


-- 
http://www.hailfinger.org/





More information about the coreboot mailing list