Repository navigation
The app-loader is rebuilt on deluge-sdk, and can run from the boot slots behind stage-0 as well as
from the stock bootloader.
Added
- The app-loader can run from a boot slot behind stage-0 as well as from the stock bootloader: one
binary for both. In a slot it confirms the slot it booted from, and offersUPDATE LOADERfor a
/BOOT/LOADER.SLTon the card, written into the other slot. Boot-region protection (provision
on first boot, lock-down before an app) is behind theflash-protectfeature, off by default. - stage-0 boots slot B too: it picks the newest valid slot, tries a pending one, and rolls back
to the other when the watchdog ended its last boot. firmwares/loader-shim: the slot image's shim, position-independent, so oneLOADER.SLTfits
either slot.tools/loader-image.shbuildsLOADER.SLTand a stage-0 install image, and checks
both.deluge-loader: the app-loader's logic, host-tested: the boot and protection sequence, the
menu and auto-boot decision, app staging and self-update.rza1_hal::wdt: the watchdog (its clock select, up to 125 ms), andspibsc::set_fast_read
(the SPI flash's 0Bh fast read at a given bit rate).deluge_bsp::flash::set_stock_read_mode
puts the flash's reads back on the stock bootloader's timing.deluge_bsp::flash::protect::reload,lift_volatileandrestore_volatile.deluge_image::app: a header for a flat image a loader copies into RAM and
runs (encode_app_header,validate_app), andmkslot app, which flattens an ELF's
PT_LOADsegments under it.deluge_image::slot::decode_boot_inforeads back the wordboot_infowrites (refusing
anything else), andplan_updatepicks a self-update's slot (the one not running) and sequence.deluge::Sd::listandSd::open_in: list a root-level directory, and open a file in one
(both names single, no paths), on the device and in the simulator.
Changed
- Breaking: the Deluge's boot-slot layout is
deluge_image::slot::DELUGE. deluge::Deluge::sdcan be called again once theSdit returned is dropped, and after a
mount that failed: oneSdat a time instead of one per boot.