diff mbox series

[meta-swupdate] Add Variable DEFCONFIG to choose custom defconfig

Message ID CAJqz+h+wJNuyu-_cppqiqV0Z02ZRMgjYAVREPy3JrMR0LkEmuA@mail.gmail.com
State Rejected
Headers show
Series [meta-swupdate] Add Variable DEFCONFIG to choose custom defconfig | expand

Commit Message

DaLo tyzp April 30, 2024, 7:39 a.m. UTC
Currently the static defconfig file 'file://defconfig' is loaded. However,
if
one wants to use a different defconfig to build a custom swupdate on the
fly it
is not possible. Therefore, add the new variable *DEFCONFIG* to specify
which
defconfig to use. If the variable is not specified use the filename
*defconfig*
as default.

Signed-off-by: Anton Gres <anton.gres@ifm.com>
---
 recipes-support/swupdate/swupdate.inc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--
2.39.2
diff mbox series

Patch

diff --git a/recipes-support/swupdate/swupdate.inc
b/recipes-support/swupdate/swupdate.inc
index 188c25c..f499c37 100644
--- a/recipes-support/swupdate/swupdate.inc
+++ b/recipes-support/swupdate/swupdate.inc
@@ -98,8 +98,11 @@  DEPENDS += "kern-tools-native"
 python () {
     import re

+    defconfig = d.getVar("DEFCONFIG") or "defconfig"
+    defconfig = "file://" + defconfig
+
     try:
-        defconfig = bb.fetch2.localpath('file://defconfig', d)
+        defconfig = bb.fetch2.localpath(defconfig, d)
     except bb.fetch2.FetchError:
         return