+ # Get the kernel version using the host toolchain, some cross-compiled arch may be broken
+ kversion=$(unset ARCH; unset CROSS_COMPILE; make -s kernelversion)
+
+ if [ "${cross_arch}" = "riscv64" ] && verlt "${kversion}" "5.12"; then
+ echo "RISC-V support was upstreamed in kernel v4.19 but kprobes support was only added in v5.12. Don't try to build it."
+ exit 0
+ fi