]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
package.py: fix kernel module file pre-filter and document strip asymmetry
authorSam Kent <sam.john.kent@gmail.com>
Tue, 21 Apr 2026 10:28:44 +0000 (11:28 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 28 Apr 2026 13:28:14 +0000 (14:28 +0100)
Change the check to f.endswith(".ko"), consistent with strip_execs() and
with the /lib/modules/ guard already present in is_elf() and
splitdebuginfo().

Fixes [YOCTO #2348]

Signed-off-by: Sam Kent <sam.john.kent@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
meta/lib/oe/package.py

index 279cd567b312d6c5d23f0956788263d5d3693f70..c375acc12423e22d58ba94a9fa3532518947bcc7 100644 (file)
@@ -37,7 +37,8 @@ def runstrip(file, elftype, strip, extra_strip_sections=''):
 
     stripcmd = [strip]
     skip_strip = False
-    # kernel module
+    # kernel module: use --strip-debug and --preserve-dates (required for
+    # module signing to remain valid after stripping)
     if elftype & 16:
         if is_kernel_module_signed(file):
             bb.debug(1, "Skip strip on signed module %s" % file)
@@ -1167,7 +1168,7 @@ def process_split_and_strip_files(d):
                         or (s[stat.ST_MODE] & stat.S_IXOTH) \
                         or ((file.startswith(libdir) or file.startswith(baselibdir)) \
                         and (".so" in f or ".node" in f)) \
-                        or (f.startswith('vmlinux') or ".ko" in f):
+                        or (f.startswith('vmlinux') or f.endswith(".ko")):
 
                     if cpath.islink(file):
                         checkelflinks[file] = ltarget