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>
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:*.