Prechádzať zdrojové kódy

swupdate: add config fragments

Add the configuration fragments feature in swupdate like in busybox [1]
or in the Yocto kernel.

[1] 56dc1720caa48344238d352c7b6e9b0f0d41aa54 in poky

Signed-off-by: Georges Savoundararadj <savoundg@gmail.com>
Cc: Sid-Ali Teir <teir.sidali@gmail.com>
Georges Savoundararadj 8 rokov pred
rodič
commit
394e5552e4
1 zmenil súbory, kde vykonal 7 pridanie a 0 odobranie
  1. 7 0
      recipes-support/swupdate/swupdate.inc

+ 7 - 0
recipes-support/swupdate/swupdate.inc

@@ -27,6 +27,12 @@ S = "${WORKDIR}/git/"
 
 EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y"
 
+DEPENDS += "kern-tools-native"
+
+# returns all the elements from the src uri that are .cfg files
+def find_cfgs(d):
+    return [s for s in src_patches(d, True) if s.endswith('.cfg')]
+
 python () {
     try:
         defconfig = bb.fetch2.localpath('file://defconfig', d)
@@ -73,6 +79,7 @@ python () {
 
 do_configure () {
   cp ${WORKDIR}/defconfig ${S}/.config
+  merge_config.sh -m .config ${@" ".join(find_cfgs(d))}
   cml1_do_configure
 }