armv8/secmon: SECMON_SRC is really SECMON_BIN
It points to a binary. This is inspired by the commit listed below, but rewritten to match upstream, and split in smaller pieces to keep intent clear. Change-Id: I164d7f717a9523d187e2c215083e176b59fd5acc Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Based-On-Change-Id: I50af7dacf616e0f8ff4c43f4acc679089ad7022b Based-On-Signed-off-by: Julius Werner <jwerner@chromium.org> Based-On-Reviewed-on: https://chromium-review.googlesource.com/219170 Reviewed-on: http://review.coreboot.org/9113 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
parent
70a6b4f931
commit
68bfe16b44
|
@ -22,7 +22,7 @@
|
||||||
$(eval $(call create_class_compiler,secmon,arm64))
|
$(eval $(call create_class_compiler,secmon,arm64))
|
||||||
|
|
||||||
SECMON_DIR=$(obj)/arch/arm64/armv8/secmon
|
SECMON_DIR=$(obj)/arch/arm64/armv8/secmon
|
||||||
SECMON_SRC=$(SECMON_DIR)/secmon
|
SECMON_BIN=$(SECMON_DIR)/secmon
|
||||||
SECMON_OBJ=$(SECMON_DIR)/secmon.o
|
SECMON_OBJ=$(SECMON_DIR)/secmon.o
|
||||||
SECMON_ELF=$(SECMON_DIR)/secmon.elf
|
SECMON_ELF=$(SECMON_DIR)/secmon.elf
|
||||||
SECMON_RMOD=$(SECMON_DIR)/secmon.elf.rmod
|
SECMON_RMOD=$(SECMON_DIR)/secmon.elf.rmod
|
||||||
|
@ -39,16 +39,16 @@ 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_SRC)
|
ramstage-srcs += $(SECMON_BIN)
|
||||||
|
|
||||||
$(SECMON_OBJ): $$(secmon-objs)
|
$(SECMON_OBJ): $$(secmon-objs)
|
||||||
$(CC_secmon) $(LDFLAGS) -nostdlib -r -o $@ $^
|
$(CC_secmon) $(LDFLAGS) -nostdlib -r -o $@ $^
|
||||||
|
|
||||||
$(eval $(call rmodule_link,$(SECMON_ELF), $(SECMON_OBJ), 0,arm64))
|
$(eval $(call rmodule_link,$(SECMON_ELF), $(SECMON_OBJ), 0,arm64))
|
||||||
|
|
||||||
$(SECMON_SRC): $(SECMON_RMOD)
|
$(SECMON_BIN): $(SECMON_RMOD)
|
||||||
$(OBJCOPY_secmon) -O binary $< $@
|
$(OBJCOPY_secmon) -O binary $< $@
|
||||||
|
|
||||||
$(SECMON_RAMSTAGE): $(SECMON_SRC)
|
$(SECMON_RAMSTAGE): $(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 $@)
|
||||||
|
|
Loading…
Reference in New Issue