component.mk 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. COMPONENT_ADD_INCLUDEDIRS := include
  2. COMPONENT_PRIV_INCLUDEDIRS := include_priv
  3. # include configuration macros early
  4. include $(IDF_PATH)/make/common.mk
  5. ifdef IS_BOOTLOADER_BUILD
  6. # share "private" headers with the bootloader component
  7. # eventual goal: all functionality that needs this lives in bootloader_support
  8. COMPONENT_ADD_INCLUDEDIRS += include_priv
  9. endif
  10. COMPONENT_SRCDIRS := src
  11. #
  12. # Secure boot signing key support
  13. #
  14. ifdef CONFIG_SECURE_BOOTLOADER_ENABLED
  15. # this path is created relative to the component build directory
  16. SECURE_BOOT_VERIFICATION_KEY := $(abspath signature_verification_key.bin)
  17. $(SECURE_BOOT_SIGNING_KEY):
  18. @echo "Need to generate secure boot signing key."
  19. @echo "One way is to run this command:"
  20. @echo "$(ESPSECUREPY) generate_signing_key $@"
  21. @echo "Keep key file safe after generating."
  22. @echo "(See secure boot documentation for risks & alternatives.)"
  23. @exit 1
  24. $(SECURE_BOOT_VERIFICATION_KEY): $(SECURE_BOOT_SIGNING_KEY)
  25. $(ESPSECUREPY) extract_public_key --keyfile $< $@
  26. COMPONENT_EXTRA_CLEAN += $(SECURE_BOOT_VERIFICATION_KEY)
  27. COMPONENT_EMBED_FILES := $(SECURE_BOOT_VERIFICATION_KEY)
  28. endif
  29. include $(IDF_PATH)/make/component_common.mk