vboot: split class in library and stage
The build system includes a bunch of files into verstage that also exist in romstage - generic drivers etc. These create link time conflicts when trying to link both the verstage copy and romstage copy together in a combined configuration, so separate "stage" parts (that allow things to run) from "library" parts (that contain the vboot specifics). Change-Id: Ieed910fcd642693e5e89e55f3e6801887d94462f Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/10041 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
committed by
Patrick Georgi
parent
8ef8afbb38
commit
27ef602fab
@@ -73,9 +73,9 @@ endif # CONFIG_ARCH_BOOTBLOCK_ARM
|
||||
|
||||
ifeq ($(CONFIG_ARCH_VERSTAGE_ARM),y)
|
||||
|
||||
$(objcbfs)/verstage.debug: $(objgenerated)/libverstage.a $(obj)/mainboard/$(MAINBOARDDIR)/memlayout.verstage.ld
|
||||
$(objcbfs)/verstage.debug: $(objgenerated)/libverstage.a $$(verstage-objs) $(obj)/mainboard/$(MAINBOARDDIR)/memlayout.verstage.ld
|
||||
@printf " LINK $(subst $(obj)/,,$(@))\n"
|
||||
$(LD_verstage) --gc-sections -static -o $@ -L$(obj) -T $(obj)/mainboard/$(MAINBOARDDIR)/memlayout.verstage.ld --start-group $(objgenerated)/libverstage.a --end-group
|
||||
$(LD_verstage) --gc-sections -static -o $@ -L$(obj) -T $(obj)/mainboard/$(MAINBOARDDIR)/memlayout.verstage.ld --start-group $(objgenerated)/libverstage.a $$(verstage-objs) --end-group
|
||||
|
||||
verstage-y += div0.c
|
||||
verstage-y += eabi_compat.c
|
||||
|
@@ -45,6 +45,8 @@ endif # CONFIG_ARCH_BOOTBLOCK_ARMV4
|
||||
################################################################################
|
||||
|
||||
ifeq ($(CONFIG_ARCH_VERSTAGE_ARMV4),y)
|
||||
libverstage-c-ccopts += $(armv4_flags)
|
||||
libverstage-S-ccopts += $(armv4_flags)
|
||||
verstage-c-ccopts += $(armv4_flags)
|
||||
verstage-S-ccopts += $(armv4_flags)
|
||||
|
||||
|
@@ -66,6 +66,8 @@ bootblock-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c
|
||||
################################################################################
|
||||
|
||||
ifeq ($(CONFIG_ARCH_VERSTAGE_ARMV7),y)
|
||||
libverstage-c-ccopts += $(armv7-a_flags)
|
||||
libverstage-S-ccopts += $(armv7-a_asm_flags)
|
||||
verstage-c-ccopts += $(armv7-a_flags)
|
||||
verstage-S-ccopts += $(armv7-a_asm_flags)
|
||||
|
||||
@@ -76,6 +78,8 @@ verstage-y += exception_asm.S
|
||||
verstage-y += mmu.c
|
||||
|
||||
else ifeq ($(CONFIG_ARCH_VERSTAGE_ARMV7_M),y)
|
||||
libverstage-c-ccopts += $(armv7-m_flags)
|
||||
libverstage-S-ccopts += $(armv7-m_asm_flags)
|
||||
verstage-c-ccopts += $(armv7-m_flags)
|
||||
verstage-S-ccopts += $(armv7-m_asm_flags)
|
||||
|
||||
|
@@ -84,9 +84,9 @@ endif # CONFIG_ARCH_BOOTBLOCK_ARM64
|
||||
|
||||
ifeq ($(CONFIG_ARCH_VERSTAGE_ARM64),y)
|
||||
|
||||
$(objcbfs)/verstage.debug: $(objgenerated)/libverstage.a $(obj)/mainboard/$(MAINBOARDDIR)/memlayout.verstage.ld $(obj)/config.h
|
||||
$(objcbfs)/verstage.debug: $(objgenerated)/libverstage.a $$(verstage-objs) $(obj)/mainboard/$(MAINBOARDDIR)/memlayout.verstage.ld $(obj)/config.h
|
||||
@printf " LINK $(subst $(obj)/,,$(@))\n"
|
||||
$(LD_verstage) --gc-sections -static -o $@ -L$(obj) --start-group $(objgenerated)/libverstage.a --end-group -T $(obj)/mainboard/$(MAINBOARDDIR)/memlayout.verstage.ld
|
||||
$(LD_verstage) --gc-sections -static -o $@ -L$(obj) --start-group $(objgenerated)/libverstage.a $$(verstage-objs)--end-group -T $(obj)/mainboard/$(MAINBOARDDIR)/memlayout.verstage.ld
|
||||
|
||||
verstage-$(CONFIG_EARLY_CONSOLE) += early_console.c
|
||||
verstage-y += div0.c
|
||||
|
@@ -56,6 +56,8 @@ verstage-y += cpu.S
|
||||
verstage-y += cache_helpers.S
|
||||
verstage-y += exception.c
|
||||
|
||||
libverstage-c-ccopts += $(armv8_flags)
|
||||
libverstage-S-ccopts += $(armv8_asm_flags)
|
||||
verstage-c-ccopts += $(armv8_flags)
|
||||
verstage-S-ccopts += $(armv8_asm_flags)
|
||||
|
||||
|
Reference in New Issue
Block a user