]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
kernel-yocto: enable fetching kernel metadata using file fetcher
authorChristian Taedcke <christian.taedcke@weidmueller.com>
Fri, 20 Dec 2024 15:30:04 +0000 (16:30 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 23 Dec 2024 11:41:13 +0000 (11:41 +0000)
If no destsuffix parameter is supplied and the file fetcher is used,
the folder name (i.e. basepath) is added to the kernel-meta search
directories.

Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/kernel-yocto.bbclass

index a5d89dc2c8bc912539f7c9ffc25a2576920f580a..7d80e9aa527ac58cf5b1a1b745dfb7c0cfc0f5d7 100644 (file)
@@ -62,8 +62,8 @@ def find_sccs(d):
 
     return sources_list
 
-# check the SRC_URI for "kmeta" type'd git repositories. Return the name of
-# the repository as it will be found in UNPACKDIR
+# check the SRC_URI for "kmeta" type'd git repositories and directories. Return
+# the name of the repository or directory as it will be found in UNPACKDIR
 def find_kernel_feature_dirs(d):
     feature_dirs=[]
     fetch = bb.fetch2.Fetch([], d)
@@ -71,13 +71,16 @@ def find_kernel_feature_dirs(d):
         urldata = fetch.ud[url]
         parm = urldata.parm
         type=""
+        destdir = ""
         if "type" in parm:
             type = parm["type"]
         if "destsuffix" in parm:
             destdir = parm["destsuffix"]
-            if type == "kmeta":
-                feature_dirs.append(destdir)
-           
+        elif urldata.type == "file":
+            destdir = urldata.basepath
+        if type == "kmeta" and destdir:
+            feature_dirs.append(destdir)
+
     return feature_dirs
 
 # find the master/machine source branch. In the same way that the fetcher proceses