- [esp32]secure boot v1 및 flash encryption 목차
저는 esp-idf 4.3을 사용하고 있습니다.
secure boot 및 flash encryption의 절차를 정리해 두었습니다.
1. menuconfig 수정
> Security features -> Enable hardware Secure Boot in bootloader
Secure bootloader mode를 Reflashable로 변경
Sign binaries during build(NEW)
-> secure_boot_signing_key.pem 이름을 그대로 사용
Enable flash encryption on bootloader
-> Enable usage mode(Development(Not SECURE)
> bootloader config->bootloader log verbosity(error)
> Partition Table -> Offset of partition table을 0x10000으로 변경
2. PEM 파일 생성
bsp/esp32/components/esptool_py/esptool /python espsecure.py generate_signing_key secure_boot_signing_key.pem
생성한 후 secure_boot_signing_key.pem 파일을
apps/esp32/light_example/build/ 아래에 저장한다
3. bootloader 관련 파일 생성 (to build a Secure Boot enabled bootloader.)
python build.py esp32 light_example bootloader 수행
출력 위치는 apps/esp32/light_example/build/bootloader/
생성된 파일은
1) secure-bootloader-key-256.bin
2) bootloader.bin
3) bootloader-reflash-digest.bin (To reflash the bootloader after initial flash)
4. efuse burning
1) Burn secure boot key to efuse using
bsp/esp32/components/esptool_py/esptool/secure_boot$ python ../espefuse.py --port /dev/ttyUSB0 burn_key secure_boot_v1 secure-bootloader-key-256.bin
5. 최초 flash write
1) bootloader-reflash-digest.bin
python ../esptool.py -p /dev/ttyUSB0 -b 460800 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_size detect --flash_freq 40m 0x00 bootloader-reflash-digest.bin
2) bootloader
python ../esptool.py -p /dev/ttyUSB0 -b 460800 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_size detect --flash_freq 40m 0x1000 bootloader.bin
3) python build.py esp32 light_example flash monitor
( Run idf.py flash to build and flash the partition table and the just-built app image.)
( idf.py flash doesn’t flash the bootloader if Secure Boot is enabled.)
6. 이후 flash write
1) bootloader 및 bootloader-reflash-digest.bin를 다시 다운로드하는 경우
1) bootloader-reflash-digest.bin
python ../esptool.py -p /dev/ttyUSB0 -b 460800 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_size detect --flash_freq 40m --encrypt 0x00 bootloader-reflash-digest.bin
2) bootloader
python ../esptool.py -p /dev/ttyUSB0 -b 460800 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_size detect --flash_freq 40m --encrypt 0x1000 bootloader.bin
python build.py esp32 light_example encrypted-flash monitor
python ../esptool.py -p /dev/ttyUSB0 -b 460800 --before default_reset --after no_reset --chip esp32 write_flash --flash_mode dio --flash_size detect --flash_freq 40m --encrypt 0x10000 apps/esp32/light_example/build/partition_table/partition-table.bin 0x19000 apps/esp32/light_example/build/ota_data_initial.bin 0x20000 apps/esp32/light_example/build/light_example.bin
참고 1) 응용 프로그램이 정상적으로 Secure Boot에 맞게 Sign 되었는지 확인 명령(espsecure.py verify_signature --version 1 --keyfile apps ... )
python bsp/esp32/components/esptool_py/esptool/espsecure.py verify_signature --version 1 --keyfile apps/esp32/light_example/secure_boot_signing_key.pem apps/esp32/light_example/build/light_example.bin
espsecure.py v3.1-dev
Verifying 1048496 bytes of data
Signature is valid
python bsp/esp32/components/esptool_py/esptool/espsecure.py verify_signature --version 1 --keyfile apps/esp32/light_example/secure_boot_signing_key.pem output/esp32/iotcore_light_example_latest/partition-table.bin
espsecure.py v3.1-dev
Verifying 3072 bytes of data
Signature is valid
< 방법 1과 Secure Boot를 적용한 성공한 efuse summary >
Identity fuses:
MAC (BLOCK0): Factory MAC Address
= 48:e7:29:a1:69:b8 (CRC 0xf9 OK) R/W
MAC_CRC (BLOCK0): CRC8 for factory MAC address = 249 R/W (0xf9)
CHIP_VER_REV1 (BLOCK0): Silicon Revision 1 = True R/W (0b1)
CHIP_VER_REV2 (BLOCK0): Silicon Revision 2 = True R/W (0b1)
CHIP_VERSION (BLOCK0): Reserved for future chip versions = 2 R/W (0b10)
CHIP_PACKAGE (BLOCK0): Chip package identifier = 1 R/W (0b001)
MAC_VERSION (BLOCK3): Version of the MAC field = 0 R/W (0x00)
Security fuses:
FLASH_CRYPT_CNT (BLOCK0): Flash encryption mode counter = 1 R/W (0b0000001)
UART_DOWNLOAD_DIS (BLOCK0): Disable UART download mode (ESP32 rev3 only) = False R/W (0b0)
FLASH_CRYPT_CONFIG (BLOCK0): Flash encryption config (key tweak bits) = 15 R/W (0xf)
CONSOLE_DEBUG_DISABLE (BLOCK0): Disable ROM BASIC interpreter fallback = True R/W (0b1)
ABS_DONE_0 (BLOCK0): Secure boot V1 is enabled for bootloader image = True R/W (0b1)
ABS_DONE_1 (BLOCK0): Secure boot V2 is enabled for bootloader image = False R/W (0b0)
JTAG_DISABLE (BLOCK0): Disable JTAG = True R/W (0b1)
DISABLE_DL_ENCRYPT (BLOCK0): Disable flash encryption in UART bootloader = False R/W (0b0)
DISABLE_DL_DECRYPT (BLOCK0): Disable flash decryption in UART bootloader = True R/W (0b1)
DISABLE_DL_CACHE (BLOCK0): Disable flash cache in UART bootloader = True R/W (0b1)
BLOCK1 (BLOCK1): Flash encryption key
= ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? -/-
BLOCK2 (BLOCK2): Secure boot key
= ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? -/-
BLOCK3 (BLOCK3): Variable Block 3
= 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 R/W
Flash voltage (VDD_SDIO) determined by GPIO12 on reset (High for 1.8V, Low/NC for 3.3V).
< 방법 1과 Secure Boot를 적용한 성공한 Full Log >
--- idf_monitor on /dev/ttyUSB0 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jul 29 2019 12:21:46
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:14496
load:0x40078000,len:24128
load:0x40080400,len:4968
0x40080400: _init at ??:?
entry 0x400806f8
I (33) boot: ESP-IDF v4.3.1-3-g954d44c7b9-dirty 2nd stage bootloader
I (33) boot: compile time 17:33:54
D (33) bootloader_flash: mmu set block paddr=0x00000000 (was 0xffffffff)
I (41) boot: chip revision: 3
I (45) boot_comm: chip revision: 3, min. bootloader chip revision: 0
D (53) qio_mode: Probing for QIO mode enable...
D (56) qio_mode: Raw SPI flash chip id 0x5e4016
D (61) qio_mode: Manufacturer ID 0x5e chip ID 0x4016
I (66) qio_mode: Enabling default flash chip QIO
D (71) qio_mode: Initial flash chip status 0x2
D (76) qio_mode: QIO mode already enabled in flash
D (81) qio_mode: Enabling QIO mode...
D (84) boot.esp32: magic e9
D (87) boot.esp32: segments 03
D (90) boot.esp32: spi_mode 02
D (93) boot.esp32: spi_speed 00
D (97) boot.esp32: spi_size 02
I (100) boot.esp32: SPI Speed : 40MHz
I (105) boot.esp32: SPI Mode : QIO
I (109) boot.esp32: SPI Flash Size : 4MB
D (114) boot: Enabling RTCWDT(9000 ms)
I (118) boot: Enabling RNG early entropy source...
D (123) bootloader_flash: mmu set paddr=00010000 count=1 size=c00 src_addr=10000 src_addr_aligned=10000
D (132) boot: mapped partition table 0x10000 at 0x3f400000
D (138) flash_parts: partition table verified, 8 entries
I (143) boot: Partition Table:
I (147) boot: ## Label Usage Type ST Offset Length
D (155) boot: load partition table entry 0x3f400000
D (159) boot: type=1 subtype=2
I (163) boot: 0 stnv WiFi data 01 02 00011000 00004000
D (170) boot: load partition table entry 0x3f400020
D (175) boot: type=1 subtype=2
I (178) boot: 1 nvs WiFi data 01 02 00015000 00004000
D (186) boot: load partition table entry 0x3f400040
D (191) boot: type=1 subtype=0
I (194) boot: 2 otadata OTA data 01 00 00019000 00002000
D (201) boot: load partition table entry 0x3f400060
D (206) boot: type=1 subtype=1
I (209) boot: 3 phy_init RF data 01 01 0001b000 00001000
D (217) boot: load partition table entry 0x3f400080
D (222) boot: type=1 subtype=4
I (225) boot: 4 nvs_key NVS keys 01 04 0001c000 00001000
D (233) boot: load partition table entry 0x3f4000a0
D (238) boot: type=0 subtype=10
I (241) boot: 5 ota_0 OTA app 00 10 00020000 00100000
D (248) boot: load partition table entry 0x3f4000c0
D (253) boot: type=0 subtype=11
I (257) boot: 6 ota_1 OTA app 00 11 00120000 00100000
I (264) boot: End of partition table
D (268) boot: OTA data offset 0x19000
D (272) bootloader_flash: mmu set paddr=00010000 count=1 size=2000 src_addr=19000 src_addr_aligned=10000
D (282) boot: otadata[0]: sequence values 0xffffffff
D (287) boot: otadata[1]: sequence values 0xffffffff
D (292) boot: OTA sequence numbers both empty (all-0xFF) or partition table does not have bootable ota_apps (app_count=2)
I (303) boot: No factory image, trying OTA 0
D (308) boot: Trying partition index 0 offs 0x20000 size 0x100000
D (314) esp_image: reading image header @ 0x20000
D (319) bootloader_flash: mmu set block paddr=0x00020000 (was 0xffffffff)
D (325) esp_image: image header: 0xe9 0x07 0x02 0x02 400811e4
I (331) boot_comm: chip revision: 3, min. application chip revision: 0
I (338) esp_image: segment 0: paddr=00020020 vaddr=3f400020 size=321a0h (205216) map
D (347) esp_image: free data page_count 0x00000032
D (352) bootloader_flash: mmu set paddr=00020000 count=4 size=321a0 src_addr=20020 src_addr_aligned=20000
D (425) bootloader_flash: mmu set block paddr=0x00050000 (was 0xffffffff)
I (425) esp_image: segment 1: paddr=000521c8 vaddr=3ffb0000 size=037e8h ( 14312) load
D (429) esp_image: free data page_count 0x00000032
D (434) bootloader_flash: mmu set paddr=00050000 count=1 size=37e8 src_addr=521c8 src_addr_aligned=50000
D (448) bootloader_flash: mmu set block paddr=0x00050000 (was 0xffffffff)
I (450) esp_image: segment 2: paddr=000559b8 vaddr=40080000 size=0a660h ( 42592) load
D (459) esp_image: free data page_count 0x00000032
D (464) bootloader_flash: mmu set paddr=00050000 count=2 size=a660 src_addr=559b8 src_addr_aligned=50000
D (488) bootloader_flash: mmu set block paddr=0x00060000 (was 0xffffffff)
I (489) esp_image: segment 3: paddr=00060020 vaddr=400d0020 size=b47bch (739260) map
D (493) esp_image: free data page_count 0x00000032
D (497) bootloader_flash: mmu set paddr=00060000 count=12 size=b47bc src_addr=60020 src_addr_aligned=60000
D (735) bootloader_flash: mmu set block paddr=0x00110000 (was 0xffffffff)
I (735) esp_image: segment 4: paddr=001147e4 vaddr=4008a660 size=0a5d8h ( 42456) load
D (739) esp_image: free data page_count 0x00000032
D (744) bootloader_flash: mmu set paddr=00110000 count=1 size=a5d8 src_addr=1147e4 src_addr_aligned=110000
D (769) bootloader_flash: mmu set block paddr=0x00110000 (was 0xffffffff)
I (769) esp_image: segment 5: paddr=0011edc4 vaddr=50000000 size=00010h ( 16) load
D (773) esp_image: free data page_count 0x00000032
D (778) bootloader_flash: mmu set paddr=00110000 count=1 size=10 src_addr=11edc4 src_addr_aligned=110000
D (788) bootloader_flash: mmu set block paddr=0x00110000 (was 0xffffffff)
I (794) esp_image: segment 6: paddr=0011eddc vaddr=00000000 size=011a4h ( 4516)
D (803) esp_image: free data page_count 0x00000032
D (808) bootloader_flash: mmu set paddr=00110000 count=1 size=11a4 src_addr=11eddc src_addr_aligned=110000
D (819) bootloader_flash: mmu set block paddr=0x00110000 (was 0xffffffff)
I (824) esp_image: Verifying image signature...
D (829) bootloader_flash: mmu set paddr=00110000 count=1 size=20 src_addr=11ff90 src_addr_aligned=110000
D (839) boot: Calculated secure boot hash: 8fc5e246b77863b364173eeb02c33b1d2ec7e6020a9eea33a81b0fa77fb6be99
D (849) bootloader_flash: mmu set paddr=00110000 count=1 size=44 src_addr=11ffb0 src_addr_aligned=110000
D (858) secure_boot: Verifying secure boot signature
D (1201) secure_boot: Verification result 1
I (1211) boot: Loaded app from partition at offset 0x20000
I (1217) boot: Set actual ota_seq=1 in otadata[0]
D (1217) esp_image: reading image header @ 0x1000
D (1217) bootloader_flash: mmu set block paddr=0x00000000 (was 0xffffffff)
D (1223) esp_image: image header: 0xe9 0x03 0x02 0x02 400806f8
I (1229) boot_comm: chip revision: 3, min. application chip revision: 0
I (1236) esp_image: segment 0: paddr=00001020 vaddr=3fff0030 size=038a0h ( 14496)
D (1245) esp_image: free data page_count 0x00000032
D (1250) bootloader_flash: mmu set paddr=00000000 count=1 size=38a0 src_addr=1020 src_addr_aligned=0
D (1261) bootloader_flash: mmu set block paddr=0x00000000 (was 0xffffffff)
I (1266) esp_image: segment 1: paddr=000048c8 vaddr=40078000 size=05e40h ( 24128)
D (1274) esp_image: free data page_count 0x00000032
D (1279) bootloader_flash: mmu set paddr=00000000 count=1 size=5e40 src_addr=48c8 src_addr_aligned=0
D (1292) bootloader_flash: mmu set block paddr=0x00000000 (was 0xffffffff)
I (1295) esp_image: segment 2: paddr=0000a710 vaddr=40080400 size=01368h ( 4968)
D (1303) esp_image: free data page_count 0x00000032
D (1308) bootloader_flash: mmu set paddr=00000000 count=1 size=1368 src_addr=a710 src_addr_aligned=0
D (1318) bootloader_flash: mmu set block paddr=0x00000000 (was 0xffffffff)
W (1324) secure_boot_v1: Using pre-loaded secure boot key in EFUSE block 2
I (1332) secure_boot_v1: Generating secure boot digest...
D (1344) bootloader_flash: mmu set paddr=00000000 count=1 size=aa80 src_addr=1000 src_addr_aligned=0
D (1354) secure_boot_v1: write iv+digest to flash
I (1355) secure_boot_v1: Digest generation complete.
I (1358) boot: Checking flash encryption...
I (1362) flash_encrypt: Generating new flash encryption key...
D (1369) efuse: coding scheme 0
I (1373) flash_encrypt: Read & write protecting new key...
I (1378) flash_encrypt: Setting CRYPT_CONFIG efuse to 0xF
W (1384) flash_encrypt: Not disabling UART bootloader encryption
I (1391) flash_encrypt: Disable UART bootloader decryption...
I (1398) flash_encrypt: Disable UART bootloader MMU cache...
I (1404) flash_encrypt: Disable JTAG...
I (1408) flash_encrypt: Disable ROM BASIC interpreter fallback...
D (1426) esp_image: reading image header @ 0x1000
D (1427) bootloader_flash: mmu set block paddr=0x00000000 (was 0xffffffff)
D (1429) esp_image: image header: 0xe9 0x03 0x02 0x02 400806f8
I (1435) boot_comm: chip revision: 3, min. application chip revision: 0
I (1442) esp_image: segment 0: paddr=00001020 vaddr=3fff0030 size=038a0h ( 14496)
D (1451) esp_image: free data page_count 0x00000032
D (1456) bootloader_flash: mmu set paddr=00000000 count=1 size=38a0 src_addr=1020 src_addr_aligned=0
D (1467) bootloader_flash: mmu set block paddr=0x00000000 (was 0xffffffff)
I (1472) esp_image: segment 1: paddr=000048c8 vaddr=40078000 size=05e40h ( 24128)
D (1480) esp_image: free data page_count 0x00000032
D (1485) bootloader_flash: mmu set paddr=00000000 count=1 size=5e40 src_addr=48c8 src_addr_aligned=0
D (1498) bootloader_flash: mmu set block paddr=0x00000000 (was 0xffffffff)
I (1501) esp_image: segment 2: paddr=0000a710 vaddr=40080400 size=01368h ( 4968)
D (1509) esp_image: free data page_count 0x00000032
D (1514) bootloader_flash: mmu set paddr=00000000 count=1 size=1368 src_addr=a710 src_addr_aligned=0
D (1524) bootloader_flash: mmu set block paddr=0x00000000 (was 0xffffffff)
D (1530) flash_encrypt: bootloader is plaintext. Encrypting...
D (1725) flash_encrypt: Encrypting secure bootloader IV & digest...
D (1743) flash_parts: partition table verified, 8 entries
D (1743) flash_encrypt: partition table is plaintext. Encrypting...
I (1761) flash_encrypt: Encrypting partition 2 at offset 0x19000...
I (1788) flash_encrypt: Encrypting partition 4 at offset 0x1c000...
D (1802) esp_image: reading image header @ 0x20000
D (1802) bootloader_flash: mmu set block paddr=0x00020000 (was 0x00000000)
D (1803) esp_image: image header: 0xe9 0x07 0x02 0x02 400811e4
I (1808) boot_comm: chip revision: 3, min. application chip revision: 0
I (1816) esp_image: segment 0: paddr=00020020 vaddr=3f400020 size=321a0h (205216) map
D (1824) esp_image: free data page_count 0x00000032
D (1829) bootloader_flash: mmu set paddr=00020000 count=4 size=321a0 src_addr=20020 src_addr_aligned=20000
D (1902) bootloader_flash: mmu set block paddr=0x00050000 (was 0xffffffff)
I (1902) esp_image: segment 1: paddr=000521c8 vaddr=3ffb0000 size=037e8h ( 14312)
D (1906) esp_image: free data page_count 0x00000032
D (1911) bootloader_flash: mmu set paddr=00050000 count=1 size=37e8 src_addr=521c8 src_addr_aligned=50000
D (1925) bootloader_flash: mmu set block paddr=0x00050000 (was 0xffffffff)
I (1928) esp_image: segment 2: paddr=000559b8 vaddr=40080000 size=0a660h ( 42592)
D (1936) esp_image: free data page_count 0x00000032
D (1941) bootloader_flash: mmu set paddr=00050000 count=2 size=a660 src_addr=559b8 src_addr_aligned=50000
D (1964) bootloader_flash: mmu set block paddr=0x00060000 (was 0xffffffff)
I (1964) esp_image: segment 3: paddr=00060020 vaddr=400d0020 size=b47bch (739260) map
D (1968) esp_image: free data page_count 0x00000032
D (1973) bootloader_flash: mmu set paddr=00060000 count=12 size=b47bc src_addr=60020 src_addr_aligned=60000
D (2211) bootloader_flash: mmu set block paddr=0x00110000 (was 0xffffffff)
I (2211) esp_image: segment 4: paddr=001147e4 vaddr=4008a660 size=0a5d8h ( 42456)
D (2215) esp_image: free data page_count 0x00000032
D (2220) bootloader_flash: mmu set paddr=00110000 count=1 size=a5d8 src_addr=1147e4 src_addr_aligned=110000
D (2243) bootloader_flash: mmu set block paddr=0x00110000 (was 0xffffffff)
I (2243) esp_image: segment 5: paddr=0011edc4 vaddr=50000000 size=00010h ( 16)
D (2247) esp_image: free data page_count 0x00000032
D (2252) bootloader_flash: mmu set paddr=00110000 count=1 size=10 src_addr=11edc4 src_addr_aligned=110000
D (2262) bootloader_flash: mmu set block paddr=0x00110000 (was 0xffffffff)
I (2269) esp_image: segment 6: paddr=0011eddc vaddr=00000000 size=011a4h ( 4516)
D (2277) esp_image: free data page_count 0x00000032
D (2282) bootloader_flash: mmu set paddr=00110000 count=1 size=11a4 src_addr=11eddc src_addr_aligned=110000
D (2293) bootloader_flash: mmu set block paddr=0x00110000 (was 0xffffffff)
I (2299) esp_image: Verifying image signature...
D (2304) bootloader_flash: mmu set paddr=00110000 count=1 size=20 src_addr=11ff90 src_addr_aligned=110000
D (2314) boot: Calculated secure boot hash: 8fc5e246b77863b364173eeb02c33b1d2ec7e6020a9eea33a81b0fa77fb6be99
D (2324) bootloader_flash: mmu set paddr=00110000 count=1 size=44 src_addr=11ffb0 src_addr_aligned=110000
D (2333) secure_boot: Verifying secure boot signature
D (2676) secure_boot: Verification result 1
I (2676) flash_encrypt: Encrypting partition 5 at offset 0x20000...
D (7041) esp_image: reading image header @ 0x120000
D (7041) bootloader_flash: mmu set block paddr=0x00120000 (was 0xffffffff)
D (7042) esp_image: image header: 0x6c 0x5d 0x1a 0x04 401a5dea
E (7048) esp_image: image at 0x120000 has invalid magic byte (nothing flashed here?)
D (7056) flash_encrypt: All flash regions checked for encryption pass
D (7063) flash_encrypt: FLASH_CRYPT_CNT 0x0 -> 0x1
I (7079) flash_encrypt: Flash encryption completed
I (7079) boot: Checking secure boot...
I (7079) secure_boot_v1: blowing secure boot efuse...
D (7086) secure_boot_v1: before updating, EFUSE_BLK0_RDATA6 344
I (7092) secure_boot_v1: Disable JTAG...
I (7096) secure_boot_v1: Disable ROM BASIC interpreter fallback...
D (7114) secure_boot_v1: after updating, EFUSE_BLK0_RDATA6 354
I (7114) secure_boot_v1: secure boot is now enabled for bootloader image
I (7119) boot: Resetting with flash encryption enabled...
ets Jul 29 2019 12:21:46
rst:0x3 (SW_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:14496
load:0x40078000,len:24128
load:0x40080400,len:4968
0x40080400: _init at ??:?
entry 0x400806f8
I (53) boot: ESP-IDF v4.3.1-3-g954d44c7b9-dirty 2nd stage bootloader
I (53) boot: compile time 17:33:54
D (53) bootloader_flash: mmu set block paddr=0x00000000 (was 0xffffffff)
I (61) boot: chip revision: 3
I (65) boot_comm: chip revision: 3, min. bootloader chip revision: 0
D (73) qio_mode: Probing for QIO mode enable...
D (76) qio_mode: Raw SPI flash chip id 0x5e4016
D (81) qio_mode: Manufacturer ID 0x5e chip ID 0x4016
I (86) qio_mode: Enabling default flash chip QIO
D (91) qio_mode: Initial flash chip status 0x2
D (96) qio_mode: QIO mode already enabled in flash
D (101) qio_mode: Enabling QIO mode...
D (104) boot.esp32: magic e9
D (107) boot.esp32: segments 03
D (111) boot.esp32: spi_mode 02
D (114) boot.esp32: spi_speed 00
D (117) boot.esp32: spi_size 02
I (120) boot.esp32: SPI Speed : 40MHz
I (125) boot.esp32: SPI Mode : QIO
I (130) boot.esp32: SPI Flash Size : 4MB
D (134) boot: Enabling RTCWDT(9000 ms)
I (138) boot: Enabling RNG early entropy source...
D (144) bootloader_flash: mmu set paddr=00010000 count=1 size=c00 src_addr=10000 src_addr_aligned=10000
D (153) boot: mapped partition table 0x10000 at 0x3f400000
D (159) flash_parts: partition table verified, 8 entries
I (164) boot: Partition Table:
I (168) boot: ## Label Usage Type ST Offset Length
D (175) boot: load partition table entry 0x3f400000
D (180) boot: type=1 subtype=2
I (183) boot: 0 stnv WiFi data 01 02 00011000 00004000
D (191) boot: load partition table entry 0x3f400020
D (196) boot: type=1 subtype=2
I (199) boot: 1 nvs WiFi data 01 02 00015000 00004000
D (206) boot: load partition table entry 0x3f400040
D (211) boot: type=1 subtype=0
I (214) boot: 2 otadata OTA data 01 00 00019000 00002000
D (222) boot: load partition table entry 0x3f400060
D (227) boot: type=1 subtype=1
I (230) boot: 3 phy_init RF data 01 01 0001b000 00001000
D (238) boot: load partition table entry 0x3f400080
D (243) boot: type=1 subtype=4
I (246) boot: 4 nvs_key NVS keys 01 04 0001c000 00001000
D (253) boot: load partition table entry 0x3f4000a0
D (258) boot: type=0 subtype=10
I (261) boot: 5 ota_0 OTA app 00 10 00020000 00100000
D (269) boot: load partition table entry 0x3f4000c0
D (274) boot: type=0 subtype=11
I (277) boot: 6 ota_1 OTA app 00 11 00120000 00100000
I (285) boot: End of partition table
D (289) boot: OTA data offset 0x19000
D (293) bootloader_flash: mmu set paddr=00010000 count=1 size=2000 src_addr=19000 src_addr_aligned=10000
D (302) boot: otadata[0]: sequence values 0x00000001
D (307) boot: otadata[1]: sequence values 0xffffffff
D (312) boot_comm: Only otadata[0] is valid
D (317) boot: Active otadata[0]
D (320) boot: Mapping seq 0 -> OTA slot 0
D (324) boot: Trying partition index 0 offs 0x20000 size 0x100000
D (330) esp_image: reading image header @ 0x20000
D (335) bootloader_flash: mmu set block paddr=0x00020000 (was 0xffffffff)
D (342) esp_image: image header: 0xe9 0x07 0x02 0x02 400811e4
I (347) boot_comm: chip revision: 3, min. application chip revision: 0
I (355) esp_image: segment 0: paddr=00020020 vaddr=3f400020 size=321a0h (205216) map
D (363) esp_image: free data page_count 0x00000032
D (368) bootloader_flash: mmu set paddr=00020000 count=4 size=321a0 src_addr=20020 src_addr_aligned=20000
D (444) bootloader_flash: mmu set block paddr=0x00050000 (was 0xffffffff)
I (444) esp_image: segment 1: paddr=000521c8 vaddr=3ffb0000 size=037e8h ( 14312) load
D (448) esp_image: free data page_count 0x00000032
D (453) bootloader_flash: mmu set paddr=00050000 count=1 size=37e8 src_addr=521c8 src_addr_aligned=50000
D (467) bootloader_flash: mmu set block paddr=0x00050000 (was 0xffffffff)
I (469) esp_image: segment 2: paddr=000559b8 vaddr=40080000 size=0a660h ( 42592) load
D (477) esp_image: free data page_count 0x00000032
D (482) bootloader_flash: mmu set paddr=00050000 count=2 size=a660 src_addr=559b8 src_addr_aligned=50000
D (508) bootloader_flash: mmu set block paddr=0x00060000 (was 0xffffffff)
I (508) esp_image: segment 3: paddr=00060020 vaddr=400d0020 size=b47bch (739260) map
D (512) esp_image: free data page_count 0x00000032
D (517) bootloader_flash: mmu set paddr=00060000 count=12 size=b47bc src_addr=60020 src_addr_aligned=60000
D (763) bootloader_flash: mmu set block paddr=0x00110000 (was 0xffffffff)
I (763) esp_image: segment 4: paddr=001147e4 vaddr=4008a660 size=0a5d8h ( 42456) load
D (767) esp_image: free data page_count 0x00000032
D (772) bootloader_flash: mmu set paddr=00110000 count=1 size=a5d8 src_addr=1147e4 src_addr_aligned=110000
D (798) bootloader_flash: mmu set block paddr=0x00110000 (was 0xffffffff)
I (798) esp_image: segment 5: paddr=0011edc4 vaddr=50000000 size=00010h ( 16) load
D (802) esp_image: free data page_count 0x00000032
D (807) bootloader_flash: mmu set paddr=00110000 count=1 size=10 src_addr=11edc4 src_addr_aligned=110000
D (816) bootloader_flash: mmu set block paddr=0x00110000 (was 0xffffffff)
I (823) esp_image: segment 6: paddr=0011eddc vaddr=00000000 size=011a4h ( 4516)
D (831) esp_image: free data page_count 0x00000032
D (836) bootloader_flash: mmu set paddr=00110000 count=1 size=11a4 src_addr=11eddc src_addr_aligned=110000
D (847) bootloader_flash: mmu set block paddr=0x00110000 (was 0xffffffff)
I (853) esp_image: Verifying image signature...
D (858) bootloader_flash: mmu set paddr=00110000 count=1 size=20 src_addr=11ff90 src_addr_aligned=110000
D (868) boot: Calculated secure boot hash: 8fc5e246b77863b364173eeb02c33b1d2ec7e6020a9eea33a81b0fa77fb6be99
D (877) bootloader_flash: mmu set paddr=00110000 count=1 size=44 src_addr=11ffb0 src_addr_aligned=110000
D (887) secure_boot: Verifying secure boot signature
D (1230) secure_boot: Verification result 1
I (1240) boot: Loaded app from partition at offset 0x20000
I (1240) secure_boot_v1: bootloader secure boot is already enabled. No need to generate digest. continuing..
I (1245) boot: Checking flash encryption...
I (1250) flash_encrypt: flash encryption is enabled (3 plaintext flashes left)
I (1258) boot: Checking secure boot...
I (1262) secure_boot_v1: bootloader secure boot is already enabled, continuing..
I (1270) boot: Disabling RNG early entropy source...
D (1276) boot: Mapping segment 0 as DROM
D (1280) boot: Mapping segment 3 as IROM
D (1284) boot: calling set_cache_and_start_app
D (1289) boot: configure drom and irom and start
D (1293) boot: start: 0x400811e4
0x400811e4: call_start_cpu0 at bsp/esp32/components/esp_system/port/cpu_start.c:252
I (1308) cpu_start: Pro cpu up.
I (1308) cpu_start: Single core mode
I (1316) cpu_start: Pro cpu start user code
I (1316) cpu_start: cpu freq: 160000000
I (1316) cpu_start: Application information:
I (1321) cpu_start: Project name: light_example
I (1327) cpu_start: App version: 1
I (1331) cpu_start: Compile time: Oct 25 2023 17:45:56
I (1337) cpu_start: ELF file SHA256: f9f0a7d8521089e5...
I (1344) cpu_start: ESP-IDF: v4.3.1-3-g954d44c7b9-dirty
I (1350) heap_init: Initializing. RAM available for dynamic allocation:
I (1358) heap_init: At 3FF80000 len 00002000 (8 KiB): RTCRAM
I (1364) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (1370) heap_init: At 3FFB7500 len 00028B00 (162 KiB): DRAM
I (1376) heap_init: At 3FFE0440 len 0001FBC0 (126 KiB): D/IRAM
I (1383) heap_init: At 40078000 len 00008000 (32 KiB): IRAM
I (1389) heap_init: At 40094C38 len 0000B3C8 (44 KiB): IRAM
I (1396) spi_flash: detected chip: generic
I (1400) spi_flash: flash io: qio
W (1404) flash_encrypt: Flash encryption mode is DEVELOPMENT (not secure)
I (1412) cpu_start: Starting scheduler on PRO CPU.
I (1418) nvs: NVS key partition empty, generating keys
I (1438) nvs: NVS partition "nvs" is encrypted.
이상으로 출력 결과물까지 나왔습니다.