component.mk 1.0 KB

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