tkey: Add the signer firmware

Add a binary for the TKey signer, so that it can be downloaded to the
key when needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-10-18 16:33:14 +01:00
parent 4277dd164a
commit 6b7d989d9f
4 changed files with 26 additions and 0 deletions

View File

@@ -6,6 +6,7 @@
obj-$(CONFIG_$(PHASE_)MISC) += misc-uclass.o
obj-$(CONFIG_$(PHASE_)NVMEM) += nvmem.o
obj-$(CONFIG_TKEY) += tkey-uclass.o
obj-$(CONFIG_TKEY) += signer-1.0.0.o
obj-$(CONFIG_$(PHASE_)CROS_EC) += cros_ec.o
obj-$(CONFIG_$(PHASE_)CROS_EC_SANDBOX) += cros_ec_sandbox.o

Binary file not shown.

View File

@@ -23,6 +23,11 @@ struct udevice;
#define TKEY_DISK_KEY_SIZE 32
#define TKEY_HASH_SIZE 32
/* Embedded TKey signer binary */
extern char __signer_1_0_0_begin[];
extern char __signer_1_0_0_end[];
#define TKEY_SIGNER_SIZE (__signer_1_0_0_end - __signer_1_0_0_begin)
/**
* struct tkey_ops - The functions that a TKey driver must implement.
*

View File

@@ -502,6 +502,26 @@ cmd_S_ttf= \
$(obj)/%.S: $(src)/%.ttf
$(call cmd,S_ttf)
# TKey signer binary
# ---------------------------------------------------------------------------
# Generate an assembly file to wrap the TKey signer binary
quiet_cmd_S_signer= SIGNER $@
cmd_S_signer= \
( \
echo '.section .rodata.signer.init,"a"'; \
echo '.balign 16'; \
echo '.global __signer_$(subst .,_,$(*F))_begin'; \
echo '__signer_$(subst .,_,$(*F))_begin:'; \
echo '.incbin "$<" '; \
echo '__signer_$(subst .,_,$(*F))_end:'; \
echo '.global __signer_$(subst .,_,$(*F))_end'; \
echo '.balign 16'; \
) > $@
$(obj)/signer-%.S: $(src)/signer.bin-v%
$(call cmd,S_signer)
# Splash logos
# ---------------------------------------------------------------------------