]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
package.bbclass: Avoid stripping signed kernel modules in splitdebuginfo
authorChristoph Lauer <christoph.lauer@xtronic.de>
Wed, 13 Jul 2022 21:07:23 +0000 (23:07 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 15 Jul 2022 11:32:12 +0000 (12:32 +0100)
Since commit d756b346f248df47b0540644adb1d0f17bcc4b6e kernel modules are stripped by the functions 'runstrip' and 'splitdebuginfo'. Signed modules must not be stripped. Function 'runstrip' avoids this by running is_kernel_module_signed. Apply the same check to splitdebuginfo.

(From OE-Core rev: 6859226652339b19cbc7bdfec074fe2016cdee60)

Signed-off-by: Christoph Lauer <christoph.lauer@xtronic.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package.bbclass

index 4850134022dcacb6174ffbb155d5941f6793880a..63887b34f839ffa016c2917c95c64b7fef1e99f0 100644 (file)
@@ -382,6 +382,11 @@ def splitdebuginfo(file, dvar, dv, d):
     debugfile = dvar + dest
     sources = []
 
+    if file.endswith(".ko") and file.find("/lib/modules/") != -1:
+        if oe.package.is_kernel_module_signed(file):
+            bb.debug(1, "Skip strip on signed module %s" % file)
+            return (file, sources)
+
     # Split the file...
     bb.utils.mkdirhier(os.path.dirname(debugfile))
     #bb.note("Split %s -> %s" % (file, debugfile))