Comments (1)
rustBoot is designed to run on anything from a tiny microcontroller to a microprocessor, one important design consideration is support for various execution contexts/environments.
position-dependent code: In the context of a microcontroller, we must figure-out i.e. know 'at compile time' if we are building an image for partition A or partition B. In other words, compiled images are position dependent. Example: say, we have 2 flash partitions, partition A and partition B and we use the A/B update method
- We would have to build two binaries for each update and serve one depending on the partition address/label (i.e. update could be programmed into either part-A or part-B).
- Technically, this is possible but to do this in the A/B context, we must have a way to communicate extra information to an update-backend.
The firmware's update client can either
- use an update-specific protocol or instruction when signaling the backend to return an update for partition A (or B) or
- use some binary-encoding scheme (i.e. byte-representation) embedded in the image to signal this information.
In practice, this is a bit difficult to deploy and error-prone. The other issue with an A/B approach is that we cant use external devices/memories that are not memory mapped for updates. For ex: we cant use SPI-flash
Fixed boot partition and swapping: This approach is also referred to as the boot/update approach. All images are compiled to boot from partition A, updates are stored in partition B and swapped in the event of an update.
- This is a more flexible approach and is generally easier to deploy in the field (without the risk of bricking or corrupting the system).
- The flip-side though is that the 'swapping-logic or code' needs to be reliable and safe. (this is where rust comes in)
Support for A/B partitions: for rustBoot, the swap model makes sense as its supposed to be micro-architecture and OS agnostic. However, in the case of Linux, I presume none of the above applies as compiled kernel images (i.e. binary) are not position dependent.
- In this case, instead of the direct-XIP method or execute-in-place from flash used by mcu's, we can simply do a RAM-BOOT
- either load from the active partition (say A) into RAM or download the update image into the inactive partition (say B), verify it and if it checks-out, load into RAM and pass control to it.
- i.e. no swapping involved
- The plan to support ram-boot exists but since this is the preferred way to boot linux images, we can priortize this.
- Note - for devices that support it, we will add dual-bank flash swaps as well.
from rustboot.
Related Issues (20)
- No available debug probes are connected HOT 1
- Add support for a QSPI enabled flash-driver for the RP2040 board HOT 3
- Add a rust-based flash driver for STM32F334 dev-board HOT 2
- Add a rust-based NVMC driver for the STM32F446RE board HOT 4
- Add a rust-based NVMC driver for the ATSAM4L8-XPRO board HOT 2
- rustBoot image signing tools HOT 11
- Add a rust-based flash driver for 'STM32L562E-DK' board HOT 1
- Add rust-based flash driver for the "STM32H723ZG" board HOT 1
- Add rust-based flash driver for the "STM32F746ZG" board
- Order IMX-8 chip set. HOT 8
- Upgrade board specific dependencies HOT 2
- Add support for STM32F469 MCU in examples HOT 10
- Add support for the nRF9160 HOT 4
- Rust based driver development for secure element STSAFE-A100 HOT 1
- Add a rust-based secure element "NXP SE050" driver for ARM TrustZone-M and A
- Support for NRF9160DK
- Build a prototype impl for a firmware distribution platform using ockam's secure channels HOT 1
- Could this boot a smartphone image?
- Firmware distribution platform based on IPFS protocol
- Potential for putting partitions in invalid state for smt32h723 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rustboot.