2016-11-01 19:41:58 -04:00
|
|
|
COMPONENT_ADD_INCLUDEDIRS := include
|
|
|
|
COMPONENT_PRIV_INCLUDEDIRS := include_priv
|
|
|
|
|
|
|
|
ifdef IS_BOOTLOADER_BUILD
|
|
|
|
# share "private" headers with the bootloader component
|
2016-11-03 02:33:30 -04:00
|
|
|
# eventual goal: all functionality that needs this lives in bootloader_support
|
2016-11-01 19:41:58 -04:00
|
|
|
COMPONENT_ADD_INCLUDEDIRS += include_priv
|
|
|
|
endif
|
|
|
|
|
|
|
|
COMPONENT_SRCDIRS := src
|
|
|
|
|
2016-11-03 02:33:30 -04:00
|
|
|
#
|
|
|
|
# Secure boot signing key support
|
|
|
|
#
|
|
|
|
ifdef CONFIG_SECURE_BOOTLOADER_ENABLED
|
|
|
|
|
2016-11-04 01:05:00 -04:00
|
|
|
# this path is created relative to the component build directory
|
2016-11-03 02:33:30 -04:00
|
|
|
SECURE_BOOT_VERIFICATION_KEY := $(abspath signature_verification_key.bin)
|
|
|
|
|
|
|
|
$(SECURE_BOOT_SIGNING_KEY):
|
|
|
|
@echo "Need to generate secure boot signing key."
|
|
|
|
@echo "One way is to run this command:"
|
|
|
|
@echo "$(ESPSECUREPY) generate_signing_key $@"
|
|
|
|
@echo "Keep key file safe after generating."
|
|
|
|
@echo "(See secure boot documentation for risks & alternatives.)"
|
|
|
|
@exit 1
|
|
|
|
|
|
|
|
$(SECURE_BOOT_VERIFICATION_KEY): $(SECURE_BOOT_SIGNING_KEY)
|
|
|
|
$(ESPSECUREPY) extract_public_key --keyfile $< $@
|
2016-11-04 01:05:00 -04:00
|
|
|
|
|
|
|
COMPONENT_EXTRA_CLEAN += $(SECURE_BOOT_VERIFICATION_KEY)
|
|
|
|
|
|
|
|
COMPONENT_EMBED_FILES := $(SECURE_BOOT_VERIFICATION_KEY)
|
|
|
|
|
2016-11-03 02:33:30 -04:00
|
|
|
endif
|