summaryrefslogtreecommitdiffstats
path: root/README.adoc
diff options
context:
space:
mode:
Diffstat (limited to 'README.adoc')
-rw-r--r--README.adoc42
1 files changed, 28 insertions, 14 deletions
diff --git a/README.adoc b/README.adoc
index 403e0f8..c87bd01 100644
--- a/README.adoc
+++ b/README.adoc
@@ -17,10 +17,10 @@ If you don't already have a Yocto project that you want to add OTA to, you can u
17If you already have a Yocto-based project and you want to add atomic filesystem updates to it, you just need to do three things: 17If you already have a Yocto-based project and you want to add atomic filesystem updates to it, you just need to do three things:
18 18
191. Clone the `meta-updater` layer and add it to your https://www.yoctoproject.org/docs/2.1/ref-manual/ref-manual.html#structure-build-conf-bblayers.conf[bblayers.conf]. 191. Clone the `meta-updater` layer and add it to your https://www.yoctoproject.org/docs/2.1/ref-manual/ref-manual.html#structure-build-conf-bblayers.conf[bblayers.conf].
202. Clone BSP integration layer (meta-updater-$\{PLATFORM}, e.g. https://github.com/advancedtelematic/meta-updater-raspberrypi[meta-updater-raspberrypi]) and add it to your conf/bblayers.conf. If your board isn't supported yet, you could write a BSP integration for it yourself. See the <<Adding support for your board>> section for the details. 202. Clone BSP integration layer (`meta-updater-$\{PLATFORM}`, e.g. https://github.com/advancedtelematic/meta-updater-raspberrypi[meta-updater-raspberrypi]) and add it to your `conf/bblayers.conf`. If your board isn't supported yet, you could write a BSP integration for it yourself. See the <<Adding support for your board>> section for the details.
213. Set up your https://www.yoctoproject.org/docs/2.1/ref-manual/ref-manual.html#var-DISTRO[distro]. If you are using "poky", the default distro in Yocto, you can change it in your conf/local.conf to "poky-sota". Alternatively, if you are using your own or third party distro configuration, you can add 'INHERIT += " sota"' to it, thus combining capabilities of your distro with meta-updater features. 213. Set up your https://www.yoctoproject.org/docs/2.1/ref-manual/ref-manual.html#var-DISTRO[distro]. If you are using "poky", the default distro in Yocto, you can change it in your `conf/local.conf` to "poky-sota". Alternatively, if you are using your own or third party distro configuration, you can add `INHERIT += " sota"` to it, thus combining capabilities of your distro with meta-updater features.
22 22
23You can then build your image as usual, with bitbake. After building the root file system, bitbake will then create an https://ostree.readthedocs.io/en/latest/manual/adapting-existing/[OSTree-enabled version] of it, commit it to your local OSTree repo and (optionally) push it to a remote server. Additionally, a live disk image will be created (normally named $\{IMAGE_NAME}.-sdimg-ota e.g. core-image-raspberrypi3.rpi-sdimg-ota). You can control this behaviour through <<variables in your local.conf,OSTree-related variables in your local.conf>>. 23You can then build your image as usual, with bitbake. After building the root file system, bitbake will then create an https://ostree.readthedocs.io/en/latest/manual/adapting-existing/[OSTree-enabled version] of it, commit it to your local OSTree repo and (optionally) push it to a remote server. Additionally, a live disk image will be created (normally named `$\{IMAGE_NAME}.-sdimg-ota` e.g. `core-image-raspberrypi3.rpi-sdimg-ota`). You can control this behaviour through <<variables in your local.conf,OSTree-related variables in your local.conf>>.
24 24
25=== Build in AGL 25=== Build in AGL
26 26
@@ -30,19 +30,19 @@ With AGL you can just add agl-sota feature while configuring your build environm
30source meta-agl/scripts/aglsetup.sh -m porter agl-demo agl-appfw-smack agl-devel agl-sota 30source meta-agl/scripts/aglsetup.sh -m porter agl-demo agl-appfw-smack agl-devel agl-sota
31.... 31....
32 32
33you can then run 33You can then run:
34 34
35.... 35....
36bitbake agl-demo-platform 36bitbake agl-demo-platform
37.... 37....
38 38
39and get as a result an "ostree_repo" folder in your images directory (tmp/deploy/images/$\{MACHINE}/ostree_repo). It will contain 39and get as a result an `ostree_repo` folder in your images directory (`tmp/deploy/images/$\{MACHINE}/ostree_repo`). It will contain:
40 40
41* your OSTree repository, with the rootfs committed as an OSTree deployment, 41* your OSTree repository, with the rootfs committed as an OSTree deployment,
42* an 'otaimg' bootstrap image, which is an OSTree physical sysroot as a burnable filesystem image, and optionally 42* an `otaimg` bootstrap image, which is an OSTree physical sysroot as a burnable filesystem image, and optionally
43* some machine-dependent live images (e.g. '_.rpi-sdimg-ota' for Raspberry Pi or '_.porter-sdimg-ota' Renesas Porter board). 43* some machine-dependent live images (e.g. `.rpi-sdimg-ota` for Raspberry Pi or `.porter-sdimg-ota` Renesas Porter board).
44 44
45Although aglsetup.sh hooks provide reasonable defaults for SOTA-related variables, you may want to tune some of them. 45Although `aglsetup.sh` hooks provide reasonable defaults for SOTA-related variables, you may want to tune some of them.
46 46
47=== Build problems 47=== Build problems
48 48
@@ -73,7 +73,7 @@ You may take a look into https://github.com/advancedtelematic/meta-updater-minno
73 73
74Although we have used U-Boot so far, other boot loaders can be configured work with OSTree as well. 74Although we have used U-Boot so far, other boot loaders can be configured work with OSTree as well.
75 75
76== SOTA-related variables in local.conf 76== SOTA-related variables in `local.conf`
77 77
78* `OSTREE_REPO` - path to your OSTree repository. Defaults to `$\{DEPLOY_DIR_IMAGE}/ostree_repo` 78* `OSTREE_REPO` - path to your OSTree repository. Defaults to `$\{DEPLOY_DIR_IMAGE}/ostree_repo`
79* `OSTREE_OSNAME` - OS deployment name on your target device. For more information about deployments and osnames see the https://ostree.readthedocs.io/en/latest/manual/deployment/[OSTree documentation]. Defaults to "poky". 79* `OSTREE_OSNAME` - OS deployment name on your target device. For more information about deployments and osnames see the https://ostree.readthedocs.io/en/latest/manual/deployment/[OSTree documentation]. Defaults to "poky".
@@ -133,20 +133,34 @@ The https://github.com/advancedtelematic/aktualizr[aktualizr repo] contains a to
133garage-push --repo=/path/to/ostree-repo --ref=mybranch --credentials=/path/to/credentials.zip 133garage-push --repo=/path/to/ostree-repo --ref=mybranch --credentials=/path/to/credentials.zip
134.... 134....
135 135
136You can set SOTA_PACKED_CREDENTIALS in your local.conf to make your build results be automatically synchronized with a remote server. Credentials are stored in the JSON format described in the https://github.com/advancedtelematic/aktualizr/blob/master/README.sotatools.adoc[garage-push README]. This JSON file can be optionally stored inside a zip file, although if it is stored this way, the JSON file must be named treehub.json. 136You can set `SOTA_PACKED_CREDENTIALS` in your `local.conf` to automatically synchronize your build results with a remote server. Credentials are stored in an archive as described in the https://github.com/advancedtelematic/aktualizr/blob/master/docs/credentials.adoc[aktualizr documentation].
137 137
138=== QA 138== QA with `oe-selftest`
139 139
140This layer relies on the test framework oe-selftest for quality assurance. Follow the steps below to run the tests: 140This layer relies on the test framework oe-selftest for quality assurance. Follow the steps below to run the tests:
141 141
142* Append the line below to conf/local.conf 1421. Append the line below to `conf/local.conf` to disable the warning about supported operating systems:
143+
144```
145SANITY_TESTED_DISTROS = ""
146```
143 147
1482. If your image does not already include an ssh daemon such as dropbear or openssh, add this line to `conf/local.conf` as well:
149+
144``` 150```
145SANITY_TESTED_DISTROS="" 151IMAGE_INSTALL_append = " dropbear "
146``` 152```
147 153
148* Run oe-selftest: 1543. To be able to build an image for the grub tests, you will need to install https://github.com/tianocore/tianocore.github.io/wiki/OVMF[TianoCore's ovmf] package on your host system. On Debian-like systems, you can do so with this command:
155+
156```
157sudo apt install ovmf
158```
149 159
1604. Run oe-selftest:
161+
150``` 162```
151oe-selftest --run-tests updater 163oe-selftest --run-tests updater
152``` 164```
165
166For more information about oe-selftest, including details about how to run individual test modules or classes, please refer to the https://wiki.yoctoproject.org/wiki/Oe-selftest[Yocto Project wiki].