aboutsummaryrefslogtreecommitdiff
path: root/src/soc/qualcomm/ipq806x/Makefile.inc
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/qualcomm/ipq806x/Makefile.inc')
-rw-r--r--src/soc/qualcomm/ipq806x/Makefile.inc21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/soc/qualcomm/ipq806x/Makefile.inc b/src/soc/qualcomm/ipq806x/Makefile.inc
index 2487f46ab2..1da8489eda 100644
--- a/src/soc/qualcomm/ipq806x/Makefile.inc
+++ b/src/soc/qualcomm/ipq806x/Makefile.inc
@@ -7,12 +7,25 @@ romstage-y += timer.c
ramstage-y += cbfs.c
ramstage-y += timer.c
-ifeq ($(CONFIG_MBN_ENCAPSULATION),y)
+ifeq ($(CONFIG_USE_BLOBS),y)
-$(objcbfs)/%.bin: $(objcbfs)/%.elf
+# Generate the actual coreboot bootblock code
+$(objcbfs)/bootblock.raw: $(objcbfs)/bootblock.elf
@printf " OBJCOPY $(subst $(obj)/,,$(@))\n"
- $(OBJCOPY_bootblock) -O binary $< $@.prembn
+ $(OBJCOPY_bootblock) -O binary $< $@.tmp
+ @mv $@.tmp $@
+
+# Add MBN header to allow SBL3 to start coreboot bootblock
+$(objcbfs)/bootblock.mbn: $(objcbfs)/bootblock.raw
@printf " ADD MBN $(subst $(obj)/,,$(@))\n"
- ./util/ipqheader/ipqheader.py $(CONFIG_BOOTBLOCK_BASE) $@.prembn $@.tmp
+ ./util/ipqheader/ipqheader.py $(CONFIG_BOOTBLOCK_BASE) $< $@.tmp
@mv $@.tmp $@
+
+# Create a complete bootblock which will start up the system
+$(objcbfs)/bootblock.bin: ./$(call strip_quotes,$(CONFIG_SBL_BLOB)) \
+ $(objcbfs)/bootblock.mbn
+ @printf " CAT $(subst $(obj)/,,$(@))\n"
+ @cat $^ > $@.tmp
+ @mv $@.tmp $@
+
endif