-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support devices with multiple firmware slots #556
Comments
@danielspofford Anything else that you'd add or change here? |
|
I view the scope of this issue is limited to adding a slot index to firmware update notifications sent to device and the ramifications of adding an index to NervesHub. I don't see any reason why NervesHub would need to limit the number of slots per device or assign meaning to slots. The number of slots and the semantics behind the slots seems very application-specific. NervesHub does need knowledge about how slots depend on each other so that it doesn't upgrade one slot in an incompatible way. All of the other questions that you asked are application-specific - A/B partition, rebooting, boot slots, switching slot count between updates, and OTP-knowledge. For example, maybe you don't care about power-safe updates for a slot, then there's no need to waste space on A/B partitions. If you don't need to reboot to use an update to a slot, then don't reboot. I personally feel that NervesHub should stay out of these decisions so as to not force users to pick a strategy that doesn't work with their platform. It seems really hard to pick something that works for everyone. |
I agree we don't want any of this implementation to be application-specific. I was asking questions through the lens of a specific application as a means of exploring what flexibility we have and how you saw some of this playing out. Your response is what I was hoping for :). Some of these things are impacted by the current behavior of I think reverse order makes sense WRT deterministic slot updating, e.g. 3, 2, 1, 0.
☝️ makes sense to me as well, at least for a good amount of time. |
With the advent of |
I think we can close it. |
Currently NervesHub assumes one firmware image per device. There are a few reasons why it would be useful to have multiple firmware images for a device:
In addition to updating the NervesHub database schema and APIs to understand device slots, it will also be necessary to modify how deployments are handled. I think there are two options:
My leaning is to the first, since it seems easier to understand the final state of the device.
Additionally, the order of firmware updates to a device should be deterministic. Do slots get updated in order? I.e., slot 0 is first, then slot 1, etc. Or do slots get updated in reverse order? Or do we let the user assign a priority to each slot so that a custom ordering can be defined in a deployment. I assume that it will be difficult for users to remove the coupling between images in different slots, so some accommodation will be needed.
The text was updated successfully, but these errors were encountered: