diff options
| -rw-r--r-- | classes/sota_raspberrypi.bbclass | 2 | ||||
| -rw-r--r-- | recipes-sota/aktualizr/aktualizr-uboot-env-rollback.bb | 23 | ||||
| -rwxr-xr-x | recipes-sota/aktualizr/aktualizr_git.bb | 4 | ||||
| -rw-r--r-- | recipes-sota/aktualizr/files/aktualizr.service | 4 |
4 files changed, 30 insertions, 3 deletions
diff --git a/classes/sota_raspberrypi.bbclass b/classes/sota_raspberrypi.bbclass index 9b6a5aa..600f9e9 100644 --- a/classes/sota_raspberrypi.bbclass +++ b/classes/sota_raspberrypi.bbclass | |||
| @@ -20,3 +20,5 @@ KERNEL_DEVICETREE_raspberrypi3_sota ?= " bcm2710-rpi-3-b.dtb overlays/vc4-kms-v3 | |||
| 20 | 20 | ||
| 21 | # Kernel args normally provided by RPi's internal bootloader. Non-updateable | 21 | # Kernel args normally provided by RPi's internal bootloader. Non-updateable |
| 22 | OSTREE_KERNEL_ARGS_sota ?= " 8250.nr_uarts=1 bcm2708_fb.fbwidth=720 bcm2708_fb.fbheight=480 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 dwc_otg.lpm_enable=0 console=ttyS0,115200 usbhid.mousepoll=0 " | 22 | OSTREE_KERNEL_ARGS_sota ?= " 8250.nr_uarts=1 bcm2708_fb.fbwidth=720 bcm2708_fb.fbheight=480 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 dwc_otg.lpm_enable=0 console=ttyS0,115200 usbhid.mousepoll=0 " |
| 23 | |||
| 24 | SOTA_CLIENT_FEATURES_append = " ubootenv" | ||
diff --git a/recipes-sota/aktualizr/aktualizr-uboot-env-rollback.bb b/recipes-sota/aktualizr/aktualizr-uboot-env-rollback.bb new file mode 100644 index 0000000..c9753e4 --- /dev/null +++ b/recipes-sota/aktualizr/aktualizr-uboot-env-rollback.bb | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | SUMMARY = "Aktualizr configuration snippet to enable uboot bootcount function" | ||
| 2 | HOMEPAGE = "https://github.com/advancedtelematic/aktualizr" | ||
| 3 | SECTION = "base" | ||
| 4 | LICENSE = "MPL-2.0" | ||
| 5 | LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" | ||
| 6 | DEPENDS = "aktualizr-native" | ||
| 7 | RDEPENDS_${PN} = "aktualizr" | ||
| 8 | |||
| 9 | SRC_URI = " \ | ||
| 10 | file://LICENSE \ | ||
| 11 | " | ||
| 12 | |||
| 13 | do_install() { | ||
| 14 | install -m 0700 -d ${D}${libdir}/sota/conf.d | ||
| 15 | install -m 0644 ${STAGING_DIR_NATIVE}${libdir}/sota/sota_uboot_env.toml ${D}${libdir}/sota/conf.d/30-rollback.toml | ||
| 16 | } | ||
| 17 | |||
| 18 | FILES_${PN} = " \ | ||
| 19 | ${libdir}/sota/conf.d \ | ||
| 20 | ${libdir}/sota/conf.d/30-rollback.toml \ | ||
| 21 | " | ||
| 22 | |||
| 23 | # 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 9112546..b9d5f9c 100755 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb | |||
| @@ -12,6 +12,8 @@ DEPENDS_append_class-native = "glib-2.0-native " | |||
| 12 | RDEPENDS_${PN}_class-target = "lshw " | 12 | RDEPENDS_${PN}_class-target = "lshw " |
| 13 | RDEPENDS_${PN}_append_class-target = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'serialcan', ' slcand-start', '', d)} " | 13 | RDEPENDS_${PN}_append_class-target = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'serialcan', ' slcand-start', '', d)} " |
| 14 | RDEPENDS_${PN}_append_class-target = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', ' softhsm softhsm-testtoken', '', d)}" | 14 | RDEPENDS_${PN}_append_class-target = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', ' softhsm softhsm-testtoken', '', d)}" |
| 15 | RDEPENDS_${PN}_append_class-target = " ${@oe.utils.ifelse(d.getVar('OSTREE_BOOTLOADER', True) == 'u-boot', 'u-boot-fw-utils', '')}" | ||
| 16 | RDEPENDS_${PN}_append_class-target = " ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'ubootenv', ' aktualizr-uboot-env-rollback', '', d)} " | ||
| 15 | 17 | ||
| 16 | RDEPENDS_${PN}_append_class-target = " ${PN}-tools " | 18 | RDEPENDS_${PN}_append_class-target = " ${PN}-tools " |
| 17 | RDEPENDS_${PN}-secondary_append_class-target = " ${PN}-tools " | 19 | RDEPENDS_${PN}-secondary_append_class-target = " ${PN}-tools " |
| @@ -66,6 +68,7 @@ do_install_append () { | |||
| 66 | install -m 0644 ${S}/config/sota_implicit_prov.toml ${D}/${libdir}/sota/sota_implicit_prov.toml | 68 | install -m 0644 ${S}/config/sota_implicit_prov.toml ${D}/${libdir}/sota/sota_implicit_prov.toml |
| 67 | install -m 0644 ${S}/config/sota_implicit_prov_ca.toml ${D}/${libdir}/sota/sota_implicit_prov_ca.toml | 69 | install -m 0644 ${S}/config/sota_implicit_prov_ca.toml ${D}/${libdir}/sota/sota_implicit_prov_ca.toml |
| 68 | install -m 0644 ${S}/config/sota_secondary.toml ${D}/${libdir}/sota/sota_secondary.toml | 70 | install -m 0644 ${S}/config/sota_secondary.toml ${D}/${libdir}/sota/sota_secondary.toml |
| 71 | install -m 0644 ${S}/config/sota_uboot_env.toml ${D}/${libdir}/sota/sota_uboot_env.toml | ||
| 69 | install -d ${D}${systemd_unitdir}/system | 72 | install -d ${D}${systemd_unitdir}/system |
| 70 | install -m 0644 ${WORKDIR}/aktualizr-secondary.socket ${D}${systemd_unitdir}/system/aktualizr-secondary.socket | 73 | install -m 0644 ${WORKDIR}/aktualizr-secondary.socket ${D}${systemd_unitdir}/system/aktualizr-secondary.socket |
| 71 | install -m 0644 ${WORKDIR}/aktualizr-secondary.service ${D}${systemd_unitdir}/system/aktualizr-secondary.service | 74 | install -m 0644 ${WORKDIR}/aktualizr-secondary.service ${D}${systemd_unitdir}/system/aktualizr-secondary.service |
| @@ -113,6 +116,7 @@ FILES_${PN}-host-tools = " \ | |||
| 113 | ${libdir}/sota/sota_hsm_prov.toml \ | 116 | ${libdir}/sota/sota_hsm_prov.toml \ |
| 114 | ${libdir}/sota/sota_implicit_prov.toml \ | 117 | ${libdir}/sota/sota_implicit_prov.toml \ |
| 115 | ${libdir}/sota/sota_implicit_prov_ca.toml \ | 118 | ${libdir}/sota/sota_implicit_prov_ca.toml \ |
| 119 | ${libdir}/sota/sota_uboot_env.toml \ | ||
| 116 | " | 120 | " |
| 117 | 121 | ||
| 118 | FILES_${PN}-tools = " \ | 122 | FILES_${PN}-tools = " \ |
diff --git a/recipes-sota/aktualizr/files/aktualizr.service b/recipes-sota/aktualizr/files/aktualizr.service index 1c2e1df..6de4474 100644 --- a/recipes-sota/aktualizr/files/aktualizr.service +++ b/recipes-sota/aktualizr/files/aktualizr.service | |||
| @@ -1,8 +1,6 @@ | |||
| 1 | [Unit] | 1 | [Unit] |
| 2 | Description=Aktualizr SOTA Client | 2 | Description=Aktualizr SOTA Client |
| 3 | Wants=network-online.target | 3 | After=network.target |
| 4 | After=network.target network-online.target | ||
| 5 | Requires=network-online.target | ||
| 6 | 4 | ||
| 7 | [Service] | 5 | [Service] |
| 8 | RestartSec=10 | 6 | RestartSec=10 |
