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-02 12:54:09 +0000
commit7b9fb66e464eca8b93bf1976230e88b0c7d1aa8e (patch)
treeb05a9d31f5cd60a39cad81dad43c8a27d6b7922e
parent8fdb8b04454e4e0806d21a0f2f11ff6a15799d08 (diff)
downloadopenembedded-core-contrib-7b9fb66e464eca8b93bf1976230e88b0c7d1aa8e.tar.gz
openembedded-core-contrib-7b9fb66e464eca8b93bf1976230e88b0c7d1aa8e.tar.bz2
openembedded-core-contrib-7b9fb66e464eca8b93bf1976230e88b0c7d1aa8e.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])