[coreboot-gerrit] Patch set updated for coreboot: e212a11 AGESA stub 00730F01: Add config.h and kconfig.h to Makefile.inc

Bruce Griffith (Bruce.Griffith@se-eng.com) gerrit at coreboot.org
Fri Sep 26 21:28:03 CEST 2014


Bruce Griffith (Bruce.Griffith at se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6979

-gerrit

commit e212a1145eb8625b4c193f6a1d3088b4873c7d1c
Author: Bruce Griffith <Bruce.Griffith at se-eng.com>
Date:   Thu Sep 25 16:45:45 2014 -0600

    AGESA stub 00730F01: Add config.h and kconfig.h to Makefile.inc
    
    The static library builder for the stub that interfaces to the
    AGESA binary does not include config.h and kconfig.h, so any
    header file changes that depend on Kconfig variables fail.  Force
    these two system headers to be included in the build of any AGESA
    stub files.
    
    Signed-off-by: Bruce Griffith <Bruce.Griffith at se-eng.com>
    Change-Id: I2e8d38fa5aa21cc31b995ee3abe68ab3c3c55a68
---
 src/vendorcode/amd/pi/00730F01/Makefile.inc | 41 ++++++++++++++++++-----------
 1 file changed, 26 insertions(+), 15 deletions(-)

diff --git a/src/vendorcode/amd/pi/00730F01/Makefile.inc b/src/vendorcode/amd/pi/00730F01/Makefile.inc
index 2e24719..545d596 100644
--- a/src/vendorcode/amd/pi/00730F01/Makefile.inc
+++ b/src/vendorcode/amd/pi/00730F01/Makefile.inc
@@ -33,7 +33,7 @@ AGESA_ROOT = $(call strip_quotes,$(src)/../$(CONFIG_AGESA_BINARY_PI_PATH))
 
 AGESA_INC = -I$(obj)
 
-AGESA_INC += -Isrc/mainboard/$(MAINBOARDDIR)
+AGESA_INC += -I$(src)/mainboard/$(MAINBOARDDIR)
 AGESA_INC += -I$(AGESA_ROOT)/binaryPI
 AGESA_INC += -I$(AGESA_ROOT)
 AGESA_INC += -I$(AGESA_ROOT)/Include
@@ -49,29 +49,40 @@ AGESA_INC += -I$(AGESA_ROOT)/Proc/Fch/Common
 
 AGESA_INC += -I$(src)/southbridge/amd/agesa/hudson
 
-AGESA_INC += -Isrc/arch/x86/include
-AGESA_INC += -Isrc/include
+AGESA_INC += -I$(src)/arch/x86/include
+AGESA_INC += -I$(src)/include
 
-CFLAGS_x86_32 += -march=amdfam10 -mno-3dnow -fno-zero-initialized-in-bss -fno-strict-aliasing
+AGESA_CFLAGS += -march=amdfam10 -mno-3dnow -fno-zero-initialized-in-bss -fno-strict-aliasing
+CFLAGS_x86_32 += $(AGESA_CFLAGS)
 
 export AGESA_ROOT := $(AGESA_ROOT)
 export AGESA_INC  := $(AGESA_INC)
 export AGESA_CFLAGS  := $(AGESA_CFLAGS)
+
 CC_bootblock := $(CC_bootblock) $(AGESA_INC) $(AGESA_CFLAGS)
 CC_romstage := $(CC_romstage) $(AGESA_INC) $(AGESA_CFLAGS)
 CC_ramstage := $(CC_ramstage) $(AGESA_INC) $(AGESA_CFLAGS)
 CC_x86_32 := $(CC_x86_32) $(AGESA_INC) $(AGESA_CFLAGS)
+
 #######################################################################
 
 define create_agesa_cp_template
 
 # $1 AGESA source file
 # $2 AGESA copy-to location
-$(agesa_obj_path)/$1: $2
-	@printf "    AGESA      Copying $$(notdir $$(@F)) => $$(@D)\n"
-	cp -pf $$? $$(@D)
-
-libAgesa.$1: $(agesa_obj_path) $(agesa_obj_path)/$1
+$(agesa_src_copies_path)/$(notdir $2): $2 $(agesa_src_copies_path)
+	@printf "    AGESA      Copying $$(notdir $2) => $$(@D)\n"
+	if [ ! -r $(agesa_src_copies_path)/$(notdir $2) ]; then                   \
+		cp -uf $2 $$(@D);                                                     \
+	fi
+
+$(agesa_obj_path)/$1.libagesa.o: $(agesa_src_copies_path)/$(notdir $2) $(obj)/config.h $(agesa_obj_path)
+	@printf "    CC         $(subst $(agesa_obj_path)/,,$$(@))\n"
+	$(CC_libagesa) -c -MMD $(CFLAGS_libagesa) $(AGESA_CFLAGS)                 \
+	               $(AGESA_INC)                                               \
+	               -include $(obj)/config.h -include $(src)/include/kconfig.h \
+	               -o $$@                                                     \
+	               $(agesa_src_copies_path)/$(notdir $2)
 
 endef
 
@@ -83,17 +94,17 @@ $(eval $(call create_class_compiler,libagesa,x86_32))
 
 agesa_src_files := $(strip $(sort $(foreach file,$(strip $(agesa_raw_files)),$(call strip_quotes,$(file)))))
 agesa_obj_path := $(strip $(obj)/agesa)
+agesa_src_copies_path := $(strip $(obj)/agesa)
 agesa_src_copies := $(strip $(foreach file,$(agesa_src_files),$(agesa_obj_path)/$(notdir $(file))))
 agesa_obj_copies := $(strip $(agesa_src_copies:.c=.libagesa.o))
 
-$(agesa_obj_path):
-	mkdir $@
+$(agesa_src_path):
+	mkdir -p $@
 
-$(foreach file,$(strip $(agesa_src_files)),$(eval $(call create_agesa_cp_template,$(notdir $(file)),$(file))))
+$(agesa_obj_path):
+	mkdir -p $@
 
-$(agesa_obj_path)/%.libagesa.o: libAgesa.%.c
-	@printf "    CC         $(subst $(agesa_obj_path)/,,$(@))\n"
-	$(CC_libagesa) -MMD $(CFLAGS_libagesa) $(AGESA_INC) -c -o $@ $(agesa_obj_path)/$*.c
+$(foreach file,$(strip $(agesa_src_files)),$(eval $(call create_agesa_cp_template,$(basename $(notdir $(file))),$(file))))
 
 $(obj)/agesa/libagesa.00730F01.a: $(agesa_obj_copies)
 	@printf "    AGESA      $(subst $(agesa_obj_path)/,,$(@))\n"



More information about the coreboot-gerrit mailing list