From 10ae4092dc80e598f996a9ec06148117b7db6dc9 Mon Sep 17 00:00:00 2001 From: Jon Oster Date: Thu, 18 Jan 2018 10:40:32 +0100 Subject: PRO-4645 Update OSTree httpd instructions --- README.adoc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.adoc b/README.adoc index 0917e45..e82b904 100644 --- a/README.adoc +++ b/README.adoc @@ -79,25 +79,25 @@ Although we have used U-Boot so far, other boot loaders can be configured work w === OSTree -OSTree 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].) - -To expose your repo, run ostree trivial-httpd using any free port: +OSTree 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: .... -ostree trivial-httpd tmp/deploy/images/qemux86-64/ostree_repo -P 57556 +cd tmp/deploy/images/qemux86-64/ostree_repo +python -m SimpleHTTPServer # port defaults to 8000 .... You can then run ostree from inside your device by adding your repo: .... -# agl-remote identifies the remote server in your local repo -ostree remote add --no-gpg-verify my-remote http://192.168.7.1:57556 ota +# This behaves like adding a Git remote; you can name it anything +ostree remote add --no-gpg-verify my-remote http://: -# ota is a branch name in the remote repo, set in OSTREE_BRANCHNAME -ostree pull my-remote ota +# If OSTREE_BRANCHNAME is set in local.conf, that will be the name of the +# branch. If not set, it defaults to the value of MACHINE (e.g. qemux86-64). +ostree pull my-remote -# poky is OS name as set in OSTREE_OSNAME -ostree admin deploy --os=poky my-remote:ota +# poky is the OS name as set in OSTREE_OSNAME +ostree admin deploy --os=poky my-remote: .... After restarting, you will boot into the newly deployed OS image. -- cgit v1.2.3-54-g00ecf From 19883e9d2602c9cb096bcd81b5a1c49e1faba74f Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Fri, 19 Jan 2018 17:02:27 +0100 Subject: Rename all instances of hsm-test and use latest aktualizr. --- README.adoc | 2 +- recipes-sota/aktualizr/aktualizr-hsm-prov.bb | 31 +++++++++++++++++++++++ recipes-sota/aktualizr/aktualizr-hsm-test-prov.bb | 31 ----------------------- recipes-sota/aktualizr/aktualizr_git.bb | 4 +-- 4 files changed, 34 insertions(+), 34 deletions(-) create mode 100644 recipes-sota/aktualizr/aktualizr-hsm-prov.bb delete mode 100644 recipes-sota/aktualizr/aktualizr-hsm-test-prov.bb diff --git a/README.adoc b/README.adoc index e82b904..fbd3239 100644 --- a/README.adoc +++ b/README.adoc @@ -69,7 +69,7 @@ Although we have used U-Boot so far, other boot loaders can be configured work w * `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". * `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. * `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]. -* `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. +* `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. * `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). * `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"`. * `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. diff --git a/recipes-sota/aktualizr/aktualizr-hsm-prov.bb b/recipes-sota/aktualizr/aktualizr-hsm-prov.bb new file mode 100644 index 0000000..944607c --- /dev/null +++ b/recipes-sota/aktualizr/aktualizr-hsm-prov.bb @@ -0,0 +1,31 @@ +SUMMARY = "Aktualizr configuration with HSM support" +DESCRIPTION = "Systemd service and configurations for Aktualizr, the SOTA Client application written in C++" +HOMEPAGE = "https://github.com/advancedtelematic/aktualizr" +SECTION = "base" +LICENSE = "MPL-2.0" +LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" + +DEPENDS = "aktualizr-native" +RDEPENDS_${PN} = "aktualizr softhsm softhsm-testtoken" + +SRC_URI = " \ + file://LICENSE \ + " +PV = "1.0" +PR = "6" + + +require environment.inc +require credentials.inc + +do_install() { + install -d ${D}${libdir}/sota + aktualizr_implicit_writer -c ${SOTA_PACKED_CREDENTIALS} --no-root-ca \ + -i ${STAGING_DIR_NATIVE}${libdir}/sota/sota_hsm_prov.toml -o ${D}${libdir}/sota/sota.toml -p ${D} +} + +FILES_${PN} = " \ + ${libdir}/sota/sota.toml \ + " + +# vim:set ts=4 sw=4 sts=4 expandtab: diff --git a/recipes-sota/aktualizr/aktualizr-hsm-test-prov.bb b/recipes-sota/aktualizr/aktualizr-hsm-test-prov.bb deleted file mode 100644 index 1e893fa..0000000 --- a/recipes-sota/aktualizr/aktualizr-hsm-test-prov.bb +++ /dev/null @@ -1,31 +0,0 @@ -SUMMARY = "Aktualizr configuration with HSM support" -DESCRIPTION = "Systemd service and configurations for Aktualizr, the SOTA Client application written in C++" -HOMEPAGE = "https://github.com/advancedtelematic/aktualizr" -SECTION = "base" -LICENSE = "MPL-2.0" -LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" - -DEPENDS = "aktualizr-native" -RDEPENDS_${PN} = "aktualizr softhsm softhsm-testtoken" - -SRC_URI = " \ - file://LICENSE \ - " -PV = "1.0" -PR = "6" - - -require environment.inc -require credentials.inc - -do_install() { - install -d ${D}${libdir}/sota - aktualizr_implicit_writer -c ${SOTA_PACKED_CREDENTIALS} --no-root-ca \ - -i ${STAGING_DIR_NATIVE}${libdir}/sota/sota_hsm_test.toml -o ${D}${libdir}/sota/sota.toml -p ${D} -} - -FILES_${PN} = " \ - ${libdir}/sota/sota.toml \ - " - -# vim:set ts=4 sw=4 sts=4 expandtab: 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 = " \ file://aktualizr.service \ file://aktualizr-serialcan.service \ " -SRCREV = "e53f2a5747bba3e4f40609aa27f3d89e80c2d784" +SRCREV = "07d73645231681848bd943074498581e930d8582" BRANCH ?= "master" S = "${WORKDIR}/git" @@ -55,7 +55,7 @@ do_install_append_class-native () { rm -f ${D}${bindir}/example-interface install -d ${D}${libdir}/sota install -m 0644 ${S}/config/sota_autoprov.toml ${D}/${libdir}/sota/sota_autoprov.toml - install -m 0644 ${S}/config/sota_hsm_test.toml ${D}/${libdir}/sota/sota_hsm_test.toml + install -m 0644 ${S}/config/sota_hsm_prov.toml ${D}/${libdir}/sota/sota_hsm_prov.toml install -m 0644 ${S}/config/sota_implicit_prov.toml ${D}/${libdir}/sota/sota_implicit_prov.toml install -m 0755 ${B}/src/sota_tools/garage-sign-prefix/src/garage-sign/bin/* ${D}${bindir} -- cgit v1.2.3-54-g00ecf