1# flake8: noqa 2# fmt: off 3espefuse(esp, efuses, args, "burn_efuse JTAG_DISABLE 1 DISABLE_SDIO_HOST 1 CONSOLE_DEBUG_DISABLE 1") 4if efuses["JTAG_DISABLE"].get() != 0: 5 raise esptool.FatalError("Burn should be at the end") 6 7espefuse(esp, efuses, args, "burn_key flash_encryption ../../images/efuse/256bit --no-protect-key") 8if efuses["BLOCK1"].get_meaning() != "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00": 9 raise esptool.FatalError("Burn should be at the end") 10if not efuses["BLOCK1"].is_readable() or not efuses["BLOCK1"].is_writeable(): 11 raise esptool.FatalError("Burn should be at the end") 12 13espefuse(esp, efuses, args, "burn_key_digest ../../secure_images/rsa_secure_boot_signing_key.pem") 14if efuses["BLOCK2"].get_meaning() != "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00": 15 raise esptool.FatalError("Burn should be at the end") 16if not efuses["BLOCK2"].is_readable() or not efuses["BLOCK2"].is_writeable(): 17 raise esptool.FatalError("Burn should be at the end") 18 19espefuse(esp, efuses, args, "burn_bit BLOCK3 64 66 69 72 78 82 83 90") 20espefuse(esp, efuses, args, "burn_custom_mac AA:BB:CC:DD:EE:88") 21 22if efuses["BLOCK3"].get_meaning() != "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00": 23 raise esptool.FatalError("Burn should be at the end") 24