From: Ming Liu Date: Wed, 1 Oct 2025 09:34:53 +0000 (+0200) Subject: kernel-module-split.bbclass: support muti-lines in module conf X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33a8d89757ea50636fdf784883df604235e540d7;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git 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 --- 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:*.