ayufan-rock64 / linux-build

Rock64 Linux build scripts, tools and instructions
MIT License
562 stars 100 forks source link

Can not build or install DKMS modules #252

Open icicimov opened 6 years ago

icicimov commented 6 years ago

Hi,

I have stretch-openmediavault-rock64-0.7.9-1067-armhf.img.xz installed on Rock64:

root@rock64:~#  uname -a
Linux rock64 4.4.132-1075-rockchip-ayufan-ga83beded8524 #1 SMP Thu Jul 26 08:22:22 UTC 2018 aarch64 GNU/Linux

I have issues installing spl-dkms and zfs-dkms packages, both failing with same error configure: error: *** Unable to build an empty module.. For example:

root@rock64:~# apt-get --reinstall install spl-dkms
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/398 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 68632 files and directories currently installed.)
Preparing to unpack .../spl-dkms_0.7.9-3~bpo9+1_all.deb ...

------------------------------
Deleting module version: 0.7.9
completely from the DKMS tree.
------------------------------
Done.
Unpacking spl-dkms (0.7.9-3~bpo9+1) over (0.7.9-3~bpo9+1) ...
Setting up spl-dkms (0.7.9-3~bpo9+1) ...
Loading new spl-0.7.9 DKMS files...
Building for 4.4.132-1075-rockchip-ayufan-ga83beded8524
Building initial module for 4.4.132-1075-rockchip-ayufan-ga83beded8524
configure: error: *** Unable to build an empty module.
Error! Bad return status for module build on kernel: 4.4.132-1075-rockchip-ayufan-ga83beded8524 (aarch64)
Consult /var/lib/dkms/spl/0.7.9/build/make.log for more information.

Any advise? Thanks

icicimov commented 6 years ago

Some more info, here is excerpt of the config.log for the ./configure command when trying to build zfs from source:

configure:32946: checking kernel source directory
configure:32989: result: /usr/src/linux-headers-4.4.132-1075-rockchip-ayufan-ga83beded8524
configure:33000: checking kernel build directory
configure:33027: result: /usr/src/linux-headers-4.4.132-1075-rockchip-ayufan-ga83beded8524
configure:33030: checking kernel source version
configure:33078: result: 4.4.132-1075-rockchip-ayufan-ga83beded8524
configure:33091: checking kernel file name for module symbols
configure:33120: result: Module.symvers
configure:33219: checking whether modules can be built
configure:33248: cp conftest.c conftest.h build && make modules -C /usr/src/linux-headers-4.4.132-1075-rockchip-ayufan-ga83beded8524 EXTRA_CFLAGS=-Werror -Wframe-larger-than=4096   M=/usr/src/zfsonlinux/zfs/build

make[1]: *** [/usr/src/zfsonlinux/zfs/build/conftest.o] Error 1
make: *** [_module_/usr/src/zfsonlinux/zfs/build] Error 2
configure:33251: $? = 2
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "zfs"
| #define PACKAGE_TARNAME "zfs"
| #define PACKAGE_VERSION "0.7.0"
| #define PACKAGE_STRING "zfs 0.7.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define ZFS_META_NAME "zfs"
| #define ZFS_META_VERSION "0.7.0"
| #define SPL_META_VERSION ZFS_META_VERSION
| #define ZFS_META_RELEASE "1483_gfb7307b89"
| #define SPL_META_RELEASE ZFS_META_RELEASE
| #define ZFS_META_LICENSE "CDDL"
| #define ZFS_META_ALIAS "zfs-0.7.0-1483_gfb7307b89"
| #define SPL_META_ALIAS ZFS_META_ALIAS
| #define ZFS_META_AUTHOR "OpenZFS on Linux"
| #define PACKAGE "zfs"
| #define VERSION "0.7.0"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define HAVE_PYTHON "2.7"
| #define HAVE_ZLIB 1
| #define HAVE_LIBUUID 1
| #define HAVE_LIBBLKID 1
| #define HAVE_LIBUDEV 1
| #define HAVE_LIBUDEV_UDEV_DEVICE_GET_IS_INITIALIZED 1
| #define HAVE_LIBSSL 1
| #define HAVE_MAKEDEV_IN_SYSMACROS 1
| #define HAVE_MLOCKALL 1
| 
| 
| int
| main (void)
| {
| 
|   ;
|   return 0;
| 
configure:33266: result: no
configure:33269: error: *** Unable to build an empty module.
icicimov commented 6 years ago

If this helps:

make: Entering directory '/usr/src/linux-headers-4.4.132-1075-rockchip-ayufan-ga83beded8524'
  CC [M]  /tmp/spl-0.7.9/build/conftest.o
gcc: error: unrecognized command line option '-mgeneral-regs-only'
gcc: error: unrecognized command line option '-mcmodel=large'
scripts/Makefile.build:283: recipe for target '/tmp/spl-0.7.9/build/conftest.o' failed
make[1]: *** [/tmp/spl-0.7.9/build/conftest.o] Error 1
Makefile:1471: recipe for target '_module_/tmp/spl-0.7.9/build' failed
make: *** [_module_/tmp/spl-0.7.9/build] Error 2
make: Leaving directory '/usr/src/linux-headers-4.4.132-1075-rockchip-ayufan-ga83beded8524'
hopkinskong commented 6 years ago

Is your compiler target is aarch64?

igoratencompass commented 6 years ago

Yes that's what uname -a says

hopkinskong commented 6 years ago

@igoratencompass I am talking the target arch of the output binaries that the compiler produces, NOT your current running kernel version.

evilbunny2008 commented 6 years ago

I had to force ARCH=arm64 in the make file in a DKMS deb for the rtl8812au driver

icicimov commented 6 years ago

@hopkinskong the configure phase fails so no binaries get built at all.

@evilbunny2008 tried that already with same outcome.

hopkinskong commented 6 years ago

@icicimov The configure phase will try to build test binaries to test your system configurations.

ghost commented 6 years ago

I met the same problem, who can help me? uname -a Linux rock64 4.4.132-1075-rockchip-ayufan-ga83beded8524 #1 SMP Thu Jul 26 08:22:22 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux

sudo dkms install -m spl -v 0.7.5

Kernel preparation unnecessary for this kernel. Skipping...

Running the pre_build script: checking for gawk... no checking for mawk... mawk checking metadata... META file checking build system type... aarch64-unknown-linux-gnu checking host system type... aarch64-unknown-linux-gnu checking target system type... aarch64-unknown-linux-gnu checking whether to enable maintainer-specific portions of Makefiles... no checking whether make supports nested variables... yes checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking whether make sets $(MAKE)... yes checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking how to print strings... printf checking for a sed that does not truncate output... /bin/sed checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for fgrep... /bin/grep -F checking for ld used by gcc... /usr/bin/aarch64-linux-gnu-ld checking if the linker (/usr/bin/aarch64-linux-gnu-ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 1572864 checking how to convert aarch64-unknown-linux-gnu file names to aarch64-unknown-linux-gnu format... func_convert_file_noop checking how to convert aarch64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop checking for /usr/bin/aarch64-linux-gnu-ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm -B output from gcc object... ok checking for sysroot... no checking for a working dd... /bin/dd checking how to truncate binary pipes... /bin/dd bs=4096 count=1 checking for mt... mt checking if mt is a manifest tool... no checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/aarch64-linux-gnu-ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking spl author... OpenZFS on Linux checking spl license... GPL checking linux distribution... ubuntu checking default package type... deb checking whether rpm is available... no checking whether rpmbuild is available... no checking whether spec files are available... yes (rpm/generic/*.spec.in) checking whether dpkg is available... yes (1.19.0.5) checking whether dpkg-buildpackage is available... yes (1.19.0.5) checking whether alien is available... no checking spl config... kernel checking kernel source directory... /lib/modules/4.4.132-1075-rockchip-ayufan-ga83beded8524/build checking kernel build directory... /lib/modules/4.4.132-1075-rockchip-ayufan-ga83beded8524/build checking kernel source version... 4.4.132-1075-rockchip-ayufan-ga83beded8524 checking kernel file name for module symbols... Module.symvers checking whether debugging is enabled... no checking whether basic kmem accounting is enabled... no checking whether detailed kmem tracking is enabled... no checking whether modules can be built... no configure: error: *** Unable to build an empty module.

Building module: cleaning build area... make -j4 KERNELRELEASE=4.4.132-1075-rockchip-ayufan-ga83beded8524...(bad exit status: 2) Error! Bad return status for module build on kernel: 4.4.132-1075-rockchip-ayufan-ga83beded8524 (aarch64) Consult /var/lib/dkms/spl/0.7.5/build/make.log for more information.

icicimov commented 6 years ago

@Rainforest945 Make sure you have installed all packages as per spl gihub compile guide. Make sure you also have the devscripts package installed and then follow the instructions here: https://forum.armbian.com/topic/6789-build-zfs-on-rk3328/?do=findComment&comment=53681

I could not make it work for the OMV ayufan kernel but worked with the ubuntu one. See here for details: https://icicimov.github.io/blog/server/ZFS-NAS-ROCK64-NFS-Samba/

Hope this helps.

ghost commented 6 years ago

@Rainforest945 Make sure you have installed all packages as per spl gihub compile guide. Make sure you also have the devscripts package installed and then follow the instructions here: https://forum.armbian.com/topic/6789-build-zfs-on-rk3328/?do=findComment&comment=53681

I could not make it work for the OMV ayufan kernel but worked with the ubuntu one. See here for details: https://icicimov.github.io/blog/server/ZFS-NAS-ROCK64-NFS-Samba/

Hope this helps.

Thanks for your help, I will try it

ghost commented 6 years ago

still fail when run "sudo dkms install --force spl/0.7.5" command, error as below:

CC [M] /var/lib/dkms/spl/0.7.5/build/module/spl/spl-err.o /var/lib/dkms/spl/0.7.5/build/module/spl/spl-vnode.c: In function 'vn_getattr': /var/lib/dkms/spl/0.7.5/build/module/spl/spl-vnode.c:515:24: error: incompatible types when assigning to type 'uid_t {aka unsigned int}' from type 'kuid_t {aka struct }' vap->va_uid = KUID_TO_SUID(stat.uid); ^ /var/lib/dkms/spl/0.7.5/build/module/spl/spl-vnode.c:516:24: error: incompatible types when assigning to type 'gid_t {aka unsigned int}' from type 'kgid_t {aka struct }' vap->va_gid = KGID_TO_SGID(stat.gid); ^ scripts/Makefile.build:277: recipe for target '/var/lib/dkms/spl/0.7.5/build/module/spl/spl-vnode.o' failed make[5]: [/var/lib/dkms/spl/0.7.5/build/module/spl/spl-vnode.o] Error 1 make[5]: Waiting for unfinished jobs.... CC [M] /var/lib/dkms/spl/0.7.5/build/module/splat/splat-rwlock.o scripts/Makefile.build:484: recipe for target '/var/lib/dkms/spl/0.7.5/build/module/spl' failed make[4]: [/var/lib/dkms/spl/0.7.5/build/module/spl] Error 2 make[4]: Waiting for unfinished jobs.... CC [M] /var/lib/dkms/spl/0.7.5/build/module/splat/splat-time.o CC [M] /var/lib/dkms/spl/0.7.5/build/module/splat/splat-vnode.o CC [M] /var/lib/dkms/spl/0.7.5/build/module/splat/splat-kobj.o CC [M] /var/lib/dkms/spl/0.7.5/build/module/splat/splat-atomic.o CC [M] /var/lib/dkms/spl/0.7.5/build/module/splat/splat-list.o CC [M] /var/lib/dkms/spl/0.7.5/build/module/splat/splat-generic.o CC [M] /var/lib/dkms/spl/0.7.5/build/module/splat/splat-cred.o CC [M] /var/lib/dkms/spl/0.7.5/build/module/splat/splat-zlib.o /var/lib/dkms/spl/0.7.5/build/module/splat/splat-cred.c: In function 'splat_cred_test3': /var/lib/dkms/spl/0.7.5/build/module/splat/splat-cred.c:206:19: error: incompatible types when assigning to type 'kgid_t {aka struct }' from type 'gid_t {aka unsigned int}' GROUP_AT(gi, i) = tmp_gid; ^ scripts/Makefile.build:277: recipe for target '/var/lib/dkms/spl/0.7.5/build/module/splat/splat-cred.o' failed make[5]: [/var/lib/dkms/spl/0.7.5/build/module/splat/splat-cred.o] Error 1 make[5]: Waiting for unfinished jobs.... scripts/Makefile.build:484: recipe for target '/var/lib/dkms/spl/0.7.5/build/module/splat' failed make[4]: [/var/lib/dkms/spl/0.7.5/build/module/splat] Error 2 Makefile:1471: recipe for target 'module/var/lib/dkms/spl/0.7.5/build/module' failed make[3]: [module/var/lib/dkms/spl/0.7.5/build/module] Error 2 make[3]: Leaving directory '/usr/src/linux-headers-4.4.132-1072-rockchip-ayufan-ga1d27dba5a2e' Makefile:11: recipe for target 'modules' failed make[2]: *** [modules] Error 2

igoratencompass commented 6 years ago

Did you follow the guide I linked to? The first step is:

 1. First, go to your linux-headers directory (e.g. /usr/src/linux-headers-4.4.129-rk3328/) and:

make scripts

You need to make sure this command executes successfully without errors (like have all the build dependencies installed) otherwise continuing with the next steps is pointless.

ghost commented 6 years ago

Did you follow the guide I linked to? The first step is:

 1. First, go to your linux-headers directory (e.g. /usr/src/linux-headers-4.4.129-rk3328/) and:

make scripts

You need to make sure this command executes successfully without errors (like have all the build dependencies installed) otherwise continuing with the next steps is pointless.

Hi, I searched classmap.h in my rock64, cannot found it, is there something missed?

and I did below steps: I found that there has "subdir-$(CONFIG_SECURITY_SELINUX) += selinux" exist in scripts/Makefile, but I added "subdir-$(CONFIGS_SECURITY_SELINUX) += selinux" into it again.

but I still get errors after ran make scripts , detail as below:

rock64@rock64:~$ cd /usr/src/linux-headers-4.4.132-1072-rockchip-ayufan-ga1d27dba5a2e/

uname -a Linux rock64 4.4.132-1072-rockchip-ayufan-ga1d27dba5a2e #1 SMP Sat Jul 21 20:18:03 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux


ls Documentation Module.symvers certs firmware init lib samples sound virt Kconfig arch crypto fs ipc mm scripts tools Makefile block drivers include kernel net security usr ls scripts/ Kbuild.include checkpatch.pl gdb modules.order Lindent checkstack.pl gen_initramfs_list.sh namespace.pl Makefile checksyscalls.sh genksyms objdiff Makefile.asm-generic checkversion.pl get_maintainer.pl package Makefile.build cleanfile gfp-translate patch-kernel Makefile.clean cleanpatch headerdep.pl pnmtologo.c Makefile.dtbinst coccicheck headers.sh profile2linkerlist.pl Makefile.extrawarn coccinelle headers_check.pl recordmcount Makefile.fwinst config headers_install.sh recordmcount.c Makefile.headersinst conmakehash kallsyms recordmcount.h Makefile.help conmakehash.c kallsyms.c recordmcount.pl Makefile.host decode_stacktrace.sh kconfig resource_tool Makefile.kasan decodecode kernel-doc selinux Makefile.lib depmod.sh kernel-doc-xml-ref setlocalversion Makefile.modbuiltin diffconfig ksymoops show_delta Makefile.modinst docproc.c ld-version.sh sign-file.c Makefile.modpost dtc link-vmlinux.sh sortextable Makefile.modsign export_report.pl makelst sortextable.c analyze_suspend.py extract-cert.c markup_oops.pl sortextable.h asn1_compiler extract-ikconfig mkbootimg spelling.txt asn1_compiler.c extract-module-sig.pl mkcompile_h stackdelta basic extract-sys-certs.pl mkkrnlimg stackusage bloat-o-meter extract-vmlinux mkmakefile tags.sh bmptologo.c gcc-goto.sh mkmultidtb.py tracing bootgraph.pl gcc-ld mksysmap unifdef check-lc_ctype.c gcc-version.sh mkuboot.sh unifdef.c check_extable.sh gcc-wrapper.py mkversion ver_linux checkincludes.pl gcc-x86_32-has-stack-protector.sh mod xen-hypercalls.sh checkkconfigsymbols.py gcc-x86_64-has-stack-protector.sh module-common.lds xz_wrap.sh


cat scripts/Makefile ..................... subdir-$(CONFIG_MODVERSIONS) += genksyms subdir-y += mod subdir-$(CONFIG_SECURITY_SELINUX) += selinux subdir-$(CONFIGS_SECURITY_SELINUX) += selinux subdir-$(CONFIG_DTC) += dtc subdir-$(CONFIG_GDB_SCRIPTS) += gdb ......................


sudo make scripts [sudo] password for rock64: CHK scripts/mod/devicetable-offsets.h HOSTCC scripts/selinux/genheaders/genheaders scripts/selinux/genheaders/genheaders.c:13:10: fatal error: classmap.h: No such file or directory

include "classmap.h"

      ^~~~~~~~~~~~

compilation terminated. scripts/Makefile.host:91: recipe for target 'scripts/selinux/genheaders/genheaders' failed make[3]: [scripts/selinux/genheaders/genheaders] Error 1 scripts/Makefile.build:484: recipe for target 'scripts/selinux/genheaders' failed make[2]: [scripts/selinux/genheaders] Error 2 scripts/Makefile.build:484: recipe for target 'scripts/selinux' failed make[1]: [scripts/selinux] Error 2 Makefile:582: recipe for target 'scripts' failed make: [scripts] Error 2

Herdinger commented 6 years ago

@ayufan I had trouble compiling kernel modules before and the root cause has always been gcc-wrapper.py. It seems like it's behaviour enables -Werror on kernel builds except for a few blessed warnings (maybe for regression testing idk?? (and also introduces a locale error)). But as a result configure scripts that depend on specifying which warnings should be treated as errors and which ones not for feature detection break. I don't know enough about the kernel build system to suggest a proper fix but there surely must a proper way to do this.

For everyone having trouble building kernel modules, deleting /usr/src/linux-headers*/scripts/gcc-wrapper.py should be a less intrusive fix than patching every module that misconfigures.

digitalsanity commented 5 years ago

This might be related:

https://github.com/zfsonlinux/spl/issues/653

Steps to fix:

https://forum.armbian.com/topic/6789-build-zfs-on-rk3328/?do=findComment&comment=53681

hopkinskong commented 5 years ago

It seems that you are installing ZFS. I am trying to do the same thing on my RockPro64 too! Thanks @digitalsanity for your link, I have successfully installed spl-dkms and zfs-dkms with following steps:

sudo apt-get purge spl-dkms zfs-dkms
# Install spl-dkms first THEN zfs-dkms
# apt might not get the correct order
sudo apt-get install spl-dkms
# The configuration stage will fail, now please continue
sudo nano /var/lib/dkms/spl/0.7.5/source/configure
# comment out below two lines of configuration test code (adding "//" before the code)
# "kuid_t userid = KUIDT_INIT(0);" (line 13933 for me)
# "kgid_t groupid = KGIDT_INIT(0);" (line 13934 for me)
# Also find "kuid_t userid = 0;" and modify it to "kuid_t userid;", it was at line 13970
# Finally also do the same thing for next line (13971). Modify "kgid_t groupid = 0;" to "kgid_t groupid;"
# Save the file
sudo dpkg-reconfigure spl-dkms
# spl-dkms should now built normally
sudo apt-get install zfs-dkms
# At configuration stage, it will stuck at "Building initial module for <kernel version>", just wait till it finishes, it will take a long time.
Herdinger commented 5 years ago

Please don't do this, this is not the correct way to go about it, requiring a change on any zfs update. Just run sudo rm /usr/src/linux-headers*/scripts/gcc-wrapper.py before building, this should work with issues for any other kernel modules until ayufan has it fixed

ayufan commented 5 years ago

It is not that it is my fault. It is rather that ZFS module does not work with 4.4 kernel. I would advise to try the 5.0 kernel with latest zfs-dkms that should make these issues resolved.

On Fri, Apr 19, 2019 at 9:51 PM Eduard Strehlau notifications@github.com wrote:

Please don't do this, this is not the correct way to go about it, requiring a change on any zfs update. Just run sudo rm /usr/src/linux-headers*/scripts/gcc-wrapper.py before building, this should work with issues for any other kernel modules until ayufan has it fixed

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ayufan-rock64/linux-build/issues/252#issuecomment-484998288, or mute the thread https://github.com/notifications/unsubscribe-auth/AASOSQP2WW7GHSQXBNAES5DPRIPF7ANCNFSM4FMVPBBQ .

Herdinger commented 5 years ago

No, it's definitly not a problem with zfs, just that the rockchip developers did something stupid with regression testing in the kernel headers. I agree that a mainline kernel will fix things. EDIT: @ayufan can't you just delete this file from the kernel headers to resolve this issue once and for all, there is nothing it does other than restricting warnings to an allowed set, which kernel module developers depend on not being the case.

digitalsanity commented 4 years ago

There's a problem with arch/arm/include/ files being excluded from arm64 kernel header deb-pkg builds.

The arch/arm/include from the source needs to be copied to the arch/arm/include of the installed headers in /usr/src/linux-headers-. The required arch/arm64/include/asm/opcodes.h (and likely others) include the arch/arm/include/asm/opcodes.h files, but those are not being packaged with the arm64 kernel builds.

A maintainable patch might be to simply copy the arch/arm/include/asm files over their arch/arm64/include/asm counterparts where the arm64 version is simply an include/redirect.

I have put together a quick build of an older mrfixit2001 kernel that worked properly with my old Silicon Image eSATA card (with port multiplier) whereas new releases didn't -- I am using DKMS/ZFS with that setup. DKMS/ZFS with arm64 userspace is working (need to disable pulseaudio/X or lspci crashes currently in this build) here. Testing armhf userspace build soon. There is also an arm-include.tgz you can try if that's all you need.

https://github.com/digitalsanity/rockchip-kernel/releases/tag/4.4.171-pcie-test

luke-jr commented 4 years ago

Is your compiler target is aarch64?

It doesn't look like it's possible to get an aarch64 compiler on armhf images :/

clariion commented 4 years ago

Is there any working way to install spl-dkms on Linux rockpro64 5.6.0-1137-ayufan-ge57f05e7bf8f #ayufan SMP Wed Apr 15 10:16:02 UTC 2020 aarch64 GNU/Linux ?