diff options
author | lixiaoyong <lxy204899@163.com> | 2024-03-25 15:24:31 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-03-26 17:10:51 +0000 |
commit | 3b69367bc228a0c0dd8aab3baa87011206009079 (patch) | |
tree | 57332fd36c0374660d8a67c06c3a94bc15900d93 /meta/classes-recipe/kernel-module-split.bbclass | |
parent | 7c3f956a0a8dbbbbfdf443b55e5287ca8301fe70 (diff) | |
download | poky-3b69367bc228a0c0dd8aab3baa87011206009079.tar.gz |
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>
Diffstat (limited to 'meta/classes-recipe/kernel-module-split.bbclass')
-rw-r--r-- | meta/classes-recipe/kernel-module-split.bbclass | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes-recipe/kernel-module-split.bbclass b/meta/classes-recipe/kernel-module-split.bbclass index c1208d55e0..9487365eb7 100644 --- a/meta/classes-recipe/kernel-module-split.bbclass +++ b/meta/classes-recipe/kernel-module-split.bbclass | |||
@@ -67,9 +67,9 @@ python split_kernel_module_packages () { | |||
67 | else: | 67 | else: |
68 | msg = "Cannot decompress '%s'" % file | 68 | msg = "Cannot decompress '%s'" % file |
69 | raise msg | 69 | raise msg |
70 | cmd = "%sobjcopy -j .modinfo -O binary %s %s" % (d.getVar("HOST_PREFIX") or "", tmpkofile, tmpfile) | 70 | cmd = "%s -j .modinfo -O binary %s %s" % (d.getVar("OBJCOPY"), tmpkofile, tmpfile) |
71 | else: | 71 | else: |
72 | cmd = "%sobjcopy -j .modinfo -O binary %s %s" % (d.getVar("HOST_PREFIX") or "", file, tmpfile) | 72 | cmd = "%s -j .modinfo -O binary %s %s" % (d.getVar("OBJCOPY"), file, tmpfile) |
73 | subprocess.check_call(cmd, shell=True) | 73 | subprocess.check_call(cmd, shell=True) |
74 | # errors='replace': Some old kernel versions contain invalid utf-8 characters in mod descriptions (like 0xf6, 'ö') | 74 | # errors='replace': Some old kernel versions contain invalid utf-8 characters in mod descriptions (like 0xf6, 'ö') |
75 | with open(tmpfile, errors='replace') as f: | 75 | with open(tmpfile, errors='replace') as f: |