From f1d0a3c7c6c6f1a2f077fb3ad14c30379cc11865 Mon Sep 17 00:00:00 2001 From: Christoph Lauer Date: Wed, 13 Jul 2022 23:07:23 +0200 Subject: [PATCH] package.bbclass: Avoid stripping signed kernel modules in splitdebuginfo 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) (From OE-Core rev: cefc6ec245ac1ca7a1a47d55aaec793e730a24a5) Signed-off-by: Christoph Lauer Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie (cherry picked from commit dc0f0413eabfd50f78d887f73f808d40a314fbd8) Signed-off-by: Steve Sakoman Signed-off-by: Richard Purdie --- meta/classes/package.bbclass | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 4850134022..63887b34f8 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -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))