=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2024.04.18 11:56:05 =~=~=~=~=~=~=~=~=~=~=~= hello sbl. Disabling flash remapping function Bootloader Version 1.10.0 boot_get_slot_usage()::Image 0: Attempting to read image from slot 0 boot_get_slot_usage()::Image 0: flash_area_open() returned 0 boot_get_slot_usage()::Image 0: Attempting to read image from slot 1 boot_get_slot_usage()::Image 0: flash_area_open() returned 0 Reading header for image slot 0 Successfully read header for image slot 0 Reading header for image slot 1 Successfully read header for image slot 1 boot_is_header_valid()::Checking validity of header of Image at Addr: 0xffffffff FA Offset: 0x40000 Image Size: 0xffffffff Header Size: 0xffff Flash Area Size: 0x200000 boot_is_header_valid()::Image Magic: 0xffffffff boot_is_header_valid()::Header Magic is invalid boot_get_slot_usage()::Image 0 Primary slot: Image not found boot_is_header_valid()::Checking validity of header of Image at Addr: 0xffffffff FA Offset: 0x240000 Image Size: 0xffffffff Header Size: 0xffff Flash Area Size: 0x200000 boot_is_header_valid()::Image Magic: 0xffffffff boot_is_header_valid()::Header Magic is invalid boot_get_slot_usage()::Image 0 Secondary slot: Image not found boot_find_active_slot_hook()::Reading swap state for primary image slot boot_read_swap_state()::Reading magic value at address offset: 0x1ffff0 boot_read_swap_state()::Magic Value is: 3 boot_read_swap_state()::Reading swap info at address offset: 0x1fffd8 boot_read_swap_state()::Reading swap type: 15 Img_num: 15 Swap_info:255 Swap_size: 255 boot_read_swap_state()::Reading swap type: 1 Img_num: 0 Swap_info:255 Swap_size: 255 boot_read_swap_state()::Reading copy done flag: 3 boot_read_swap_state()::Reading image ok flag: 3 boot_find_active_slot_hook()::Reading swap state for secondary image slot boot_read_swap_state()::Reading magic value at address offset: 0x1ffff0 boot_read_swap_state()::Magic Value is: 3 boot_read_swap_state()::Reading swap info at address offset: 0x1fffd8 boot_read_swap_state()::Reading swap type: 15 Img_num: 15 Swap_info:255 Swap_size: 255 boot_read_swap_state()::Reading swap type: 1 Img_num: 0 Swap_info:255 Swap_size: 255 boot_read_swap_state()::Reading copy done flag: 3 boot_read_swap_state()::Reading image ok flag: 3 boot_find_active_slot_hook()::Checking slot 0 boot_find_active_slot_hook()::Checking slot 1 boot_find_active_slot_hook()::No candidate found, continuing with regular boot process boot_load_and_validate_images()::No slot to load for image 0 context_boot_go()::Failed to load and validate images, Closing the Flash Areas. Unable to find bootable image hello sbl. Disabling flash remapping function Bootloader Version 1.10.0 boot_get_slot_usage()::Image 0: Attempting to read image from slot 0 boot_get_slot_usage()::Image 0: flash_area_open() returned 0 boot_get_slot_usage()::Image 0: Attempting to read image from slot 1 boot_get_slot_usage()::Image 0: flash_area_open() returned 0 Reading header for image slot 0 Successfully read header for image slot 0 Reading header for image slot 1 Successfully read header for image slot 1 boot_is_header_valid()::Checking validity of header of Image at Addr: 0xffffffff FA Offset: 0x40000 Image Size: 0xffffffff Header Size: 0xffff Flash Area Size: 0x200000 boot_is_header_valid()::Image Magic: 0xffffffff boot_is_header_valid()::Header Magic is invalid boot_get_slot_usage()::Image 0 Primary slot: Image not found boot_is_header_valid()::Checking validity of header of Image at Addr: 0xffffffff FA Offset: 0x240000 Image Size: 0xffffffff Header Size: 0xffff Flash Area Size: 0x200000 boot_is_header_valid()::Image Magic: 0xffffffff boot_is_header_valid()::Header Magic is invalid boot_get_slot_usage()::Image 0 Secondary slot: Image not found boot_find_active_slot_hook()::Reading swap state for primary image slot boot_read_swap_state()::Reading magic value at address offset: 0x1ffff0 boot_read_swap_state()::Magic Value is: 3 boot_read_swap_state()::Reading swap info at address offset: 0x1fffd8 boot_read_swap_state()::Reading swap type: 15 Img_num: 15 Swap_info:255 Swap_size: 255 boot_read_swap_state()::Reading swap type: 1 Img_num: 0 Swap_info:255 Swap_size: 255 boot_read_swap_state()::Reading copy done flag: 3 boot_read_swap_state()::Reading image ok flag: 3 boot_find_active_slot_hook()::Reading swap state for secondary image slot boot_read_swap_state()::Reading magic value at address offset: 0x1ffff0 boot_read_swap_state()::Magic Value is: 3 boot_read_swap_state()::Reading swap info at address offset: 0x1fffd8 boot_read_swap_state()::Reading swap type: 15 Img_num: 15 Swap_info:255 Swap_size: 255 boot_read_swap_state()::Reading swap type: 1 Img_num: 0 Swap_info:255 Swap_size: 255 boot_read_swap_state()::Reading copy done flag: 3 boot_read_swap_state()::Reading image ok flag: 3 boot_find_active_slot_hook()::Checking slot 0 boot_find_active_slot_hook()::Checking slot 1 boot_find_active_slot_hook()::No candidate found, continuing with regular boot process boot_load_and_validate_images()::No slot to load for image 0 context_boot_go()::Failed to load and validate images, Closing the Flash Areas. Unable to find bootable image OTA HTTPS client demo (Ethernet) Initializing PHY... Obtaining IP address from DHCP... ************************************************ OTA HTTPS Client Example ************************************************ IPv4 Address : 172.16.3.14 IPv4 Subnet mask : 255.255.0.0 IPv4 Gateway : 172.16.0.1 ************************************************ Copyright 2022 NXP $ ota 0 /led_blinky.bin 172.16.3.48 4433 0 Started OTA with: image = 0 file = /led_blinky.bin host = 172.16.3.48 port = 4433 . Seeding the random number generator... . Loading the CA root certificate... ok (0 skipped) . Loading the client cert. and key... ok . Connecting to 172.16.3.48:4433 . Setting up the SSL/TLS structure... ok . SSL state connect : 0 . Performing the SSL/TLS handshake... [ Protocol is TLSv1.2 ] [ Ciphersuite is TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256 ] [ Record expansion is 29 ] . Verifying peer X.509 certificate... SKIPPED Getting size of requested file '/led_blinky.bin' Determined file size is 16080 bytes Starting download of 16080 bytes with block size of 4096 bytes .... Download loop completed with size 16080, expected 16080 MD5 hexdump of downloaded data: 00000000 B4 28 52 FF 85 12 27 30 5F 19 5D 5D D5 E6 A9 73 |.(R...'0_.]]...s| MD5 hexdump of flashed data: 00000000 B4 28 52 FF 85 12 27 30 5F 19 5D 5D D5 E6 A9 73 |.(R...'0_.]]...s| OTA image was downloaded successfully. $ image info Image 0; name APP; state None: Slot 0; slotAddr 60040000; slotSize 2097152 Slot 1; slotAddr 60240000; slotSize 2097152 $ image test 0 write magic number offset = 0x43ff00 $ image info Image 0; name APP; state ReadyForTest: Slot 0; slotAddr 60040000; slotSize 2097152 Slot 1; slotAddr 60240000; slotSize 2097152 $ reboot System reset! hello sbl. Disabling flash remapping function Bootloader Version 1.10.0 boot_get_slot_usage()::Image 0: Attempting to read image from slot 0 boot_get_slot_usage()::Image 0: flash_area_open() returned 0 boot_get_slot_usage()::Image 0: Attempting to read image from slot 1 boot_get_slot_usage()::Image 0: flash_area_open() returned 0 Reading header for image slot 0 Successfully read header for image slot 0 Reading header for image slot 1 Successfully read header for image slot 1 boot_is_header_valid()::Checking validity of header of Image at Addr: 0xffffffff FA Offset: 0x40000 Image Size: 0xffffffff Header Size: 0xffff Flash Area Size: 0x200000 boot_is_header_valid()::Image Magic: 0xffffffff boot_is_header_valid()::Header Magic is invalid boot_get_slot_usage()::Image 0 Primary slot: Image not found boot_is_header_valid()::Checking validity of header of Image at Addr: 0x0 FA Offset: 0x240000 Image Size: 0x3980 Header Size: 0x400 Flash Area Size: 0x200000 boot_is_header_valid()::Image Magic: 0x96f3b83d boot_is_header_valid()::Image Size: 0x3d80 Flash Area Size: 0x200000 boot_is_header_valid()::Header is valid Secondary slot: version=1.0.1+0 boot_find_active_slot_hook()::Reading swap state for primary image slot boot_read_swap_state()::Reading magic value at address offset: 0x1ffff0 boot_read_swap_state()::Magic Value is: 3 boot_read_swap_state()::Reading swap info at address offset: 0x1fffd8 boot_read_swap_state()::Reading swap type: 15 Img_num: 15 Swap_info:255 Swap_size: 255 boot_read_swap_state()::Reading swap type: 1 Img_num: 0 Swap_info:255 Swap_size: 255 boot_read_swap_state()::Reading copy done flag: 3 boot_read_swap_state()::Reading image ok flag: 3 boot_find_active_slot_hook()::Reading swap state for secondary image slot boot_read_swap_state()::Reading magic value at address offset: 0x1ffff0 boot_read_swap_state()::Magic Value is: 1 boot_read_swap_state()::Reading swap info at address offset: 0x1fffd8 boot_read_swap_state()::Reading swap type: 15 Img_num: 15 Swap_info:255 Swap_size: 255 boot_read_swap_state()::Reading swap type: 1 Img_num: 0 Swap_info:255 Swap_size: 255 boot_read_swap_state()::Reading copy done flag: 3 boot_read_swap_state()::Reading image ok flag: 3 boot_find_active_slot_hook()::Checking slot 0 boot_find_active_slot_hook()::Checking slot 1 boot_find_active_slot_hook()::Slot 1 is availablle and Swap State Magic Number is set to: 1 boot_find_active_slot_hook()::Copy Done Flag :3 Found a candidate in slot 1 boot_load_and_validate_images()::Image 0: Active slot is 1 boot_read_swap_state()::Reading magic value at address offset: 0x1ffff0 boot_read_swap_state()::Magic Value is: 1 boot_read_swap_state()::Reading swap info at address offset: 0x1fffd8 boot_read_swap_state()::Reading swap type: 15 Img_num: 15 Swap_info:255 Swap_size: 255 boot_read_swap_state()::Reading swap type: 1 Img_num: 0 Swap_info:255 Swap_size: 255 boot_read_swap_state()::Reading copy done flag: 3 boot_read_swap_state()::Reading image ok flag: 3 boot_select_or_erase()::Active slot 1 swap state: magic=0x1, copy_done=3, image_ok=3 boot_write_copy_done()::writing copy_done; fa_id=1 off=0x1fffe0 (0x43ffe0) boot_write_trailer()::Getting alignment requirement for flash area boot_write_trailer()::Getting erased value for flash area boot_write_trailer()::Copying trailer to buffer and filling rest with erased value boot_write_trailer()::Writing buffer to flash area at offset 2097120 flash_area_write()::Checking device ID of flash area flash_area_write()::Starting to write data to flash area flash_area_write()::Successfully wrote all data to flash area boot_write_trailer()::Successfully wrote to flash area boot_image_check()::Validating image in slot 0 bootutil_img_validate()::Calculating image hash bootutil_img_hash()::Initializing SHA-256 context bootutil_img_hash()::Reading blocks and updating SHA-256 context bootutil_img_hash()::Finishing SHA-256 computation bootutil_img_hash()::SHA-256 computation finished successfully bootutil_img_validate()::Initializing TLV iterator bootutil_img_validate()::Starting TLV iteration bootutil_img_validate()::Verifying SHA256 hash bootutil_img_validate()::SHA256 hash is valid bootutil_img_validate()::Verifying key hash bootutil_find_key()::keyhash_len: 32 bootutil_find_key()::keyhash: 5449a70a65fbf52cd5efc231f89a2e7b816b3bc4c89353a803cede848 d12b8 bootutil_find_key()::Checking key at index 0, key: 3082 1 a 282 1 1 0db6f695169b8dcb063 c981a4a4a56f4 d8dc271e47d879d399fb89164 1344edeafc0c4b7a44860 2 b4ad25851af585b96 19ee53d8a8815f4505c18bbf94ccf699b6e5ee889d9cd944d ead80d95f7e357ad41bd33220c644 18fc9ab4d37e5797bf4d697d0d4f8299022ad2be7 150ef166f33791864eaaf15588a98ad3f6ded82908c26d41272f94fcd4f29c53320e0c87c43172438a1f9a3f368 6957b 8b6cf737ceea4ee7e448cc351 ae9c0816d84ce8c247cdfb8a7bd1463c9cb88b34a2ca1ba9240e6e2dcda9b981a1a187bd9c2cf24f26e5a2227dba4907e6b 8 e295b b9cd6d250e2bc2a74 f402041f64e12ca ba7d4737a2985e550c743e3 2 3 1 0 1 bootutil_find_key()::Hash of key at index 0: 5449a70a65fbf52cd5efc231f89a2e7b816b3bc4c89353a803cede848 d12b8 bootutil_find_key()::Found matching key at index 0 bootutil_img_validate()::Verifying signature bootutil_verify_sig()::Verifying signature bootutil_parse_rsakey()::Parsing RSA key bootutil_parse_rsakey()::Modulus: DB6F695169B8DCB0630C981A4A4A56F40D8DC271E47D879D399FB8916401344EDEAFC0C4B7A44860020B4AD25851AF585B96019EE53D8A8815F4505C18BBF94CCF699B6E5EE889D9CD944D0EAD80D95F7E357AD41BD33220C644018FC9AB4D37E5797BF4D697D0D4F8299022AD2BE70150EF166F33791864EAAF15588A98AD3F6DED82908C26D41272F94FCD4F29C53320E0C87C43172438A1F9A3F36806957B08B6CF737CEEA4EE7E448CC3510AE9C0816D84CE8C247CDFB8A7BD1463C9CB88B34A2CA1BA9240E6E2DCDA9B981A1A187BD9C2CF24F26E5A2227DBA4907E6B080E295B0B9CD6D250E2BC2A740F402041F64E12CA0BA7D4737A2985E550C743E3 bootutil_parse_rsakey()::Public exponent: 010001 bootutil_parse_rsakey()::RSA key parsed successfully bootutil_cmp_rsasig()::Entering bootutil_cmp_rsasig mbedtls_rsa_public()::Entering rsa_public mbedtls_rsa_public()::RSA public key operation succeeded bootutil_cmp_rsasig()::H and H' are equal bootutil_cmp_rsasig():: Exiting bootutil_cmp_rsasig with fih_rc: 0 bootutil_verify_sig()::Signature verification finished FIH_RC Status: 0 bootutil_img_validate()::No more TLVs with matching type are available bootutil_img_validate()::Image validated successfully FIH_RC Status: 0boot_is_header_valid()::Checking validity of header of Image at Addr: 0x0 FA Offset: 0x240000 Image Size: 0x3980 Header Size: 0x400 Flash Area Size: 0x200000 boot_is_header_valid()::Image Magic: 0x96f3b83d boot_is_header_valid()::Image Size: 0x3d80 Flash Area Size: 0x200000 boot_is_header_valid()::Header is valid Image 0 loaded from the secondary slot Booting from Slot 1, Flash Device ID 1, Image Offset 0x240000 Bootloader chainload address offset: 0x240000 Reset_Handler address offset: 0x240400 Jumping to the image flash_base: 60000000 Flash remapping Start Addr: 0x60040000, End Addr: 0x60240000, Offset: 0x200000 Booting the secondary slot - flash remapping is enabled rsp->br_image_off: 40000 Vector Table Address: 60040400