From 8c1b0f8f9ecdab27173ece72b26fead7f983df40 Mon Sep 17 00:00:00 2001 From: Francisco Gil Date: Fri, 21 Oct 2022 17:28:16 +0200 Subject: [PATCH] dualboot: get rid of configuration file for dualboot Now the cloud connector has all the logic to detect if its running in a dual_boot system, so it is not needed this anymore. We need to modify on the fly the path to save the image in a dualboot system. Signed-off-by: Francisco Gil --- ...1-cc.conf-pre-set-for-dual-boot-mode.patch | 48 ------------------- .../cloudconnector/cloudconnector_git.bb | 5 +- 2 files changed, 4 insertions(+), 49 deletions(-) delete mode 100644 meta-digi-dey/recipes-digi/cloudconnector/cloudconnector/0001-cc.conf-pre-set-for-dual-boot-mode.patch diff --git a/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector/0001-cc.conf-pre-set-for-dual-boot-mode.patch b/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector/0001-cc.conf-pre-set-for-dual-boot-mode.patch deleted file mode 100644 index 2150182ca..000000000 --- a/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector/0001-cc.conf-pre-set-for-dual-boot-mode.patch +++ /dev/null @@ -1,48 +0,0 @@ -From: Hector Palacios -Date: Thu, 8 Jul 2021 09:43:50 +0200 -Subject: [PATCH] cc.conf: pre-set for dual boot mode - -- Change default firmware download path to external media - '/home/root/'. -- Remove '/mnt/update' virtual directory. -- Enable dual boot mode. - -Signed-off-by: Hector Palacios ---- - app/cfg_files/cc.conf | 9 ++------- - 1 file changed, 2 insertions(+), 7 deletions(-) - -diff --git a/app/cfg_files/cc.conf b/app/cfg_files/cc.conf -index 7018efb..bff9332 100644 ---- a/app/cfg_files/cc.conf -+++ b/app/cfg_files/cc.conf -@@ -99,27 +99,22 @@ virtual-dirs - vdir { - name = "tmp" - path = "/tmp" - } - -- vdir { -- name = "update" -- path = "/mnt/update" -- } -- - vdir { - name = "media" - path = "/run/media" - } - } - - # Firmware Download Path: Absolute path to download the firmware packages from - # the cloud. It must be an existing directory. --firmware_download_path = /mnt/update -+firmware_download_path = /home/root - - # Enable dualboot support --dualboot = false -+dualboot = true - - # Enables on the fly firmware update support - on_the_fly = false - - #=============================================================================== diff --git a/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb b/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb index 2614073b5..0b3d004d2 100644 --- a/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb +++ b/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb @@ -19,7 +19,6 @@ SRC_URI = " \ ${CC_GIT_URI};branch=${SRCBRANCH} \ file://cloud-connector-init \ file://cloud-connector.service \ - ${@oe.utils.vartrue('DUALBOOT_ENABLED', 'file://0001-cc.conf-pre-set-for-dual-boot-mode.patch', '', d)} \ " S = "${WORKDIR}/git" @@ -35,6 +34,10 @@ do_install() { install -m 0644 ${WORKDIR}/cloud-connector.service ${D}${systemd_unitdir}/system/ fi + if ${@oe.utils.vartrue('DUALBOOT_ENABLED', 'true', 'false', d)}; then + sed -i "/firmware_download_path = \/mnt\/update/c\firmware_download_path = \/home\/root" ${D}${sysconfdir}/cc.conf + fi + install -d ${D}${sysconfdir}/init.d/ install -m 755 ${WORKDIR}/cloud-connector-init ${D}${sysconfdir}/cloud-connector ln -sf /etc/cloud-connector ${D}${sysconfdir}/init.d/cloud-connector