This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
agl-distro:libostree-demo [2018/02/08 13:39] leonanavi created |
agl-distro:libostree-demo [2018/02/08 13:57] (current) leonanavi |
||
---|---|---|---|
Line 6: | Line 6: | ||
====== meta-updater ====== | ====== meta-updater ====== | ||
+ | Yocto/OpenEmbedded layer [[https://github.com/advancedtelematic/meta-updater|meta-updater]] provides libostree and Aktualizr in Automotive Grade Linux (AGL). [[https://github.com/advancedtelematic/aktualizr|Aktualizr]] is a C++ reference implementation of SOTA OTA update client integrated with libostree. | ||
+ | |||
+ | ====== Demo ====== | ||
+ | |||
+ | Although the straight-forward way for doing [[https://docs.atsgarage.com/quickstarts/automotive-grade-linux.html|Software OTA updates in AGL is through ATS Garage]], it is also possible to use directly OSTree built with the **agl-sota** feature and **meta-updater**. | ||
+ | |||
+ | Required hardware for setting up a demo Raspberry Pi 3: | ||
+ | * Raspberry Pi 3 | ||
+ | * microSD card | ||
+ | * Build machine | ||
+ | * Router and a couple of Ethernet cables | ||
+ | |||
+ | For example, the following procedure performs an update of AGL image on Raspberry Pi and adds the simple text editor **nano**: | ||
+ | |||
+ | * Built AGL image for Raspberry Pi 3 and boot it on the board. | ||
+ | * Add the following line to conf/local.conf to add **nano** and rebuild the image: | ||
+ | |||
+ | IMAGE_INSTALL_append = " nano " | ||
+ | |||
+ | * On the host, go to directory: | ||
+ | |||
+ | cd tmp/deploy/images/raspberrypi3/ostree_repo | ||
+ | |||
+ | * On the host, start a simple web server: | ||
+ | |||
+ | python -m SimpleHTTPServer 8000 | ||
+ | |||
+ | * On the Raspberry Pi 3, configure OSTree remote: | ||
+ | |||
+ | ostree remote add --no-gpg-verify agl http://<host_ip>:8000 | ||
+ | |||
+ | * On the Raspberry Pi 3, check for new updates: | ||
+ | |||
+ | ostree pull agl raspberrypi3 | ||
+ | |||
+ | * On the Raspberry Pi 3, deploy an update: | ||
+ | |||
+ | ostree admin deploy agl:raspberrypi3 | ||
+ | |||
+ | * On the Raspberry Pi 3, reboot the system to apply the update: | ||
+ | |||
+ | systemctl reboot | ||
+ | |||
+ | * On the Raspberry Pi 3, verify that **nano** has been successfully provided with the update. | ||