From 33a8d89757ea50636fdf784883df604235e540d7 Mon Sep 17 00:00:00 2001 From: Ming Liu Date: Wed, 1 Oct 2025 11:34:53 +0200 Subject: [PATCH] kernel-module-split.bbclass: support muti-lines in module conf The expanded bitbake variables are raw strings so it does not support writting multiple lines to a kernel module conf, add the support by decoding it with 'unicode-escape'. Reported-by: Mathias Thore Signed-off-by: Ming Liu Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- meta/classes-recipe/kernel-module-split.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes-recipe/kernel-module-split.bbclass b/meta/classes-recipe/kernel-module-split.bbclass index 75ed696b72..c289808404 100644 --- a/meta/classes-recipe/kernel-module-split.bbclass +++ b/meta/classes-recipe/kernel-module-split.bbclass @@ -131,7 +131,7 @@ python split_kernel_module_packages () { if modconf and basename in modconflist: os.makedirs(os.path.dirname(name), exist_ok=True) with open(name, 'w') as f: - f.write("%s\n" % modconf) + f.write("%s\n" % modconf.encode().decode('unicode-escape')) elif modconf: bb.error("Please ensure module %s is listed in KERNEL_MODULE_PROBECONF since module_conf_%s is set" % (basename, basename)) # If the .conf file exits, then add it to FILES:* and CONFFILES:*. -- 2.47.3