arm64: make secmon link with the manual template

Secmon needs a special build rule because of the objcopy -B
operation required to include it in ramstage. Utilize the
manual template so builds continue to work with upcoming
build chnages.

Note: secmon is actually missing symbols still so those
still need to be addressed. That looks to be as if
--gc-sections isn't be honored, but I'm actually thinking
the symbols are just erroneously carried over as the
references for these symbols don't show up in the
symbol table:
 U coreboot_build
 U coreboot_extra_version
 U coreboot_version
 U default_baudrate
 U lb_add_console
 U lb_add_serial
 U uart_baudrate_divisor

Change-Id: I41c75e93536b73c4304ef3a87dc39d448d1f00d4
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/9300
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
Aaron Durbin 2015-04-03 20:33:39 -05:00 committed by Patrick Georgi
parent 1ea2e76035
commit 8adf1bf2f3
1 changed files with 10 additions and 10 deletions

View File

@ -23,10 +23,10 @@ $(eval $(call create_class_compiler,secmon,arm64))
SECMON_DIR=$(obj)/arch/arm64/armv8/secmon SECMON_DIR=$(obj)/arch/arm64/armv8/secmon
SECMON_BIN=$(SECMON_DIR)/secmon SECMON_BIN=$(SECMON_DIR)/secmon
SECMON_OBJ=$(SECMON_DIR)/secmon.o SECMON_OBJ=$(SECMON_BIN).o
SECMON_ELF=$(SECMON_DIR)/secmon.elf SECMON_ELF=$(SECMON_BIN).elf
SECMON_RMOD=$(SECMON_DIR)/secmon.elf.rmod SECMON_RMOD=$(SECMON_ELF).rmod
SECMON_RAMSTAGE=$(SECMON_DIR)/secmon.ramstage.o SECMON_RAMSTAGE=$(SECMON_DIR)/secmon.manual
secmon-generic-ccopts += -I$(src)/arch/arm64/include/armv8/ -include $(src)/include/kconfig.h -D__SECMON__ secmon-generic-ccopts += -I$(src)/arch/arm64/include/armv8/ -include $(src)/include/kconfig.h -D__SECMON__
@ -38,7 +38,7 @@ secmon-y += ../exception.c
secmon-y += ../../cpu.c secmon-y += ../../cpu.c
secmon-y += ../../transition_asm.S ../../transition.c secmon-y += ../../transition_asm.S ../../transition.c
ramstage-srcs += $(SECMON_BIN).o ramstage-srcs += $(SECMON_RAMSTAGE)
$(SECMON_OBJ): $$(secmon-objs) $(SECMON_OBJ): $$(secmon-objs)
$(CC_secmon) $(LDFLAGS) -nostdlib -r -o $@ $^ $(CC_secmon) $(LDFLAGS) -nostdlib -r -o $@ $^
@ -48,6 +48,6 @@ $(eval $(call rmodule_link,$(SECMON_ELF), $(SECMON_OBJ), 0,arm64))
$(SECMON_BIN): $(SECMON_RMOD) $(SECMON_BIN): $(SECMON_RMOD)
$(OBJCOPY_secmon) -O binary $< $@ $(OBJCOPY_secmon) -O binary $< $@
$(SECMON_RAMSTAGE): $(SECMON_BIN) $(SECMON_BIN).ramstage.manual: $(SECMON_BIN)
@printf " OBJCOPY $(subst $(obj)/,,$(@))\n" @printf " OBJCOPY $(subst $(obj)/,,$(@))\n"
cd $(dir $@); $(OBJCOPY_secmon) -I binary $(notdir $<) -O elf64-littleaarch64 -B aarch64 $(notdir $@) cd $(dir $@); $(OBJCOPY_secmon) -I binary $(notdir $<) -O elf64-littleaarch64 -B aarch64 $(notdir $@)