aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-12-31 01:04:50 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-03 12:35:05 +0000
commit503b977acf6984120818cbc5cfd35ff2cffb39cd (patch)
tree65bef4e8f7b3dfb86c8ac331a1d559d832de6f8d
parentbadbeb01dd642d9d647d3760a3ce2aa39c3567da (diff)
downloadopenembedded-core-contrib-503b977acf6984120818cbc5cfd35ff2cffb39cd.tar.gz
openembedded-core-contrib-503b977acf6984120818cbc5cfd35ff2cffb39cd.tar.bz2
openembedded-core-contrib-503b977acf6984120818cbc5cfd35ff2cffb39cd.zip
kernel-module-split.bbclass: Fix modinfo decoding in old kernels
Before linux commit d36b691077dc59c74efec0d54ed21b86f7a2a21a, some strings contained invalid utf-8 character which made split_kernel_module_packages unhappy when parsing ums-isd200.ko: Exception: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 21: invalid start byte Signed-off-by: Pau Espin Pedrol <pespin@sysmocom.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/kernel-module-split.bbclass3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/classes/kernel-module-split.bbclass b/meta/classes/kernel-module-split.bbclass
index 67ab4161da4..e8996cf59ba 100644
--- a/meta/classes/kernel-module-split.bbclass
+++ b/meta/classes/kernel-module-split.bbclass
@@ -48,7 +48,8 @@ python split_kernel_module_packages () {
tmpfile = tf[1]
cmd = "%sobjcopy -j .modinfo -O binary %s %s" % (d.getVar("HOST_PREFIX") or "", file, tmpfile)
subprocess.check_call(cmd, shell=True)
- f = open(tmpfile)
+ # errors='replace': Some old kernel versions contain invalid utf-8 characters in mod descriptions (like 0xf6, 'รถ')
+ f = open(tmpfile, errors='replace')
l = f.read().split("\000")
f.close()
os.close(tf[0])