AsteroidOS / asteroid

Build script for AsteroidOS, an open-source operating system for smartwatches
http://asteroidos.org
GNU General Public License v2.0
884 stars 64 forks source link

OTA Mechanism #47

Open FlorentRevest opened 7 years ago

FlorentRevest commented 7 years ago

The current recommended way of upgrading AsteroidOS is by reflashing the entire device from a computer. This has several limitations such as:

Hence, a proper upgrade mechanism would be very useful to have. Asteroid already includes the "opkg" manager which could be used to fetch new packages from the nightly build servers's output directory (cf. https://release.asteroidos.org/ipk/ ) However, most watches don't have direct connectivity to the internet and package managers can result in incoherent system states.

The Yocto Project details some of the problems that need to be addressed when choosing an upgrade mechanism for an embedded Linux distribution in this page: https://wiki.yoctoproject.org/wiki/System_Update The proposed solutions can also easily be integrated in OpenEmbedded, which is a plus for us.

However, those solutions usually assume direct internet connectivity while everything we have is USB or Bluetooth Low Energy connectivity.

This task will most likely require a lot of work and has already been discussed for a long time so I decided to postpone it after the v1.0 release.

We should start by investigating what would be the most appropriate upgrade mechanism for Asteroid and then come up with a proof of concept that can be:

jrtberlin commented 4 years ago

This issue is open for a while now and there are a few new things to consider.

Newer watches tend to have WiFi and could be faster and simpler to update for the end-user:

A few thoughts on watches without WiFi:

Updates via Bluetooth: The simplest option would be to forward network connectivity to the watch via Bluetooth. This is probably slow and using this feature should notify the user to put the watch on the charger during the process.

About the mentioned checklist:

FlorentRevest commented 4 years ago

I wrote a documentation about about OTA updates for another project at https://pelux.io/pelux-architecture/master/chapters/configurations/software-update-management.html The main reason why we would want an update solution that is not opkg would be to have atomic update. But to be fair this would be a lot of work and at this point anything is better than nothing. I would have favored a "proper" approach a while back, but I now think that opkg would be just fine for AsteroidOS. The problem is indeed how to have IP connectivity or how to retrieve the packages over BLE. I did look into IP connectivity over BLE a while back and this would be a lot of work.