|
|
@@ -49,16 +49,14 @@ ifndef CONFIG_SECURE_BOOT_ENABLED
|
|
|
# If secure boot disabled, bootloader flashing is integrated
|
|
|
# with 'make flash' and no warnings are printed.
|
|
|
|
|
|
-bootloader: $(BOOTLOADER_BIN)
|
|
|
- $(CHECK_PYTHON_DEPENDENCIES_CMD)
|
|
|
+bootloader: $(BOOTLOADER_BIN) check_python_dependencies
|
|
|
@echo $(SEPARATOR)
|
|
|
@echo "Bootloader built. Default flash command is:"
|
|
|
@echo "$(ESPTOOLPY_WRITE_FLASH) $(BOOTLOADER_OFFSET) $^"
|
|
|
|
|
|
ESPTOOL_ALL_FLASH_ARGS += $(BOOTLOADER_OFFSET) $(BOOTLOADER_BIN)
|
|
|
|
|
|
-bootloader-flash: $(BOOTLOADER_BIN) $(call prereq_if_explicit,erase_flash)
|
|
|
- $(CHECK_PYTHON_DEPENDENCIES_CMD)
|
|
|
+bootloader-flash: $(BOOTLOADER_BIN) $(call prereq_if_explicit,erase_flash) check_python_dependencies
|
|
|
$(ESPTOOLPY_WRITE_FLASH) 0x1000 $^
|
|
|
|
|
|
else ifdef CONFIG_SECURE_BOOTLOADER_ONE_TIME_FLASH
|
|
|
@@ -69,8 +67,7 @@ else ifdef CONFIG_SECURE_BOOTLOADER_ONE_TIME_FLASH
|
|
|
# The flashing command is deliberately printed without an auto-reset
|
|
|
# step, so the device doesn't immediately reset to flash itself.
|
|
|
|
|
|
-bootloader: $(BOOTLOADER_BIN)
|
|
|
- $(CHECK_PYTHON_DEPENDENCIES_CMD)
|
|
|
+bootloader: $(BOOTLOADER_BIN) check_python_dependencies
|
|
|
@echo $(SEPARATOR)
|
|
|
@echo "Bootloader built. One-time flash command is:"
|
|
|
@echo "$(subst hard_reset,no_reset,$(ESPTOOLPY_WRITE_FLASH)) $(BOOTLOADER_OFFSET) $(BOOTLOADER_BIN)"
|
|
|
@@ -85,8 +82,7 @@ BOOTLOADER_DIGEST_BIN := $(BOOTLOADER_BUILD_DIR)/bootloader-reflash-digest.bin
|
|
|
SECURE_BOOTLOADER_KEY := $(BOOTLOADER_BUILD_DIR)/secure-bootloader-key.bin
|
|
|
|
|
|
ifdef CONFIG_SECURE_BOOT_BUILD_SIGNED_BINARIES
|
|
|
-$(SECURE_BOOTLOADER_KEY): $(SECURE_BOOT_SIGNING_KEY)
|
|
|
- $(CHECK_PYTHON_DEPENDENCIES_CMD)
|
|
|
+$(SECURE_BOOTLOADER_KEY): $(SECURE_BOOT_SIGNING_KEY) | check_python_dependencies
|
|
|
$(ESPSECUREPY) digest_private_key -k $< $@
|
|
|
else
|
|
|
$(SECURE_BOOTLOADER_KEY):
|
|
|
@@ -109,8 +105,7 @@ bootloader: $(BOOTLOADER_DIGEST_BIN)
|
|
|
@echo "* After first boot, only re-flashes of this kind (with same key) will be accepted."
|
|
|
@echo "* Not recommended to re-use the same secure boot keyfile on multiple production devices."
|
|
|
|
|
|
-$(BOOTLOADER_DIGEST_BIN): $(BOOTLOADER_BIN) $(SECURE_BOOTLOADER_KEY)
|
|
|
- $(CHECK_PYTHON_DEPENDENCIES_CMD)
|
|
|
+$(BOOTLOADER_DIGEST_BIN): $(BOOTLOADER_BIN) $(SECURE_BOOTLOADER_KEY) | check_python_dependencies
|
|
|
@echo "DIGEST $(notdir $@)"
|
|
|
$(ESPSECUREPY) digest_secure_bootloader -k $(SECURE_BOOTLOADER_KEY) -o $@ $<
|
|
|
|