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@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"
On 06.11.2008 15:29, Carl-Daniel Hailfinger wrote:
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.
Thanks to Mart Raudsepp for spotting this oddness.
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@gmx.net
Updated patch, ready for commit.
Index: corebootv3-build_h_dependencies/lib/console.c =================================================================== --- corebootv3-build_h_dependencies/lib/console.c (Revision 1013) +++ 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 1013) +++ 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 1013) +++ 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 1013) +++ corebootv3-build_h_dependencies/util/x86emu/include/x86emu/x86emu.h (Arbeitskopie) @@ -43,7 +43,7 @@ #define __X86EMU_X86EMU_H
/* FIXME: undefine printk for the moment */ -#ifdef COREBOOT_VERSION +#if 1 /* Coreboot needs to map prinkf to printk. */ #include <console.h> #define printk(x...) printk(BIOS_DEBUG, x) #else Index: corebootv3-build_h_dependencies/util/x86emu/x86emu/sys.c =================================================================== --- corebootv3-build_h_dependencies/util/x86emu/x86emu/sys.c (Revision 1013) +++ corebootv3-build_h_dependencies/util/x86emu/x86emu/sys.c (Arbeitskopie) @@ -45,7 +45,7 @@ #include <x86emu/regs.h> #include "debug.h" #include "prim_ops.h" -#ifdef COREBOOT_VERSION +#if 1 /* Coreboot needs to map prinkf to printk. */ #include "io.h" #else #include <sys/io.h> Index: corebootv3-build_h_dependencies/arch/x86/coreboot_table.c =================================================================== --- corebootv3-build_h_dependencies/arch/x86/coreboot_table.c (Revision 1013) +++ 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 1013) +++ corebootv3-build_h_dependencies/arch/x86/Makefile (Arbeitskopie) @@ -248,6 +248,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"
On 13.11.2008 03:50, Carl-Daniel Hailfinger wrote:
On 06.11.2008 15:29, Carl-Daniel Hailfinger wrote:
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.
Thanks to Mart Raudsepp for spotting this oddness.
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@gmx.net
Updated patch, ready for commit.
Thanks to Stefan for the quick review!
Committed in r1036.
Regards, Carl-Daniel
On Mon, Nov 17, 2008 at 12:01:16AM +0100, Carl-Daniel Hailfinger wrote:
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@gmx.net
Updated patch, ready for commit.
Thanks to Stefan for the quick review!
Committed in r1036.
For those of you who wonder where this Acked-by is coming from: no, you didn't miss any emails, the ack was on IRC.
Uwe.