On 2023-11-18 21:09, Kent Overstreet wrote:

diff --git a/root_image b/root_image
index 26c99fe..a881714 100755
--- a/root_image
+++ b/root_image
@@ -118,7 +118,12 @@ PACKAGES+=(cryptsetup)
PACKAGES+=(multipath-tools sg3-utils srptools)

# ZFS support
-PACKAGES+=("linux-headers-generic" dkms zfsutils-linux zfs-dkms)
+PACKAGES+=("linux-headers-generic")
+# unless no other option when cross-compiling, ignore ZFS
+# DKMS needs to cross-compile the module,
+# against a different kernel on a different CPUarchitecture.
+# this has to cause errors
+[[ -n $CROSS_COMPILE ] && PACKAGES+=(dkms zfsutils-linux zfs-dkms)

# suspend testing:
# [[ $KERNEL_ARCH = x86 ]] && PACKAGES+=(uswsusp)
@@ -302,6 +307,7 @@ cmd_create()
--components='main,contrib,non-free,bullseye-backports' \
bullseye "$MNT" "$MIRROR"

+ [[ -n ${CROSS_COMPILE} ]] || cp $(which qemu-${ktest_arch}) ${MNT}$(which qemu-${ktest_arch})

What? Please explain.

If using a cross-compile feature, you need the qemu static helper to be on the target,
otherwise you can't run your binaries compiled for another cpu.
when entering the chroot, this is a requirement for running another ABI.
I leave it there because you'll need it again when performing root_image update

Janpieter

Reply via email to