[meta-swupdate,v6,2/2] swupdate-rescue: add separate package
diff mbox series

Message ID 20191110194625.32119-3-adrian.freihofer@siemens.com
State Changes Requested
Headers show
Series
  • swupdate: improve systemd config
Related show

Commit Message

Freihofer, Adrian Nov. 10, 2019, 7:46 p.m. UTC
---
 .../swupdate/{swupdate => files}/swupdate          |   0
 recipes-support/swupdate/swupdate-rescue/defconfig | 100 +++++++++++++++++++++
 recipes-support/swupdate/swupdate-rescue_git.bb    |  28 ++++++
 recipes-support/swupdate/swupdate_git.bb           |   2 +
 4 files changed, 130 insertions(+)
 rename recipes-support/swupdate/{swupdate => files}/swupdate (100%)
 create mode 100644 recipes-support/swupdate/swupdate-rescue/defconfig
 create mode 100644 recipes-support/swupdate/swupdate-rescue_git.bb

Patch
diff mbox series

diff --git a/recipes-support/swupdate/swupdate/swupdate b/recipes-support/swupdate/files/swupdate
similarity index 100%
rename from recipes-support/swupdate/swupdate/swupdate
rename to recipes-support/swupdate/files/swupdate
diff --git a/recipes-support/swupdate/swupdate-rescue/defconfig b/recipes-support/swupdate/swupdate-rescue/defconfig
new file mode 100644
index 0000000..0416d48
--- /dev/null
+++ b/recipes-support/swupdate/swupdate-rescue/defconfig
@@ -0,0 +1,100 @@ 
+#
+# Automatically generated file; DO NOT EDIT.
+# Swupdate Configuration
+#
+CONFIG_HAVE_DOT_CONFIG=y
+
+#
+# Swupdate Settings
+#
+
+#
+# General Configuration
+#
+CONFIG_SCRIPTS=y
+CONFIG_HW_COMPATIBILITY=y
+CONFIG_HW_COMPATIBILITY_FILE="/etc/hwrevision"
+CONFIG_SW_VERSIONS_FILE="/etc/sw-versions"
+CONFIG_MTD=y
+CONFIG_LUA=y
+CONFIG_LUAPKG="lua"
+# CONFIG_FEATURE_SYSLOG is not set
+
+#
+# Build Options
+#
+CONFIG_CROSS_COMPILE=""
+CONFIG_SYSROOT=""
+CONFIG_EXTRA_CFLAGS=""
+CONFIG_EXTRA_LDFLAGS=""
+CONFIG_EXTRA_LDLIBS=""
+
+#
+# Debugging Options
+#
+# CONFIG_DEBUG is not set
+# CONFIG_WERROR is not set
+# CONFIG_NOCLEANUP is not set
+# CONFIG_BOOTLOADER is not set
+CONFIG_UBOOT=y
+CONFIG_UBOOT_NEWAPI=y
+CONFIG_UBOOT_DEFAULTENV="/etc/u-boot-initial-env"
+# CONFIG_BOOTLOADER_NONE is not set
+# CONFIG_BOOTLOADER_GRUB is not set
+CONFIG_UBOOT_FWENV="/etc/fw_env.config"
+# CONFIG_DOWNLOAD is not set
+# CONFIG_HASH_VERIFY is not set
+# CONFIG_SIGNED_IMAGES is not set
+# CONFIG_ENCRYPTED_IMAGES is not set
+# CONFIG_SURICATTA is not set
+
+#
+# Suricatta
+#
+
+#
+# Server
+#
+# CONFIG_SURICATTA_HAWKBIT is not set
+CONFIG_SURICATTA_SERVER_NONE=y
+CONFIG_WEBSERVER=y
+
+#
+# Webserver Features
+#
+CONFIG_MONGOOSE=y
+
+#
+# Mongoose Feature
+#
+CONFIG_MONGOOSELUA=y
+CONFIG_MONGOOSEIPV6=y
+CONFIG_MONGOOSESSL=y
+
+#
+# Archival Features
+#
+CONFIG_GUNZIP=y
+
+#
+# Parser Features
+#
+CONFIG_LIBCONFIG=y
+CONFIG_PARSERROOT=""
+# CONFIG_JSON is not set
+# CONFIG_LUAEXTERNAL is not set
+# CONFIG_SETSWDESCRIPTION is not set
+
+#
+# Image Handlers
+#
+# CONFIG_UBIVOL is not set
+CONFIG_CFI=y
+# CONFIG_CFIHAMMING1 is not set
+CONFIG_RAW=y
+CONFIG_LUASCRIPTHANDLER=y
+CONFIG_SHELLSCRIPTHANDLER=y
+# CONFIG_HANDLER_IN_LUA is not set
+# CONFIG_ARCHIVE is not set
+# CONFIG_REMOTE_HANDLER is not set
+# CONFIG_BOOTLOADERHANDLER is not set
diff --git a/recipes-support/swupdate/swupdate-rescue_git.bb b/recipes-support/swupdate/swupdate-rescue_git.bb
new file mode 100644
index 0000000..c68d127
--- /dev/null
+++ b/recipes-support/swupdate/swupdate-rescue_git.bb
@@ -0,0 +1,28 @@ 
+# This recipe is intended for a special use case. There are devices which have
+# a large data partition for the main software and a small one for a rescue
+# software. The main system runs with systemd, the rescue system runs with sysv
+# init. In this case, swupdate may be installed into the main system and
+# swupdate-rescue in the rescue image.
+
+require swupdate.inc
+
+DEFAULT_PREFERENCE = "-1"
+
+SRCREV ?= "045a618a725d0a2fce64161f10101c0004ac5d85"
+PV = "2019.04+git${SRCPV}"
+
+
+# Prevents the systemd.bbclass from deleting scripts or service files.
+rm_sysvinit_initddir () {
+    return 0
+}
+
+do_configure () {
+    cp ${WORKDIR}/defconfig ${S}/.config
+    merge_config.sh -m .config ${@" ".join(find_cfgs(d))}
+    cml1_do_configure
+}
+
+SYSTEMD_PACKAGES = ""
+
+RCONFLICTS_${PN} += "swupdate"
diff --git a/recipes-support/swupdate/swupdate_git.bb b/recipes-support/swupdate/swupdate_git.bb
index 8eef04e..cf9df90 100644
--- a/recipes-support/swupdate/swupdate_git.bb
+++ b/recipes-support/swupdate/swupdate_git.bb
@@ -8,3 +8,5 @@  PV = "2019.04+git${SRCPV}"
 SYSTEMD_SERVICE_${PN} += " \
     swupdate.socket \
 "
+
+RCONFLICTS_${PN} += "swupdate-rescue"