diff options
author | Patrick Vacek <patrickvacek@gmail.com> | 2018-02-19 16:51:48 +0100 |
---|---|---|
committer | Patrick Vacek <patrickvacek@gmail.com> | 2018-02-20 11:01:34 +0100 |
commit | eb173b6cba56c5b97465a6506a9a69b2f1c858f7 (patch) | |
tree | e9e09438ccdda6fcbd6ad51fba7d9574597363b3 /README.adoc | |
parent | c6690b907a0a4525848dfed6cde2d89d8554b5f1 (diff) | |
download | meta-updater-eb173b6cba56c5b97465a6506a9a69b2f1c858f7.tar.gz |
Better oe-selftest documentation.
Also clean up some minor formatting.
Diffstat (limited to 'README.adoc')
-rw-r--r-- | README.adoc | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/README.adoc b/README.adoc index fbd3239..e074913 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 | |||
17 | If you already have a Yocto-based project and you want to add atomic filesystem updates to it, you just need to do three things: | 17 | If 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 | ||
19 | 1. 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]. | 19 | 1. 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]. |
20 | 2. 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. | 20 | 2. 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. |
21 | 3. 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. | 21 | 3. 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 | ||
23 | You 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>>. | 23 | You 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 | |||
30 | source meta-agl/scripts/aglsetup.sh -m porter agl-demo agl-appfw-smack agl-devel agl-sota | 30 | source meta-agl/scripts/aglsetup.sh -m porter agl-demo agl-appfw-smack agl-devel agl-sota |
31 | .... | 31 | .... |
32 | 32 | ||
33 | you can then run | 33 | You can then run: |
34 | 34 | ||
35 | .... | 35 | .... |
36 | bitbake agl-demo-platform | 36 | bitbake agl-demo-platform |
37 | .... | 37 | .... |
38 | 38 | ||
39 | and get as a result an "ostree_repo" folder in your images directory (tmp/deploy/images/$\{MACHINE}/ostree_repo). It will contain | 39 | and 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 | ||
45 | Although aglsetup.sh hooks provide reasonable defaults for SOTA-related variables, you may want to tune some of them. | 45 | Although `aglsetup.sh` hooks provide reasonable defaults for SOTA-related variables, you may want to tune some of them. |
46 | 46 | ||
47 | == Supported boards | 47 | == Supported boards |
48 | 48 | ||
@@ -63,7 +63,7 @@ You may take a look into https://github.com/advancedtelematic/meta-updater-minno | |||
63 | 63 | ||
64 | Although we have used U-Boot so far, other boot loaders can be configured work with OSTree as well. | 64 | Although we have used U-Boot so far, other boot loaders can be configured work with OSTree as well. |
65 | 65 | ||
66 | == SOTA-related variables in local.conf | 66 | == SOTA-related variables in `local.conf` |
67 | 67 | ||
68 | * `OSTREE_REPO` - path to your OSTree repository. Defaults to `$\{DEPLOY_DIR_IMAGE}/ostree_repo` | 68 | * `OSTREE_REPO` - path to your OSTree repository. Defaults to `$\{DEPLOY_DIR_IMAGE}/ostree_repo` |
69 | * `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". | 69 | * `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". |
@@ -125,18 +125,32 @@ garage-push --repo=/path/to/ostree-repo --ref=mybranch --credentials=/path/to/cr | |||
125 | 125 | ||
126 | You 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. | 126 | You 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. |
127 | 127 | ||
128 | === QA | 128 | == QA with `oe-selftest` |
129 | 129 | ||
130 | This layer relies on the test framework oe-selftest for quality assurance. Follow the steps below to run the tests: | 130 | This layer relies on the test framework oe-selftest for quality assurance. Follow the steps below to run the tests: |
131 | 131 | ||
132 | * Append the line below to conf/local.conf | 132 | 1. Append the line below to `conf/local.conf` to disable the warning about supported operating systems: |
133 | + | ||
134 | ``` | ||
135 | SANITY_TESTED_DISTROS = "" | ||
136 | ``` | ||
133 | 137 | ||
138 | 2. If your image does not already include an ssh daemon such as dropbear or openssh, add this line to `conf/local.conf` as well: | ||
139 | + | ||
134 | ``` | 140 | ``` |
135 | SANITY_TESTED_DISTROS="" | 141 | IMAGE_INSTALL_append = " dropbear " |
136 | ``` | 142 | ``` |
137 | 143 | ||
138 | * Run oe-selftest: | 144 | 3. 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: |
145 | + | ||
146 | ``` | ||
147 | sudo apt install ovmf | ||
148 | ``` | ||
139 | 149 | ||
150 | 4. Run oe-selftest: | ||
151 | + | ||
140 | ``` | 152 | ``` |
141 | oe-selftest --run-tests updater | 153 | oe-selftest --run-tests updater |
142 | ``` | 154 | ``` |
155 | |||
156 | For 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]. | ||