Re: qemuarm64 use lib64 as multilib

[email protected]
Newsgroups org.yoctoproject.lists.poky
Message-ID <[email protected]>
I have made it works with 64bit kernel and pure 32bit userspace

The solution is as below:
1. write a bbclass file for kernel and moduel recipe file to inherit.
```
PATH:prepend = "/toolchain/gcc/linux-x86/aarch64/gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu/bin:"
export PATH
export UBOOT_ARCH = "arm64"
export ARCH = "arm64"
export CROSS_COMPILE = "aarch64-none-linux-gnu-"
export STRIP = "aarch64-none-linux-gnu-strip"
export OBJDUMP = "aarch64-none-linux-gnu-objdump"
export OBJCOPY = "aarch64-none-linux-gnu-objcopy"

KERNEL_CC = "aarch64-none-linux-gnu-gcc"
KERNEL_LD = "aarch64-none-linux-gnu-ld"
KERNEL_AR = "aarch64-none-linux-gnu-ar"

# do_package[noexec] = "1"
# do_package_write_ipk[noexec] = "1"
# do_packagedata[noexec] = "1"
do_package_qa[noexec] = "1"
```
2. Adjust the kernel and module compile command
3. Modify a little code in poky to adjust the toolchain name. kernel-module-split.bbclass
```
-            cmd = "%sobjcopy -j .modinfo -O binary %s %s" % (d.getVar("HOST_PREFIX") or "", tmpkofile, tmpfile)
+            cmd = "%sobjcopy -j .modinfo -O binary %s %s" % ("aarch64-none-linux-gnu-", tmpkofile, tmpfile)
```
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.