Today I'll resume studying Papyrix's boot sequence, having gone on a tangent about how it renders text & other things. I explored it now because Papyrix might init this text-rendering early to display error messages.
If it does successfully init SD card access it'll check if that SD card contains a software-update to install! Installing it involves retrieving a singleton to which it passes the file, invokes a beginUpdate() method & displays update text, removes the file, & maybe restarts.
1/?
That singleton class has a verifying-setter for which file to install. There's a method to verifying that the configured file is of a certain size-range & has a valid header + (using mbedtls library) hash.
A beginUpdate method retrieves the next update partition, invokes that validation routine, opens the file, sets some properties, & sets a current state for whether this all process succeeded. If so the caller will display the emergency update screen.
2/3?