]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
kernel-module-split.bbclass: enhance objcopy command call for kernel compilation...
authorlixiaoyong <lxy204899@163.com>
Mon, 25 Mar 2024 07:24:31 +0000 (15:24 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 26 Mar 2024 17:03:05 +0000 (17:03 +0000)
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.

Signed-off-by: lixiaoyong <lxy204899@163.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/kernel-module-split.bbclass

index c1208d55e048e97c046a7c49fd2d414f6ac871da..9487365eb7224940368359e5e232cc61d5e9c75a 100644 (file)
@@ -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: