Simplified doc-site generation
[AGL/documentation.git] / docs / 2_Architecture_Guides / 2.2_Security_Blueprint / 8_Update_(Over_The_Air) / 1.2.8.1_Firmware_Over_The_Air.md
1 ---
2 edit_link: ''
3 title: FOTA
4 origin_url: >-
5   https://raw.githubusercontent.com/automotive-grade-linux/docs-sources/master/docs/security-blueprint/part-8/1-FOTA.md
6 ---
7
8 <!-- WARNING: This file is generated by fetch_docs.js using /home/boron/Documents/AGL/docs-webtemplate/site/_data/tocs/architecture/master/security_blueprint-security-blueprint-book.yml -->
9
10 # Firmware Over The Air
11
12 The firmware update is critical since its alteration back to compromise the
13 entire system. It is therefore necessary to take appropriate protective measures.
14
15 AGL includes the _meta-updater_ Yocto layer that enables OTA software
16 updates via [Uptane](https://uptane.github.io), an automotive-specific extension
17 to [The Update Framework](https://theupdateframework.github.io/). Uptane and TUF
18 are open standards that define a secure protocol for delivering and verifying
19 updates even when the servers and network--internet and car-internal--aren't fully trusted.
20
21 _meta-updater_ includes the application [`aktualizr`](https://github.com/advancedtelematic/aktualizr),
22 developed Advanced Telematic Systems (now part of HERE Technologies) that enables
23 OTA for an ECU. `aktualizr` combined with Uptane is suitable for updating the
24 firmware, software, and other packages on even functionally critical ECUs.
25 `aktualizr` can be enabled with the free, open souce backend
26 [`ota-community-edition`](https://github.com/advancedtelematic/ota-community-edition).
27
28 This FOTA update mechanism can be enabled through the `agl-sota` feature.
29
30 ## Building
31
32 To build an AGL image that uses `aktualizr`, the following can be used.
33
34 ```
35 source meta-agl/scripts/aglsetup.sh -m <machine> agl-sota <other-features...>
36 ```
37
38 During the build, _meta-updater_ will use credentials downloaded from `ota-community-edition`
39 to sign metadata verifying the build as authentic. These signatures are part of the Uptane
40 framework and are used to verify FOTA updates.
41
42 ## Atomic Upgrades with Rollbacks
43
44 `aktualizr`'s primary method of updating firmware is to use `libostree` with binary diffs.
45 The binary diffs use the least amout of bandwidth, and by it's nature `libostree` stores
46 current and previous firmware versions on disk or in flash memory to allow for rollbacks.
47
48 `libostree` is a content addressable object store much like `git`. Versions are specified
49 via SHA2-256. These hashes are signed in the Uptane metadata and are robust against
50 cryptographic compromise.