summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Vacek <patrickvacek@gmail.com>2019-05-24 16:45:51 +0200
committerGitHub <noreply@github.com>2019-05-24 16:45:51 +0200
commita6c241c31f0afbf762a230db4b92c1758db66158 (patch)
treee80ae09472d6f15b03e4e348e8848e0b60681913
parent1a7de47c3d376645a90d2958c902d18e7cafdfae (diff)
parent4cd7635e3a68071f7dc84ebc80d13d3967a25839 (diff)
downloadmeta-updater-a6c241c31f0afbf762a230db4b92c1758db66158.tar.gz
Merge pull request #521 from advancedtelematic/feat/test-polling-interval
aktualizr-polling-interval: new config fragment.
-rw-r--r--README.adoc1
-rw-r--r--recipes-sota/config/aktualizr-polling-interval.bb29
-rw-r--r--recipes-sota/config/files/60-polling-interval.toml2
3 files changed, 32 insertions, 0 deletions
diff --git a/README.adoc b/README.adoc
index 9d17413..b447a2f 100644
--- a/README.adoc
+++ b/README.adoc
@@ -96,6 +96,7 @@ Your images will also need network connectivity to be able to reach an actual OT
96* `SOTA_DT_OVERLAYS` - whitespace-separated list of used device tree overlays for FIT image. This list is OSTree-updateable as well. 96* `SOTA_DT_OVERLAYS` - whitespace-separated list of used device tree overlays for FIT image. This list is OSTree-updateable as well.
97* `SOTA_EXTRA_CONF_FRAGS` - extra https://lxr.missinglinkelectronics.com/uboot/doc/uImage.FIT/overlay-fdt-boot.txt[configuration fragments] for FIT image. 97* `SOTA_EXTRA_CONF_FRAGS` - extra https://lxr.missinglinkelectronics.com/uboot/doc/uImage.FIT/overlay-fdt-boot.txt[configuration fragments] for FIT image.
98* `RESOURCE_xxx_pn-aktualizr` - controls maximum resource usage of the aktualizr service, when `aktualizr-resource-control` is installed on the image. See <<aktualizr service resource control>> for details. 98* `RESOURCE_xxx_pn-aktualizr` - controls maximum resource usage of the aktualizr service, when `aktualizr-resource-control` is installed on the image. See <<aktualizr service resource control>> for details.
99* `SOTA_POLLING_SEC` - sets polling interval for aktualizr to check for updates if aktualizr-polling-sec is included in the image.
99 100
100== Usage 101== Usage
101 102
diff --git a/recipes-sota/config/aktualizr-polling-interval.bb b/recipes-sota/config/aktualizr-polling-interval.bb
new file mode 100644
index 0000000..53c008a
--- /dev/null
+++ b/recipes-sota/config/aktualizr-polling-interval.bb
@@ -0,0 +1,29 @@
1SUMMARY = "Set polling interval in Aktualizr"
2DESCRIPTION = "Configures aktualizr to poll at a custom frequency (suitable for testing or other purposes)"
3HOMEPAGE = "https://github.com/advancedtelematic/aktualizr"
4SECTION = "base"
5LICENSE = "MPL-2.0"
6LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad"
7
8inherit allarch
9
10SRC_URI = " \
11 file://60-polling-interval.toml \
12 "
13
14SOTA_POLLING_SEC ?= "30"
15
16do_install_append () {
17 install -m 0700 -d ${D}${libdir}/sota/conf.d
18 install -m 0644 ${WORKDIR}/60-polling-interval.toml ${D}${libdir}/sota/conf.d/60-polling-interval.toml
19
20 sed -i -e 's|@POLLING_SEC@|${SOTA_POLLING_SEC}|g' \
21 ${D}${libdir}/sota/conf.d/60-polling-interval.toml
22}
23
24FILES_${PN} = " \
25 ${libdir}/sota/conf.d/60-polling-interval.toml \
26 "
27
28# vim:set ts=4 sw=4 sts=4 expandtab:
29
diff --git a/recipes-sota/config/files/60-polling-interval.toml b/recipes-sota/config/files/60-polling-interval.toml
new file mode 100644
index 0000000..7d25d05
--- /dev/null
+++ b/recipes-sota/config/files/60-polling-interval.toml
@@ -0,0 +1,2 @@
1[uptane]
2polling_sec = @POLLING_SEC@