Check if app partition is bootable

leschge
Posts: 37
Joined: Fri May 06, 2022 1:38 pm

Check if app partition is bootable

Postby leschge » Wed Mar 08, 2023 9:16 am

I somehow need to know if an app partition is bootable or not without actually booting it.
Preferably possible in the bootloader, but is not a requirement.

I know that bootloader_utility_load_boot_image() scans for a partitions and prints an error if it's not bootable. But this also then boots the next available slot.

My goal is the following. Having a factory app and a main (ota) app. The factory is booted always by the SSBL. The factory app then resets and tells the SSBL to load the main ota app. But the factory app should know if an ota app is even bootable, because if it's not, then the factory app should stay running.

leschge
Posts: 37
Joined: Fri May 06, 2022 1:38 pm

Re: Check if app partition is bootable

Postby leschge » Wed Mar 08, 2023 9:43 am

Looks like esp_image_verify() will do the work

Who is online

Users browsing this forum: Bing [Bot], MicroController and 76 guests