]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
kernel-module-split.bbclass: support muti-lines in module conf
authorMing Liu <liu.ming50@gmail.com>
Wed, 1 Oct 2025 09:34:53 +0000 (11:34 +0200)
committerMathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Fri, 3 Oct 2025 05:50:09 +0000 (07:50 +0200)
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 <mathias.thore@atlascopco.com>
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
meta/classes-recipe/kernel-module-split.bbclass

index 75ed696b72c74057b308860ce07baddd4c0ced34..c2898084045b2f6b18c23a912b1c06a2b5e23686 100644 (file)
@@ -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:*.