diff options
Diffstat (limited to 'README.adoc')
-rw-r--r-- | README.adoc | 42 |
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 | |||
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 | === 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 | ||
74 | Although we have used U-Boot so far, other boot loaders can be configured work with OSTree as well. | 74 | Although 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 | |||
133 | garage-push --repo=/path/to/ostree-repo --ref=mybranch --credentials=/path/to/credentials.zip | 133 | garage-push --repo=/path/to/ostree-repo --ref=mybranch --credentials=/path/to/credentials.zip |
134 | .... | 134 | .... |
135 | 135 | ||
136 | 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. | 136 | You 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 | ||
140 | This layer relies on the test framework oe-selftest for quality assurance. Follow the steps below to run the tests: | 140 | This 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 | 142 | 1. Append the line below to `conf/local.conf` to disable the warning about supported operating systems: |
143 | + | ||
144 | ``` | ||
145 | SANITY_TESTED_DISTROS = "" | ||
146 | ``` | ||
143 | 147 | ||
148 | 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: | ||
149 | + | ||
144 | ``` | 150 | ``` |
145 | SANITY_TESTED_DISTROS="" | 151 | IMAGE_INSTALL_append = " dropbear " |
146 | ``` | 152 | ``` |
147 | 153 | ||
148 | * Run oe-selftest: | 154 | 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: |
155 | + | ||
156 | ``` | ||
157 | sudo apt install ovmf | ||
158 | ``` | ||
149 | 159 | ||
160 | 4. Run oe-selftest: | ||
161 | + | ||
150 | ``` | 162 | ``` |
151 | oe-selftest --run-tests updater | 163 | oe-selftest --run-tests updater |
152 | ``` | 164 | ``` |
165 | |||
166 | 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]. | ||