mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
kernel-module-split.bbclass: enhance objcopy command call for kernel compilation with llvm
Using meta-clang for llvm kernel compilation previously defaulted to the gcc objcopy tool. To improve flexibility and compatibility, $OBJCOPY is preferred over $HOST_PREFIXobjcopy in the kernel-module-split.bbclass. With $OBJCOPY already defined in bitbake.conf, the empty condition has been removed, simplifying the invocation process. (From OE-Core rev: 45366f9162e5a7707c8a46c46b115e8501d367d0) Signed-off-by: lixiaoyong <lxy204899@163.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
7c3f956a0a
commit
3b69367bc2
@@ -67,9 +67,9 @@ python split_kernel_module_packages () {
|
||||
else:
|
||||
msg = "Cannot decompress '%s'" % file
|
||||
raise msg
|
||||
cmd = "%sobjcopy -j .modinfo -O binary %s %s" % (d.getVar("HOST_PREFIX") or "", tmpkofile, tmpfile)
|
||||
cmd = "%s -j .modinfo -O binary %s %s" % (d.getVar("OBJCOPY"), tmpkofile, tmpfile)
|
||||
else:
|
||||
cmd = "%sobjcopy -j .modinfo -O binary %s %s" % (d.getVar("HOST_PREFIX") or "", file, tmpfile)
|
||||
cmd = "%s -j .modinfo -O binary %s %s" % (d.getVar("OBJCOPY"), file, tmpfile)
|
||||
subprocess.check_call(cmd, shell=True)
|
||||
# errors='replace': Some old kernel versions contain invalid utf-8 characters in mod descriptions (like 0xf6, 'ö')
|
||||
with open(tmpfile, errors='replace') as f:
|
||||
|
||||
Reference in New Issue
Block a user