summaryrefslogtreecommitdiffstats
path: root/external/meta-updater/recipes-test/demo-config/secondary-config.bb
diff options
context:
space:
mode:
authorToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp>2020-03-30 09:24:26 +0900
committerToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp>2020-03-30 09:24:26 +0900
commit5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (patch)
treeb4bb18dcd1487dbf1ea8127e5671b7bb2eded033 /external/meta-updater/recipes-test/demo-config/secondary-config.bb
parent706ad73eb02caf8532deaf5d38995bd258725cb8 (diff)
agl-basesystem
Diffstat (limited to 'external/meta-updater/recipes-test/demo-config/secondary-config.bb')
-rw-r--r--external/meta-updater/recipes-test/demo-config/secondary-config.bb41
1 files changed, 41 insertions, 0 deletions
diff --git a/external/meta-updater/recipes-test/demo-config/secondary-config.bb b/external/meta-updater/recipes-test/demo-config/secondary-config.bb
new file mode 100644
index 00000000..9411646b
--- /dev/null
+++ b/external/meta-updater/recipes-test/demo-config/secondary-config.bb
@@ -0,0 +1,41 @@
+DESCRIPTION = "Sample configuration for an Uptane Secondary"
+LICENSE = "MPL-2.0"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad"
+
+require shared-conf.inc
+
+SECONDARY_SERIAL_ID ?= ""
+SOTA_HARDWARE_ID ?= "${MACHINE}-sndry"
+SECONDARY_HARDWARE_ID ?= "${SOTA_HARDWARE_ID}"
+
+SRC_URI = "\
+ file://30-fake-pacman.toml \
+ file://35-network-config.toml \
+ file://45-id-config.toml \
+ "
+
+do_install () {
+ install -m 0700 -d ${D}${libdir}/sota/conf.d
+ install -m 0644 ${WORKDIR}/30-fake-pacman.toml ${D}/${libdir}/sota/conf.d/30-fake-pacman.toml
+
+ install -m 0644 ${WORKDIR}/35-network-config.toml ${D}/${libdir}/sota/conf.d/35-network-config.toml
+ sed -i -e 's|@PORT@|${SECONDARY_PORT}|g' \
+ -e 's|@PRIMARY_IP@|${PRIMARY_IP}|g' \
+ -e 's|@PRIMARY_PORT@|${PRIMARY_PORT}|g' \
+ ${D}/${libdir}/sota/conf.d/35-network-config.toml
+
+ install -m 0644 ${WORKDIR}/45-id-config.toml ${D}/${libdir}/sota/conf.d/45-id-config.toml
+ sed -i -e 's|@SERIAL@|${SECONDARY_SERIAL_ID}|g' \
+ -e 's|@HWID@|${SECONDARY_HARDWARE_ID}|g' \
+ ${D}/${libdir}/sota/conf.d/45-id-config.toml
+
+}
+
+FILES_${PN} = " \
+ ${libdir}/sota/conf.d \
+ ${libdir}/sota/conf.d/30-fake-pacman.toml \
+ ${libdir}/sota/conf.d/35-network-config.toml \
+ ${libdir}/sota/conf.d/45-id-config.toml \
+ "
+
+# vim:set ts=4 sw=4 sts=4 expandtab: