mirror of
https://github.com/espressif/esptool.git
synced 2025-10-15 21:07:25 +08:00
feat: Added warning when secure boot enabled
Warning message that the flash settings parameters won't be changed because of enabled secure boot
This commit is contained in:

committed by
Radim Karniš

parent
3b0939c37f
commit
8d2637532a
@@ -569,7 +569,13 @@ def write_flash(esp, args):
|
||||
if len(image) == 0:
|
||||
print("WARNING: File %s is empty" % argfile.name)
|
||||
continue
|
||||
image = _update_image_flash_params(esp, address, args, image)
|
||||
|
||||
if not esp.get_secure_boot_enabled():
|
||||
image = _update_image_flash_params(esp, address, args, image)
|
||||
else:
|
||||
print(
|
||||
"WARNING: Secure boot is enabled, so not changing any flash settings."
|
||||
)
|
||||
calcmd5 = hashlib.md5(image).hexdigest()
|
||||
uncsize = len(image)
|
||||
if compress:
|
||||
|
@@ -178,6 +178,9 @@ class ESP8266ROM(ESPLoader):
|
||||
def check_spi_connection(self, spi_connection):
|
||||
raise NotSupportedError(self, "Setting --spi-connection")
|
||||
|
||||
def get_secure_boot_enabled(self):
|
||||
return False # ESP8266 doesn't have security features
|
||||
|
||||
|
||||
class ESP8266StubLoader(ESP8266ROM):
|
||||
"""Access class for ESP8266 stub loader, runs on top of ROM."""
|
||||
|
Reference in New Issue
Block a user