{can we have riotboot, and native tags?}
Hi, my goal is to have a configuration area which is preserved across flash updates (OTA). I’d like to keep an IDevID certificate there, and no platforms without any secure element, the private key there too.
I have a notion for keeping the configuration store as a CBOR indefinite map RFC 8949: Concise Binary Object Representation (CBOR) . CBOR “stop” codes are 0xFF, which is the same as unwritten flash. So one can append new/updated key values the end. This means that the cbor map reader has to read to the end of the map and return the last value. I have to check what nanocbor does here.
riotboot would maintain two pages of flash for the key/value pairs. It would maintain them with slot numbers the same way that it does for slot0/1, and would leave a pointer to the active page somewhere in ram. That’s all riotboot would do, although it would be good if it could erase the page and re-write it via DFU as an option. The actual appending/updating (and rewriting to other page when full) would all be in the main code, not in riotboot. Using CBOR for this means that we are immune to changes to structures, and gives a wide variety of types… for “free”
I’d prefer to try to make this all work in native (because I think it would be easier to debug, and to build test cases for), and native does have MTD, but it doesn’t have riotboot … yet.
@chrysn and I had a thread that started when the forum was down, but I wanted to move things here.