> For the complete documentation index, see [llms.txt](https://docs.ruuvi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ruuvi.com/ruuvi-air-firmware/air-2nd-stage-bootloader.md).

# Air 2nd Stage Bootloader

The Ruuvi Air second stage bootloader is based on [MCUboot](https://docs.mcuboot.com/) and it handles cryptographic security of installed firmware images as well as validates any updates to be installed.

There are two slots for second stage bootloader, which allows for updating the second stage over the air without risking bricking the OTA update capablity. The first stage is responsible for selecting the instance to run.

The second stage bootloader is responsible for installing update to main application or firmware loading application as well as selecting which one to start.

The source code is available at <https://github.com/ruuvi/ruuvi.air.mcuboot>
