aboutsummaryrefslogtreecommitdiff
path: root/src/soc/broadcom
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/broadcom')
-rw-r--r--src/soc/broadcom/cygnus/Makefile.inc41
1 files changed, 40 insertions, 1 deletions
diff --git a/src/soc/broadcom/cygnus/Makefile.inc b/src/soc/broadcom/cygnus/Makefile.inc
index a1459c0790..dce4e3d0b1 100644
--- a/src/soc/broadcom/cygnus/Makefile.inc
+++ b/src/soc/broadcom/cygnus/Makefile.inc
@@ -57,6 +57,45 @@ ramstage-$(CONFIG_DRIVERS_UART) += ns16550.c
CPPFLAGS_common += -Isrc/soc/broadcom/cygnus/include/
-$(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.elf
+$(objcbfs)/bootblock.tmp: $(objcbfs)/bootblock.elf
@printf " OBJCOPY $(subst $(obj)/,,$(@))\n"
$(OBJCOPY_bootblock) -O binary $< $@
+
+ifneq ($(V),1)
+redirect := > /dev/null
+endif
+
+# Options used in the command line:
+# -out: path of the output file
+# -config: path to the file containing unauth header
+# -hmac: path to the file containing hmac for sha256
+# -bl: boot image file, ie. input file
+#
+# Authenticated header parameters:
+#
+# SBIConfiguration /* Indicates SBI config */
+# SYMMETRIC 0x0040
+#
+# CustomerID; /* Customer ID */
+# TYPE bits [31-28]
+# PRODUCTION 0x6
+# DEVELOPMENT 0x9
+# CUSTOMER_ID bits [27-0]
+#
+# ProductID; /* Product ID */
+#
+# CustomerRevisionID; /* Customer Revision ID */
+#
+# SBIUsage /* Boot Image Usage */
+# NONE 0 /* All purposes */
+# SLEEP 1
+# DEEP_SLEEP 2
+# EXCEPTION 4
+$(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.tmp \
+ $(objutil)/broadcom/secimage/secimage \
+ util/broadcom/unauth.cfg \
+ util/broadcom/khmacsha256
+ @printf " SIGN $(subst $(obj)/,,$(@))\n"
+ $(objutil)/broadcom/secimage/secimage -out $@ \
+ -config util/broadcom/unauth.cfg \
+ -hmac util/broadcom/khmacsha256 -bl $<