Stefan Reinauer (stefan.reinauer@coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11090
-gerrit
commit 835d9fb8c9d9ba39bc7b7f01c8f4bed627243a8e Author: Stefan Reinauer reinauer@chromium.org Date: Thu Jul 30 18:03:18 2015 -0700
ridiculously random ramblings
Change-Id: Id5dea6420bee02a044dc488b5086d109e806d605 Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org --- src/arch/x86/Makefile.inc | 2 +- src/cpu/x86/Makefile.inc | 6 +----- src/cpu/x86/smm/Makefile.inc | 12 ++---------- src/lib/Makefile.inc | 8 ++++---- 4 files changed, 8 insertions(+), 20 deletions(-)
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc index d5b320f..5188e6f 100644 --- a/src/arch/x86/Makefile.inc +++ b/src/arch/x86/Makefile.inc @@ -259,7 +259,7 @@ ifeq ($(CONFIG_ARCH_RAMSTAGE_X86_32),y) target-objcopy=-O elf32-i386 -B i386 endif ifeq ($(CONFIG_ARCH_RAMSTAGE_X86_64),y) -target-objcopy=-O elf64-x86_64 -B x86_64 +target-objcopy=-O elf64-x86-64 -B i386:x86-64 endif
define ramstage-objs_aml_template diff --git a/src/cpu/x86/Makefile.inc b/src/cpu/x86/Makefile.inc index 9ec0768..fb9ea2d 100644 --- a/src/cpu/x86/Makefile.inc +++ b/src/cpu/x86/Makefile.inc @@ -30,8 +30,4 @@ $(SIPI_BIN): $(SIPI_RMOD)
$(SIPI_BIN).ramstage.manual: $(SIPI_BIN) @printf " OBJCOPY $(subst $(obj)/,,$(@))\n" -ifeq ($(CONFIG_ARCH_RAMSTAGE_X86_32),y) - cd $(dir $@); $(OBJCOPY_rmodules_$(ARCH-ramstage-y)) -I binary $(notdir $<) -O elf32-i386 -B i386 $(notdir $@) -else - cd $(dir $@); $(OBJCOPY_rmodules_$(ARCH-ramstage-y)) -I binary $(notdir $<) -O elf64-x86_64 -B x86_64 $(notdir $@) -endif + cd $(dir $@); $(OBJCOPY_rmodules_$(ARCH-ramstage-y)) -I binary $(notdir $<) $(target-objcopy) $(notdir $@) diff --git a/src/cpu/x86/smm/Makefile.inc b/src/cpu/x86/smm/Makefile.inc index 2e61018..adf9b38 100644 --- a/src/cpu/x86/smm/Makefile.inc +++ b/src/cpu/x86/smm/Makefile.inc @@ -38,11 +38,7 @@ $(obj)/cpu/x86/smm/smm.o: $$(smm-objs) $(COMPILER_RT_smm) # ELF symbol names. $(obj)/cpu/x86/smm/smm.ramstage.manual: $(obj)/cpu/x86/smm/smm @printf " OBJCOPY $(subst $(obj)/,,$(@))\n" -ifeq ($(CONFIG_ARCH_RAMSTAGE_X86_32),y) - cd $(dir $@); $(OBJCOPY_smm) -I binary $(notdir $<) -O elf32-i386 -B i386 $(notdir $@) -else - cd $(dir $@); $(OBJCOPY_smm) -I binary $(notdir $<) -O elf64-x86_64 -B x86_64 $(notdir $@) -endif + cd $(dir $@); $(OBJCOPY_smm) -I binary $(notdir $<) $(target-objcopy) $(notdir $@)
ifeq ($(CONFIG_SMM_TSEG),y)
@@ -72,11 +68,7 @@ $(obj)/cpu/x86/smm/smmstub: $(obj)/cpu/x86/smm/smmstub.elf.rmod
$(obj)/cpu/x86/smm/smmstub.ramstage.manual: $(obj)/cpu/x86/smm/smmstub @printf " OBJCOPY $(subst $(obj)/,,$(@))\n" -ifeq ($(CONFIG_ARCH_RAMSTAGE_X86_32),y) - cd $(dir $@); $(OBJCOPY_smmstub) -I binary $(notdir $<) -O elf32-i386 -B i386 $(notdir $@) -else - cd $(dir $@); $(OBJCOPY_smmstub) -I binary $(notdir $<) -O elf64-x86_64 -B x86_64 $(notdir $@) -endif + cd $(dir $@); $(OBJCOPY_smmstub) -I binary $(notdir $<) $(target-objcopy) $(notdir $@)
# C-based SMM handler.
diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc index bda7586..89a29d9 100644 --- a/src/lib/Makefile.inc +++ b/src/lib/Makefile.inc @@ -94,6 +94,7 @@ romstage-y += compute_ip_checksum.c ifeq ($(CONFIG_COMPILER_GCC),y) romstage-$(CONFIG_ARCH_ROMSTAGE_X86_32) += gcc.c ramstage-$(CONFIG_ARCH_RAMSTAGE_X86_32) += gcc.c +smm-$(CONFIG_ARCH_RAMSTAGE_X86_32) += gcc.c endif
romstage-$(CONFIG_GENERIC_UDELAY) += timer.c @@ -162,11 +163,10 @@ ramstage-y += region.c romstage-y += boot_device.c ramstage-y += boot_device.c
-smm-y += region.c +smm-y += region.c mem_pool.c smm-y += boot_device.c -smm-y += fmap.c -smm-y += cbfs.c memcmp.c -smm-$(CONFIG_COMPILER_GCC) += gcc.c +smm-y += fmap.c memcmp.c +smm-y += cbfs.c
bootblock-y += version.c romstage-y += version.c