From 01532938877e8f4eb54ed5cf617724022fb263a2 Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Sun, 16 Nov 2008 22:59:52 +0000 Subject: [PATCH] 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 Acked-by: Stefan Reinauer git-svn-id: svn://coreboot.org/repository/coreboot-v3@1036 f3766cd6-281f-0410-b1cd-43a5c92072e9 --- Makefile | 3 +-- arch/x86/Makefile | 5 +++++ arch/x86/coreboot_table.c | 1 + lib/Makefile | 5 +++++ lib/console.c | 1 + util/x86emu/include/x86emu/x86emu.h | 2 +- util/x86emu/x86emu/sys.c | 2 +- 7 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 35022b3089..ae1c2f6f03 100644 --- a/Makefile +++ b/Makefile @@ -88,8 +88,7 @@ COREBOOTINCLUDE := -I$(src) -Iinclude \ -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)) diff --git a/arch/x86/Makefile b/arch/x86/Makefile index f83137e0f9..0d81141505 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -248,6 +248,11 @@ $(obj)/coreboot.stage2 $(obj)/coreboot.stage2.map: $(obj)/stage0.o $(STAGE2_OBJ_ # 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" diff --git a/arch/x86/coreboot_table.c b/arch/x86/coreboot_table.c index 536767b153..8c55a73e55 100644 --- a/arch/x86/coreboot_table.c +++ b/arch/x86/coreboot_table.c @@ -31,6 +31,7 @@ //#include //#include //#include +#include struct lb_header *lb_table_init(unsigned long addr) { diff --git a/lib/Makefile b/lib/Makefile index afbff92ad8..f67c30f6ce 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -44,6 +44,11 @@ else 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" diff --git a/lib/console.c b/lib/console.c index 0eda0b1e49..4156feed51 100644 --- a/lib/console.c +++ b/lib/console.c @@ -6,6 +6,7 @@ #include #include #include +#include int vtxprintf(void (*)(unsigned char, void *arg), void *arg, const char *, va_list); diff --git a/util/x86emu/include/x86emu/x86emu.h b/util/x86emu/include/x86emu/x86emu.h index 0310516ca7..be05eb6337 100644 --- a/util/x86emu/include/x86emu/x86emu.h +++ b/util/x86emu/include/x86emu/x86emu.h @@ -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 #define printk(x...) printk(BIOS_DEBUG, x) #else diff --git a/util/x86emu/x86emu/sys.c b/util/x86emu/x86emu/sys.c index 16cd3207ef..0eac6a3a10 100644 --- a/util/x86emu/x86emu/sys.c +++ b/util/x86emu/x86emu/sys.c @@ -45,7 +45,7 @@ #include #include "debug.h" #include "prim_ops.h" -#ifdef COREBOOT_VERSION +#if 1 /* Coreboot needs to map prinkf to printk. */ #include "io.h" #else #include