meta-digi/meta-digi-dey/recipes-support/swupdate/swupdate/0002-config-add-on-the-fly-...

48 lines
1.4 KiB
Diff

From: Mike Engel <Mike.Engel@digi.com>
Date: Wed, 23 Jun 2021 15:11:12 +0200
Subject: [PATCH] config: add on the fly build configuration variable
This commit adds on the fly configuration to the swupdate
build system to correct an issue when using sw-description
files that support different images and installation locations.
Signed-off-by: Mike Engel <Mike.Engel@digi.com>
---
Kconfig | 7 +++++++
core/network_thread.c | 4 +++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/Kconfig b/Kconfig
index 5a3dc9a..17fa27c 100644
--- a/Kconfig
+++ b/Kconfig
@@ -262,6 +262,13 @@ config FEATURE_SYSLOG
# This option is auto-selected when you select any applet which may
# send its output to syslog. You do not need to select it manually.
+config DIGI_ON_THE_FLY
+ string "Add Digi on the fly support"
+ default n
+ #help
+ # This option is used in on the fly support to skip selection
+ # verification.
+
endmenu
menu 'Build Options'
diff --git a/core/network_thread.c b/core/network_thread.c
index ca23908..c539d27 100644
--- a/core/network_thread.c
+++ b/core/network_thread.c
@@ -102,7 +102,9 @@ static bool is_selection_allowed(const char *software_set, char *running_mode,
}
free(swset);
}
-
+#ifdef CONFIG_DIGI_ON_THE_FLY
+ allowed = true;
+#endif
if (allowed) {
INFO("Accepted selection %s,%s", software_set, running_mode);
}else