summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Vacek <patrickvacek@gmail.com>2018-01-22 11:33:46 +0100
committerPatrick Vacek <patrickvacek@gmail.com>2018-01-22 11:33:46 +0100
commit4b73645a95088c1f4cf034064baf09ddee9b886d (patch)
tree6b91ba5e9b37a5f10c1758efd01811908428266d
parent99e49cc2e6fe29f9b58d1f38c25b7e02c72964e2 (diff)
parent19883e9d2602c9cb096bcd81b5a1c49e1faba74f (diff)
downloadmeta-updater-4b73645a95088c1f4cf034064baf09ddee9b886d.tar.gz
Merge remote-tracking branch 'github/feat/PRJ-330/hsm-not-test' into feat/PRJ-330/hsm-not-test-rocko
-rw-r--r--README.adoc22
-rw-r--r--recipes-sota/aktualizr/aktualizr-hsm-prov.bb (renamed from recipes-sota/aktualizr/aktualizr-hsm-test-prov.bb)2
-rw-r--r--recipes-sota/aktualizr/aktualizr_git.bb4
3 files changed, 14 insertions, 14 deletions
diff --git a/README.adoc b/README.adoc
index a85be18..403e0f8 100644
--- a/README.adoc
+++ b/README.adoc
@@ -79,7 +79,7 @@ Although we have used U-Boot so far, other boot loaders can be configured work w
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".
80* `OSTREE_INITRAMFS_IMAGE` - initramfs/initrd image that is used as a proxy while booting into OSTree deployment. Do not change this setting unless you are sure that your initramfs can serve as such a proxy. 80* `OSTREE_INITRAMFS_IMAGE` - initramfs/initrd image that is used as a proxy while booting into OSTree deployment. Do not change this setting unless you are sure that your initramfs can serve as such a proxy.
81* `SOTA_PACKED_CREDENTIALS` - when set, your ostree commit will be pushed to a remote repo as a bitbake step. This should be the path to a zipped credentials file in https://github.com/advancedtelematic/aktualizr/blob/master/docs/credentials.adoc[the format accepted by garage-push]. 81* `SOTA_PACKED_CREDENTIALS` - when set, your ostree commit will be pushed to a remote repo as a bitbake step. This should be the path to a zipped credentials file in https://github.com/advancedtelematic/aktualizr/blob/master/docs/credentials.adoc[the format accepted by garage-push].
82* `SOTA_CLIENT_PROV` - which provisioning method to use. Valid options are https://github.com/advancedtelematic/aktualizr/blob/master/docs/automatic-provisioning.adoc[`aktualizr-auto-prov`], https://github.com/advancedtelematic/aktualizr/blob/master/docs/implicit-provisioning.adoc[`aktualizr-implicit-prov`], and `aktualizr-hsm-test-prov`. The default is `aktualizr-auto-prov`. This can also be set to an empty string to avoid using a provisioning recipe. 82* `SOTA_CLIENT_PROV` - which provisioning method to use. Valid options are https://github.com/advancedtelematic/aktualizr/blob/master/docs/automatic-provisioning.adoc[`aktualizr-auto-prov`], https://github.com/advancedtelematic/aktualizr/blob/master/docs/implicit-provisioning.adoc[`aktualizr-implicit-prov`], and `aktualizr-hsm-prov`. The default is `aktualizr-auto-prov`. This can also be set to an empty string to avoid using a provisioning recipe.
83* `SOTA_CLIENT_FEATURES` - extensions to aktualizr. Multiple can be specified if separated by spaces. Valid options are `hsm` (to build with HSM support) and `secondary-example` (to install an example https://github.com/advancedtelematic/aktualizr/blob/master/docs/legacysecondary.adoc[legacy secondary interface] in the image). 83* `SOTA_CLIENT_FEATURES` - extensions to aktualizr. Multiple can be specified if separated by spaces. Valid options are `hsm` (to build with HSM support) and `secondary-example` (to install an example https://github.com/advancedtelematic/aktualizr/blob/master/docs/legacysecondary.adoc[legacy secondary interface] in the image).
84* `SOTA_LEGACY_SECONDARY_INTERFACE` - path to a legacy secondary interface installed on the device. To use the example interface from the Aktualizr repo, use `/usr/bin/example-interface` and make sure `SOTA_CLIENT_FEATURES = "secondary-example"`. 84* `SOTA_LEGACY_SECONDARY_INTERFACE` - path to a legacy secondary interface installed on the device. To use the example interface from the Aktualizr repo, use `/usr/bin/example-interface` and make sure `SOTA_CLIENT_FEATURES = "secondary-example"`.
85* `SOTA_SECONDARY_ECUS` - a list of paths separated by spaces of JSON configuration files for virtual secondaries on the host. These will be installed into `/var/sota/ecus` on the device. 85* `SOTA_SECONDARY_ECUS` - a list of paths separated by spaces of JSON configuration files for virtual secondaries on the host. These will be installed into `/var/sota/ecus` on the device.
@@ -89,25 +89,25 @@ Although we have used U-Boot so far, other boot loaders can be configured work w
89 89
90=== OSTree 90=== OSTree
91 91
92OSTree includes its own simple http server. It just exposes the whole OSTree repository to the network so that any remote device can pull data from it to device's local repository. To use the OSTree http server, you will need OSTree installed on your build machine. (Alternatively, you could run version built inside Yocto using bitbake's http://www.openembedded.org/wiki/Devshell[devshell].) 92OSTree used to include a simple HTTP server as part of the ostree binary, but this has been removed in more recent versions. However, OSTree repositories are self-contained directories, and can be trivially served over the network using any HTTP server. For example, you could use Python's SimpleHTTPServer:
93
94To expose your repo, run ostree trivial-httpd using any free port:
95 93
96.... 94....
97ostree trivial-httpd tmp/deploy/images/qemux86-64/ostree_repo -P 57556 95cd tmp/deploy/images/qemux86-64/ostree_repo
96python -m SimpleHTTPServer <port> # port defaults to 8000
98.... 97....
99 98
100You can then run ostree from inside your device by adding your repo: 99You can then run ostree from inside your device by adding your repo:
101 100
102.... 101....
103# agl-remote identifies the remote server in your local repo 102# This behaves like adding a Git remote; you can name it anything
104ostree remote add --no-gpg-verify my-remote http://192.168.7.1:57556 ota 103ostree remote add --no-gpg-verify my-remote http://<your-ip>:<port>
105 104
106# ota is a branch name in the remote repo, set in OSTREE_BRANCHNAME 105# If OSTREE_BRANCHNAME is set in local.conf, that will be the name of the
107ostree pull my-remote ota 106# branch. If not set, it defaults to the value of MACHINE (e.g. qemux86-64).
107ostree pull my-remote <branch>
108 108
109# poky is OS name as set in OSTREE_OSNAME 109# poky is the OS name as set in OSTREE_OSNAME
110ostree admin deploy --os=poky my-remote:ota 110ostree admin deploy --os=poky my-remote:<branch>
111.... 111....
112 112
113After restarting, you will boot into the newly deployed OS image. 113After restarting, you will boot into the newly deployed OS image.
diff --git a/recipes-sota/aktualizr/aktualizr-hsm-test-prov.bb b/recipes-sota/aktualizr/aktualizr-hsm-prov.bb
index 1e893fa..944607c 100644
--- a/recipes-sota/aktualizr/aktualizr-hsm-test-prov.bb
+++ b/recipes-sota/aktualizr/aktualizr-hsm-prov.bb
@@ -21,7 +21,7 @@ require credentials.inc
21do_install() { 21do_install() {
22 install -d ${D}${libdir}/sota 22 install -d ${D}${libdir}/sota
23 aktualizr_implicit_writer -c ${SOTA_PACKED_CREDENTIALS} --no-root-ca \ 23 aktualizr_implicit_writer -c ${SOTA_PACKED_CREDENTIALS} --no-root-ca \
24 -i ${STAGING_DIR_NATIVE}${libdir}/sota/sota_hsm_test.toml -o ${D}${libdir}/sota/sota.toml -p ${D} 24 -i ${STAGING_DIR_NATIVE}${libdir}/sota/sota_hsm_prov.toml -o ${D}${libdir}/sota/sota.toml -p ${D}
25} 25}
26 26
27FILES_${PN} = " \ 27FILES_${PN} = " \
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb
index 48ed652..872ae9a 100644
--- a/recipes-sota/aktualizr/aktualizr_git.bb
+++ b/recipes-sota/aktualizr/aktualizr_git.bb
@@ -21,7 +21,7 @@ SRC_URI = " \
21 file://aktualizr.service \ 21 file://aktualizr.service \
22 file://aktualizr-serialcan.service \ 22 file://aktualizr-serialcan.service \
23 " 23 "
24SRCREV = "e53f2a5747bba3e4f40609aa27f3d89e80c2d784" 24SRCREV = "07d73645231681848bd943074498581e930d8582"
25BRANCH ?= "master" 25BRANCH ?= "master"
26 26
27S = "${WORKDIR}/git" 27S = "${WORKDIR}/git"
@@ -55,7 +55,7 @@ do_install_append_class-native () {
55 rm -f ${D}${bindir}/example-interface 55 rm -f ${D}${bindir}/example-interface
56 install -d ${D}${libdir}/sota 56 install -d ${D}${libdir}/sota
57 install -m 0644 ${S}/config/sota_autoprov.toml ${D}/${libdir}/sota/sota_autoprov.toml 57 install -m 0644 ${S}/config/sota_autoprov.toml ${D}/${libdir}/sota/sota_autoprov.toml
58 install -m 0644 ${S}/config/sota_hsm_test.toml ${D}/${libdir}/sota/sota_hsm_test.toml 58 install -m 0644 ${S}/config/sota_hsm_prov.toml ${D}/${libdir}/sota/sota_hsm_prov.toml
59 install -m 0644 ${S}/config/sota_implicit_prov.toml ${D}/${libdir}/sota/sota_implicit_prov.toml 59 install -m 0644 ${S}/config/sota_implicit_prov.toml ${D}/${libdir}/sota/sota_implicit_prov.toml
60 60
61 install -m 0755 ${B}/src/sota_tools/garage-sign-prefix/src/garage-sign/bin/* ${D}${bindir} 61 install -m 0755 ${B}/src/sota_tools/garage-sign-prefix/src/garage-sign/bin/* ${D}${bindir}