diff options
19 files changed, 125 insertions, 87 deletions
diff --git a/README.adoc b/README.adoc index 41d8e96..b047f91 100644 --- a/README.adoc +++ b/README.adoc | |||
| @@ -19,6 +19,20 @@ toc::[] | |||
| 19 | 19 | ||
| 20 | If you don't already have a Yocto project that you want to add OTA to, you can use the https://docs.atsgarage.com/quickstarts/raspberry-pi.html[HERE OTA Connect Quickstart] project to rapidly get up and running on a Raspberry Pi. It takes a standard https://www.yoctoproject.org/tools-resources/projects/poky[poky] distribution, and adds OTA and OSTree capabilities. | 20 | If you don't already have a Yocto project that you want to add OTA to, you can use the https://docs.atsgarage.com/quickstarts/raspberry-pi.html[HERE OTA Connect Quickstart] project to rapidly get up and running on a Raspberry Pi. It takes a standard https://www.yoctoproject.org/tools-resources/projects/poky[poky] distribution, and adds OTA and OSTree capabilities. |
| 21 | 21 | ||
| 22 | === Dependencies | ||
| 23 | |||
| 24 | In addition to the link:https://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#required-packages-for-the-build-host[standard Yocto dependencies], meta-updater generally requires a few additional dependencies, depending on your use case and target platform. To install these additional packages on Debian/Ubuntu, run this: | ||
| 25 | |||
| 26 | .... | ||
| 27 | sudo apt install cpu-checker default-jre parted | ||
| 28 | .... | ||
| 29 | |||
| 30 | To build for https://github.com/advancedtelematic/meta-updater-minnowboard[Minnowboard] with GRUB, you will also need to install https://github.com/tianocore/tianocore.github.io/wiki/OVMF[TianoCore's ovmf] package on your host system. On Debian/Ubuntu, you can do so with this command: | ||
| 31 | |||
| 32 | .... | ||
| 33 | sudo apt install ovmf | ||
| 34 | .... | ||
| 35 | |||
| 22 | === Adding meta-updater capabilities to your build | 36 | === Adding meta-updater capabilities to your build |
| 23 | 37 | ||
| 24 | 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: | 38 | 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: |
| @@ -72,7 +86,7 @@ If your board isn't supported yet, you can add board integration code yourself. | |||
| 72 | 86 | ||
| 73 | You may take a look into https://github.com/advancedtelematic/meta-updater-minnowboard[Minnowboard] or https://github.com/advancedtelematic/meta-updater-raspberrypi[Raspberry Pi] integration layers for examples. | 87 | You may take a look into https://github.com/advancedtelematic/meta-updater-minnowboard[Minnowboard] or https://github.com/advancedtelematic/meta-updater-raspberrypi[Raspberry Pi] integration layers for examples. |
| 74 | 88 | ||
| 75 | Although we have used U-Boot so far, other boot loaders can be configured work with OSTree as well. | 89 | Although we have focused on U-Boot and GRUB so far, other bootloaders can be configured to work with OSTree as well. |
| 76 | 90 | ||
| 77 | Your images will also need network connectivity to be able to reach an actual OTA backend. Our 'poky-sota' distribution does not mandate or install a default network manager but our supported platforms use the `virtual/network-configuration` recipe, which can be used as a starting example. | 91 | Your images will also need network connectivity to be able to reach an actual OTA backend. Our 'poky-sota' distribution does not mandate or install a default network manager but our supported platforms use the `virtual/network-configuration` recipe, which can be used as a starting example. |
| 78 | 92 | ||
| @@ -90,7 +104,7 @@ Your images will also need network connectivity to be able to reach an actual OT | |||
| 90 | * `SOTA_DEPLOY_CREDENTIALS` - when set to '1' (default value), deploys credentials to the built image. Override it in `local.conf` to built a generic image that can be provisioned manually after the build. | 104 | * `SOTA_DEPLOY_CREDENTIALS` - when set to '1' (default value), deploys credentials to the built image. Override it in `local.conf` to built a generic image that can be provisioned manually after the build. |
| 91 | * `SOTA_CLIENT_PROV` - which provisioning method to use. Valid options are `aktualizr-shared-prov`, `aktualizr-device-prov`, and `aktualizr-device-prov-hsm`. For more information on these provisioning methods, see the https://docs.ota.here.com/client-config/client-provisioning-methods.html[OTA Connect documentation]. The default is `aktualizr-shared-prov`. This can also be set to an empty string to avoid using a provisioning recipe. | 105 | * `SOTA_CLIENT_PROV` - which provisioning method to use. Valid options are `aktualizr-shared-prov`, `aktualizr-device-prov`, and `aktualizr-device-prov-hsm`. For more information on these provisioning methods, see the https://docs.ota.here.com/client-config/client-provisioning-methods.html[OTA Connect documentation]. The default is `aktualizr-shared-prov`. This can also be set to an empty string to avoid using a provisioning recipe. |
| 92 | * `SOTA_CLIENT_FEATURES` - extensions to aktualizr. The only valid options are `hsm` (to build with HSM support) and `secondary-network` (to set up a simulated 'in-vehicle' network with support for a primary node with a DHCP server and a secondary node with a DHCP client). | 106 | * `SOTA_CLIENT_FEATURES` - extensions to aktualizr. The only valid options are `hsm` (to build with HSM support) and `secondary-network` (to set up a simulated 'in-vehicle' network with support for a primary node with a DHCP server and a secondary node with a DHCP client). |
| 93 | * `SOTA_SECONDARY_CONFIG_DIR` - a directory containing JSON configuration files for virtual secondaries on the host. These will be installed into `/etc/sota/ecus` on the device and automatically provided to aktualizr. | 107 | * `SOTA_SECONDARY_CONFIG` - a file containing JSON configuration for secondaries. It will be installed into `/etc/sota/ecus` on the device and automatically provided to aktualizr. See link:https://github.com/advancedtelematic/aktualizr/blob/master/docs/posix-secondaries-bitbaking.adoc[here] for more details. |
| 94 | * `SOTA_HARDWARE_ID` - a custom hardware ID that will be written to the aktualizr config. Defaults to MACHINE if not set. | 108 | * `SOTA_HARDWARE_ID` - a custom hardware ID that will be written to the aktualizr config. Defaults to MACHINE if not set. |
| 95 | * `SOTA_MAIN_DTB` - base device tree to use with the kernel. Used together with FIT images. You can change it, and the device tree will also be changed after the update. | 109 | * `SOTA_MAIN_DTB` - base device tree to use with the kernel. Used together with FIT images. You can change it, and the device tree will also be changed after the update. |
| 96 | * `SOTA_DT_OVERLAYS` - whitespace-separated list of used device tree overlays for FIT image. This list is OSTree-updateable as well. | 110 | * `SOTA_DT_OVERLAYS` - whitespace-separated list of used device tree overlays for FIT image. This list is OSTree-updateable as well. |
| @@ -220,11 +234,7 @@ IMAGE_INSTALL_append = " dropbear " | |||
| 220 | 234 | ||
| 221 | 3. Some tests require that `SOTA_PACKED_CREDENTIALS` is set in your `conf/local.conf`. See the <<sota-related-variables-in-localconf,SOTA-related variables in local.conf>> section. | 235 | 3. Some tests require that `SOTA_PACKED_CREDENTIALS` is set in your `conf/local.conf`. See the <<sota-related-variables-in-localconf,SOTA-related variables in local.conf>> section. |
| 222 | 236 | ||
| 223 | 4. 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: | 237 | 4. To be able to build an image for the GRUB tests, you will need to install the ovmf package as described in the <<Dependencies,dependencies>>. |
| 224 | + | ||
| 225 | ``` | ||
| 226 | sudo apt install ovmf | ||
| 227 | ``` | ||
| 228 | 238 | ||
| 229 | 5. Run oe-selftest: | 239 | 5. Run oe-selftest: |
| 230 | + | 240 | + |
| @@ -261,3 +271,9 @@ Provisioning procedure depends on your provisioning recipe, i.e. the value of `S | |||
| 261 | ** put URL to the server backend (together with protocol prefix and port number) at `/var/sota/gateway.url`. If you're using HERE OTA Connect, you can find the URL in the `autoprov.url` file in your credentials archive. | 271 | ** put URL to the server backend (together with protocol prefix and port number) at `/var/sota/gateway.url`. If you're using HERE OTA Connect, you can find the URL in the `autoprov.url` file in your credentials archive. |
| 262 | ** put root CA certificate (for the *server*, not for the *device*) at `/var/sota/import/root.crt`. | 272 | ** put root CA certificate (for the *server*, not for the *device*) at `/var/sota/import/root.crt`. |
| 263 | ** put client certificate and private key to slots 1 and 2 of the PKCS#11-compatible device. | 273 | ** put client certificate and private key to slots 1 and 2 of the PKCS#11-compatible device. |
| 274 | |||
| 275 | == License | ||
| 276 | |||
| 277 | This code is licensed under the link:COPYING.MIT[MIT license], a copy of which can be found in this repository. All code is copyright HERE Europe B.V., 2016-2019. | ||
| 278 | |||
| 279 | We require that contributors accept the terms of Linux Foundation's link:https://developercertificate.org/[Developer Certificate of Origin]. Please see the https://github.com/advancedtelematic/aktualizr/blob/master/CONTRIBUTING.md[contribution instructions of aktualizr] for more information. | ||
diff --git a/classes/sota_raspberrypi.bbclass b/classes/sota_raspberrypi.bbclass index 3add247..69f09fd 100644 --- a/classes/sota_raspberrypi.bbclass +++ b/classes/sota_raspberrypi.bbclass | |||
| @@ -27,11 +27,14 @@ IMAGE_BOOT_FILES_sota = "bcm2835-bootfiles/* u-boot.bin;${SDIMG_KERNELIMAGE}" | |||
| 27 | # Just the overlays that will be used should be listed | 27 | # Just the overlays that will be used should be listed |
| 28 | KERNEL_DEVICETREE_raspberrypi2_sota ?= " bcm2709-rpi-2-b.dtb " | 28 | KERNEL_DEVICETREE_raspberrypi2_sota ?= " bcm2709-rpi-2-b.dtb " |
| 29 | KERNEL_DEVICETREE_raspberrypi3_sota ?= " bcm2710-rpi-3-b.dtb overlays/vc4-kms-v3d.dtbo overlays/rpi-ft5406.dtbo" | 29 | KERNEL_DEVICETREE_raspberrypi3_sota ?= " bcm2710-rpi-3-b.dtb overlays/vc4-kms-v3d.dtbo overlays/rpi-ft5406.dtbo" |
| 30 | KERNEL_DEVICETREE_raspberrypi3-64_sota ?= " broadcom/bcm2710-rpi-3-b.dtb overlays/vc4-kms-v3d.dtbo overlays/vc4-fkms-v3d.dtbo overlays/rpi-ft5406.dtbo" | ||
| 30 | 31 | ||
| 31 | SOTA_MAIN_DTB_raspberrypi2 ?= "bcm2709-rpi-2-b.dtb" | 32 | SOTA_MAIN_DTB_raspberrypi2 ?= "bcm2709-rpi-2-b.dtb" |
| 32 | SOTA_MAIN_DTB_raspberrypi3 ?= "bcm2710-rpi-3-b.dtb" | 33 | SOTA_MAIN_DTB_raspberrypi3 ?= "bcm2710-rpi-3-b.dtb" |
| 34 | SOTA_MAIN_DTB_raspberrypi3-64 ?= "broadcom_bcm2710-rpi-3-b.dtb" | ||
| 33 | 35 | ||
| 34 | SOTA_DT_OVERLAYS_raspberrypi3 ?= "vc4-kms-v3d.dtbo rpi-ft5406.dtbo" | 36 | SOTA_DT_OVERLAYS_raspberrypi3 ?= "vc4-kms-v3d.dtbo rpi-ft5406.dtbo" |
| 37 | SOTA_DT_OVERLAYS_raspberrypi3-64 ?= "vc4-kms-v3d.dtbo vc4-fkms-v3d.dtbo rpi-ft5406.dtbo" | ||
| 35 | 38 | ||
| 36 | # Kernel args normally provided by RPi's internal bootloader. Non-updateable | 39 | # Kernel args normally provided by RPi's internal bootloader. Non-updateable |
| 37 | OSTREE_KERNEL_ARGS_sota ?= " 8250.nr_uarts=1 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=614 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 " | 40 | OSTREE_KERNEL_ARGS_sota ?= " 8250.nr_uarts=1 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=614 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 " |
diff --git a/conf/include/bblayers/sota_raspberrypi3-64.inc b/conf/include/bblayers/sota_raspberrypi3-64.inc new file mode 100644 index 0000000..ea420ba --- /dev/null +++ b/conf/include/bblayers/sota_raspberrypi3-64.inc | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | BBLAYERS += "${METADIR}/meta-updater-raspberrypi" | ||
| 2 | BBLAYERS += "${METADIR}/meta-raspberrypi" | ||
diff --git a/conf/include/bblayers/sota_raspberrypi3.inc b/conf/include/bblayers/sota_raspberrypi3.inc index 03f8f44..42d5eb1 100644 --- a/conf/include/bblayers/sota_raspberrypi3.inc +++ b/conf/include/bblayers/sota_raspberrypi3.inc | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | BBLAYERS += "${METADIR}/meta-openembedded/meta-python" | 1 | BBLAYERS += "${METADIR}/meta-openembedded/meta-python" |
| 2 | BBLAYERS += "${METADIR}/meta-updater-raspberrypi" | 2 | BBLAYERS += "${METADIR}/meta-updater-raspberrypi" |
| 3 | BBLAYERS += "${METADIR}/meta-raspberrypi" | 3 | BBLAYERS += "${METADIR}/meta-raspberrypi" |
| 4 | BBLAYERS += "${METADIR}/meta-openembedded/meta-networking" | ||
diff --git a/conf/local.conf.sample.append b/conf/local.conf.sample.append new file mode 100644 index 0000000..4588ec3 --- /dev/null +++ b/conf/local.conf.sample.append | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | |||
| 2 | # | ||
| 3 | # meta-updater configuration, see README.adoc and aktualizr's | ||
| 4 | # documentation for more options and detailed documentation | ||
| 5 | # | ||
| 6 | |||
| 7 | MACHINE = "##MACHINE##" | ||
| 8 | DISTRO = "poky-sota-systemd" | ||
| 9 | |||
| 10 | # General SOTA setup | ||
| 11 | #SOTA_CLIENT_PROV = "aktualizr-auto-prov" | ||
| 12 | #SOTA_PACKED_CREDENTIALS = "/path/to/credentials.zip" | ||
| 13 | |||
| 14 | # Uncomment this line to start an ssh server at boot automatically | ||
| 15 | #IMAGE_FEATURES += "ssh-server-dropbear" | ||
| 16 | |||
| 17 | # Uncomment this line to set the log level of aktualizr to 'debug' (from 'info' | ||
| 18 | # by default) | ||
| 19 | #IMAGE_INSTALL_append += " aktualizr-log-debug" | ||
| 20 | |||
| 21 | # Store systemd logs in persistent storage | ||
| 22 | # | ||
| 23 | # It greatly helps diagnosing issues on testing devices but should be | ||
| 24 | # carefully weighted against file system usage and flash device wear for | ||
| 25 | # production systems. Please refer to systemd's docs for more details | ||
| 26 | IMAGE_INSTALL_append += " systemd-journald-persistent" | ||
| 27 | |||
| 28 | # Set resource limits for aktualizr service | ||
| 29 | # | ||
| 30 | # Uncomment these lines to change the default parameters. | ||
| 31 | # | ||
| 32 | #RESOURCE_CPU_WEIGHT_pn-aktualizr = "100" | ||
| 33 | #RESOURCE_MEMORY_HIGH_pn-aktualizr = "100M" | ||
| 34 | #RESOURCE_MEMORY_MAX_pn-aktualizr = "80%" | ||
| 35 | IMAGE_INSTALL_append += " aktualizr-resource-control" | ||
diff --git a/lib/oeqa/selftest/cases/updater_qemux86_64.py b/lib/oeqa/selftest/cases/updater_qemux86_64.py index 80d135f..2b4726c 100644 --- a/lib/oeqa/selftest/cases/updater_qemux86_64.py +++ b/lib/oeqa/selftest/cases/updater_qemux86_64.py | |||
| @@ -358,7 +358,7 @@ class IpSecondaryTests(OESelftestTestCase): | |||
| 358 | self._test_ctx.append_config('SOTA_CLIENT_PROV = " aktualizr-shared-prov "') | 358 | self._test_ctx.append_config('SOTA_CLIENT_PROV = " aktualizr-shared-prov "') |
| 359 | 359 | ||
| 360 | def is_ecu_registered(self, ecu_id): | 360 | def is_ecu_registered(self, ecu_id): |
| 361 | max_number_of_tries = 20 | 361 | max_number_of_tries = 40 |
| 362 | try_counter = 0 | 362 | try_counter = 0 |
| 363 | 363 | ||
| 364 | # aktualizr-info is not always able to load ECU serials from DB | 364 | # aktualizr-info is not always able to load ECU serials from DB |
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index 75d5bd9..5de341e 100644 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb | |||
| @@ -6,7 +6,7 @@ LICENSE = "MPL-2.0" | |||
| 6 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" | 6 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" |
| 7 | 7 | ||
| 8 | DEPENDS = "boost curl openssl libarchive libsodium sqlite3 asn1c-native" | 8 | DEPENDS = "boost curl openssl libarchive libsodium sqlite3 asn1c-native" |
| 9 | DEPENDS_append = "${@bb.utils.contains('PTEST_ENABLED', '1', ' coreutils-native ostree-native aktualizr-native ', '', d)}" | 9 | DEPENDS_append = "${@bb.utils.contains('PTEST_ENABLED', '1', ' coreutils-native net-tools-native ostree-native aktualizr-native ', '', d)}" |
| 10 | RDEPENDS_${PN}_class-target = "aktualizr-configs lshw" | 10 | RDEPENDS_${PN}_class-target = "aktualizr-configs lshw" |
| 11 | RDEPENDS_${PN}-host-tools = "aktualizr aktualizr-repo aktualizr-cert-provider ${@bb.utils.contains('PACKAGECONFIG', 'sota-tools', 'garage-deploy garage-push', '', d)}" | 11 | RDEPENDS_${PN}-host-tools = "aktualizr aktualizr-repo aktualizr-cert-provider ${@bb.utils.contains('PACKAGECONFIG', 'sota-tools', 'garage-deploy garage-push', '', d)}" |
| 12 | 12 | ||
| @@ -31,7 +31,7 @@ SRC_URI = " \ | |||
| 31 | SRC_URI[md5sum] = "e104ccd4f32e52571a5fc0e5042db050" | 31 | SRC_URI[md5sum] = "e104ccd4f32e52571a5fc0e5042db050" |
| 32 | SRC_URI[sha256sum] = "c590be1a57523bfe097af82279eda5c97cf40ae47fb27162cf33c469702c8a9b" | 32 | SRC_URI[sha256sum] = "c590be1a57523bfe097af82279eda5c97cf40ae47fb27162cf33c469702c8a9b" |
| 33 | 33 | ||
| 34 | SRCREV = "fce5854ff10e7efd52d69bbaf68dc2af990d5746" | 34 | SRCREV = "9c592cf9d8dfcd995d47753f2be7bd1a2b56c7da" |
| 35 | BRANCH ?= "master" | 35 | BRANCH ?= "master" |
| 36 | 36 | ||
| 37 | S = "${WORKDIR}/git" | 37 | S = "${WORKDIR}/git" |
| @@ -106,16 +106,6 @@ do_install_append () { | |||
| 106 | printf "[provision]\nprimary_ecu_hardware_id = ${SOTA_HARDWARE_ID}\n" > ${D}${libdir}/sota/conf.d/40-hardware-id.toml | 106 | printf "[provision]\nprimary_ecu_hardware_id = ${SOTA_HARDWARE_ID}\n" > ${D}${libdir}/sota/conf.d/40-hardware-id.toml |
| 107 | fi | 107 | fi |
| 108 | 108 | ||
| 109 | if [ -n "${SOTA_SECONDARY_CONFIG_DIR}" ]; then | ||
| 110 | if [ -d "${SOTA_SECONDARY_CONFIG_DIR}" ]; then | ||
| 111 | install -m 0700 -d ${D}${sysconfdir}/sota/ecus | ||
| 112 | install -m 0644 "${SOTA_SECONDARY_CONFIG_DIR}"/* ${D}${sysconfdir}/sota/ecus/ | ||
| 113 | printf "[uptane]\nsecondary_configs_dir = /etc/sota/ecus/\n" > ${D}${libdir}/sota/conf.d/30-secondary-configs-dir.toml | ||
| 114 | else | ||
| 115 | bbwarn "SOTA_SECONDARY_CONFIG_DIR is set to an invalid directory (${SOTA_SECONDARY_CONFIG_DIR})" | ||
| 116 | fi | ||
| 117 | fi | ||
| 118 | |||
| 119 | install -m 0755 -d ${D}${systemd_unitdir}/system | 109 | install -m 0755 -d ${D}${systemd_unitdir}/system |
| 120 | aktualizr_service=${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'serialcan', '${WORKDIR}/aktualizr-serialcan.service', '${WORKDIR}/aktualizr.service', d)} | 110 | aktualizr_service=${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'serialcan', '${WORKDIR}/aktualizr-serialcan.service', '${WORKDIR}/aktualizr.service', d)} |
| 121 | install -m 0644 ${aktualizr_service} ${D}${systemd_unitdir}/system/aktualizr.service | 111 | install -m 0644 ${aktualizr_service} ${D}${systemd_unitdir}/system/aktualizr.service |
diff --git a/recipes-support/python-canonicaljson/python-canonicaljson.bb b/recipes-support/python-canonicaljson/python-canonicaljson.bb deleted file mode 100644 index d8a0728..0000000 --- a/recipes-support/python-canonicaljson/python-canonicaljson.bb +++ /dev/null | |||
| @@ -1,18 +0,0 @@ | |||
| 1 | DESCRIPTION = "python-canonicaljson recipe" | ||
| 2 | |||
| 3 | LICENSE = "Apache-2.0" | ||
| 4 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" | ||
| 5 | |||
| 6 | SRCREV = "92e2c06871cc275c2a8b8e3e899141a212aae0e8" | ||
| 7 | SRC_URI = "git://github.com/matrix-org/python-canonicaljson.git" | ||
| 8 | S = "${WORKDIR}/git" | ||
| 9 | |||
| 10 | # Generate with: | ||
| 11 | # git describe --tags | cut -b2- | ||
| 12 | PV = "1.0.0" | ||
| 13 | inherit setuptools | ||
| 14 | |||
| 15 | RDEPENDS_${PN} = "\ | ||
| 16 | python-simplejson \ | ||
| 17 | python-frozendict \ | ||
| 18 | " | ||
diff --git a/recipes-support/python-frozendict/python-frozendict.bb b/recipes-support/python-frozendict/python-frozendict.bb deleted file mode 100644 index 79fe5c8..0000000 --- a/recipes-support/python-frozendict/python-frozendict.bb +++ /dev/null | |||
| @@ -1,12 +0,0 @@ | |||
| 1 | DESCRIPTION = "python-frozendict recipe" | ||
| 2 | |||
| 3 | LICENSE = "BSD" | ||
| 4 | LIC_FILES_CHKSUM = "file://${S}/LICENSE.txt;md5=f4da037a49c09b456fdbbc7a5bd36132" | ||
| 5 | |||
| 6 | SRCREV = "c5d16bafcca7b72ff3e8f40d3a9081e4c9233f1b" | ||
| 7 | SRC_URI = "git://github.com/slezica/python-frozendict.git" | ||
| 8 | S = "${WORKDIR}/git" | ||
| 9 | |||
| 10 | PV = "1.2" | ||
| 11 | inherit setuptools | ||
| 12 | |||
diff --git a/recipes-support/python-petname/python-petname.bb b/recipes-support/python-petname/python-petname.bb deleted file mode 100644 index 9abd5d9..0000000 --- a/recipes-support/python-petname/python-petname.bb +++ /dev/null | |||
| @@ -1,16 +0,0 @@ | |||
| 1 | DESCRIPTION = "python-petname recipe" | ||
| 2 | |||
| 3 | LICENSE = "Apache-2.0" | ||
| 4 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" | ||
| 5 | |||
| 6 | SRCREV = "d0b767cdb1567defb104f29c3fd022239a7f231e" | ||
| 7 | SRC_URI = "git://github.com/dustinkirkland/python-petname.git" | ||
| 8 | S = "${WORKDIR}/git" | ||
| 9 | |||
| 10 | PV = "2.2" | ||
| 11 | inherit setuptools | ||
| 12 | RDEPENDS_${PN} = " python-setuptools \ | ||
| 13 | python-argparse \ | ||
| 14 | " | ||
| 15 | |||
| 16 | FILES_${PN} = "${libdir} ${bindir}/petname" | ||
diff --git a/recipes-support/systemd-journald-persistent/files/10-persistent-journal.conf b/recipes-support/systemd-journald-persistent/files/10-persistent-journal.conf new file mode 100644 index 0000000..a56527c --- /dev/null +++ b/recipes-support/systemd-journald-persistent/files/10-persistent-journal.conf | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | [Journal] | ||
| 2 | Storage=persistent | ||
| 3 | SystemMaxUse=64M | ||
diff --git a/recipes-support/systemd-journald-persistent/systemd-journald-persistent.bb b/recipes-support/systemd-journald-persistent/systemd-journald-persistent.bb new file mode 100644 index 0000000..1715fe1 --- /dev/null +++ b/recipes-support/systemd-journald-persistent/systemd-journald-persistent.bb | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | SUMMARY = "Configuration for systemd-journald" | ||
| 2 | DESCRIPTION = "Provides configuration for systemd-journald, so that logs are \ | ||
| 3 | stored on persistent storage" | ||
| 4 | LICENSE = "MPL-2.0" | ||
| 5 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad" | ||
| 6 | |||
| 7 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
| 8 | |||
| 9 | SRC_URI_append = " file://10-persistent-journal.conf" | ||
| 10 | PR = "r1" | ||
| 11 | |||
| 12 | S = "${WORKDIR}" | ||
| 13 | |||
| 14 | FILES_${PN} = "${systemd_unitdir}/journald.conf.d/*" | ||
| 15 | |||
| 16 | do_install() { | ||
| 17 | install -d ${D}/${systemd_unitdir}/journald.conf.d | ||
| 18 | install -m 0644 ${WORKDIR}/10-persistent-journal.conf ${D}/${systemd_unitdir}/journald.conf.d | ||
| 19 | } | ||
| 20 | |||
diff --git a/recipes-test/demo-config/shared-conf.inc b/recipes-test/demo-config/shared-conf.inc index ce2bb44..c5ab598 100644 --- a/recipes-test/demo-config/shared-conf.inc +++ b/recipes-test/demo-config/shared-conf.inc | |||
| @@ -2,4 +2,4 @@ SECONDARY_IP ?= "10.0.3.2" | |||
| 2 | SECONDARY_PORT ?= "9050" | 2 | SECONDARY_PORT ?= "9050" |
| 3 | PRIMARY_IP ?= "10.0.3.1" | 3 | PRIMARY_IP ?= "10.0.3.1" |
| 4 | PRIMARY_PORT ?= "9040" | 4 | PRIMARY_PORT ?= "9040" |
| 5 | PRIMARY_WAIT_TIMEOUT ?= "120" | 5 | PRIMARY_WAIT_TIMEOUT ?= "240" |
diff --git a/recipes-test/demo-network-config/files/26-multihomed-client.network b/recipes-test/demo-network-config/files/26-multihomed-client.network new file mode 100644 index 0000000..f1e6cc6 --- /dev/null +++ b/recipes-test/demo-network-config/files/26-multihomed-client.network | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | [Match] | ||
| 2 | Name=@IFNAME@ | ||
| 3 | |||
| 4 | [Network] | ||
| 5 | Description=Multihomed network. DHCP-assigned IP for Primary<->Backend. Statically assigned IP for Primary<->Secondary | ||
| 6 | DHCP=yes | ||
| 7 | |||
| 8 | [Address] | ||
| 9 | Address=@ADDR@ | ||
diff --git a/recipes-test/demo-network-config/network-config.inc b/recipes-test/demo-network-config/network-config.inc new file mode 100644 index 0000000..ed623d4 --- /dev/null +++ b/recipes-test/demo-network-config/network-config.inc | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | SRC_URI_append = "\ | ||
| 2 | file://26-${CONF_TYPE}-client.network \ | ||
| 3 | " | ||
| 4 | |||
| 5 | SECONDARY_INTERFACE ?= "${@ 'eth0' if d.getVar('MACHINE') == 'raspberrypi3' else 'enp0s5'}" | ||
| 6 | |||
| 7 | do_install_append() { | ||
| 8 | bbnote "Network configuration type to be applied: ${CONF_TYPE}" | ||
| 9 | install -d ${D}/usr/lib/systemd/network | ||
| 10 | install -m 0644 ${WORKDIR}/26-${CONF_TYPE}-client.network ${D}/usr/lib/systemd/network/ | ||
| 11 | sed -i -e 's|@ADDR@|${IP_ADDR}|g' \ | ||
| 12 | -e 's|@IFNAME@|${SECONDARY_INTERFACE}|g' \ | ||
| 13 | ${D}/usr/lib/systemd/network/26-${CONF_TYPE}-client.network | ||
| 14 | |||
| 15 | } | ||
| 16 | |||
| 17 | # vim:set ts=4 sw=4 sts=4 expandtab: | ||
diff --git a/recipes-test/demo-network-config/primary-network-config.bb b/recipes-test/demo-network-config/primary-network-config.bb index c7daa15..d840a95 100644 --- a/recipes-test/demo-network-config/primary-network-config.bb +++ b/recipes-test/demo-network-config/primary-network-config.bb | |||
| @@ -18,8 +18,10 @@ do_install() { | |||
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | PRIMARY_IP ?= "10.0.3.1" | 20 | PRIMARY_IP ?= "10.0.3.1" |
| 21 | |||
| 21 | IP_ADDR = "${PRIMARY_IP}" | 22 | IP_ADDR = "${PRIMARY_IP}" |
| 23 | CONF_TYPE ?= "${@ 'multihomed' if d.getVar('MACHINE') == 'raspberrypi3' and d.getVar('RPI_WIFI_ENABLE') != '1' else 'static'}" | ||
| 22 | 24 | ||
| 23 | require static-network-config.inc | 25 | require network-config.inc |
| 24 | 26 | ||
| 25 | # vim:set ts=4 sw=4 sts=4 expandtab: | 27 | # vim:set ts=4 sw=4 sts=4 expandtab: |
diff --git a/recipes-test/demo-network-config/secondary-network-config.bb b/recipes-test/demo-network-config/secondary-network-config.bb index c70d88a..b1d70f1 100644 --- a/recipes-test/demo-network-config/secondary-network-config.bb +++ b/recipes-test/demo-network-config/secondary-network-config.bb | |||
| @@ -23,7 +23,8 @@ do_install() { | |||
| 23 | 23 | ||
| 24 | SECONDARY_IP ?= "10.0.3.2" | 24 | SECONDARY_IP ?= "10.0.3.2" |
| 25 | IP_ADDR = "${SECONDARY_IP}" | 25 | IP_ADDR = "${SECONDARY_IP}" |
| 26 | CONF_TYPE = "static" | ||
| 26 | 27 | ||
| 27 | require static-network-config.inc | 28 | require network-config.inc |
| 28 | 29 | ||
| 29 | # vim:set ts=4 sw=4 sts=4 expandtab: | 30 | # vim:set ts=4 sw=4 sts=4 expandtab: |
diff --git a/recipes-test/demo-network-config/static-network-config.inc b/recipes-test/demo-network-config/static-network-config.inc deleted file mode 100644 index e64675e..0000000 --- a/recipes-test/demo-network-config/static-network-config.inc +++ /dev/null | |||
| @@ -1,16 +0,0 @@ | |||
| 1 | SRC_URI_append = "\ | ||
| 2 | file://26-static-client.network \ | ||
| 3 | " | ||
| 4 | |||
| 5 | SECONDARY_INTERFACE ?= "enp0s5" | ||
| 6 | |||
| 7 | do_install_append() { | ||
| 8 | install -d ${D}/usr/lib/systemd/network | ||
| 9 | install -m 0644 ${WORKDIR}/26-static-client.network ${D}/usr/lib/systemd/network/ | ||
| 10 | sed -i -e 's|@ADDR@|${IP_ADDR}|g' \ | ||
| 11 | -e 's|@IFNAME@|${SECONDARY_INTERFACE}|g' \ | ||
| 12 | ${D}/usr/lib/systemd/network/26-static-client.network | ||
| 13 | |||
| 14 | } | ||
| 15 | |||
| 16 | # vim:set ts=4 sw=4 sts=4 expandtab: | ||
diff --git a/scripts/envsetup.sh b/scripts/envsetup.sh index e912824..5827bc2 100755 --- a/scripts/envsetup.sh +++ b/scripts/envsetup.sh | |||
| @@ -25,11 +25,12 @@ METADIR=${METADIR:-${SOURCEDIR}/../..} | |||
| 25 | 25 | ||
| 26 | if [[ ! -f "${BUILDDIR}/conf/local.conf" ]]; then | 26 | if [[ ! -f "${BUILDDIR}/conf/local.conf" ]]; then |
| 27 | source "$METADIR/poky/oe-init-build-env" "$BUILDDIR" | 27 | source "$METADIR/poky/oe-init-build-env" "$BUILDDIR" |
| 28 | |||
| 28 | echo "METADIR := \"\${@os.path.abspath('${METADIR}')}\"" >> conf/bblayers.conf | 29 | echo "METADIR := \"\${@os.path.abspath('${METADIR}')}\"" >> conf/bblayers.conf |
| 29 | cat "${METADIR}/meta-updater/conf/include/bblayers/sota.inc" >> conf/bblayers.conf | 30 | cat "${METADIR}/meta-updater/conf/include/bblayers/sota.inc" >> conf/bblayers.conf |
| 30 | cat "${METADIR}/meta-updater/conf/include/bblayers/sota_${MACHINE}.inc" >> conf/bblayers.conf | 31 | cat "${METADIR}/meta-updater/conf/include/bblayers/sota_${MACHINE}.inc" >> conf/bblayers.conf |
| 31 | echo "MACHINE = \"${MACHINE}\"" >> conf/local.conf | 32 | |
| 32 | echo "DISTRO = \"poky-sota-systemd\"" >> conf/local.conf | 33 | sed "s/##MACHINE##/$MACHINE/g" "${METADIR}/meta-updater/conf/local.conf.sample.append" >> conf/local.conf |
| 33 | else | 34 | else |
| 34 | source "$METADIR/poky/oe-init-build-env" "$BUILDDIR" | 35 | source "$METADIR/poky/oe-init-build-env" "$BUILDDIR" |
| 35 | fi | 36 | fi |
