There are currently no callbacks in the loader for writing back to flash memory. You can use the data partition when you flash the factory image (see xflash option --data) to store some custom data at this time.