Compiling gasket.ko module on BPI-R64 kernel-5.4

Hi,

I have compiled kernel 5.4 for BPI-R64 v1.1 using @frank-w Git ref. And have installed the headers on /usr /src. make.log (914 Bytes) I need to compile gasket.ko. When I try to install it using the headers of kernel 5.4, I get the following error

DKMS make.log for gasket-1.0 for kernel 5.4.0-bpi-r64 (aarch64) Fri Dec 13 19:04:05 CST 2019 make: Entering directory ‘/usr/src/linux-headers-5.4.0-bpi-r64’ AR /var/lib/dkms/gasket/1.0/build/built-in.a CC [M] /var/lib/dkms/gasket/1.0/build/gasket_core.o scripts/basic/fixdep: 1: scripts/basic/fixdep: ^P^^: not found scripts/basic/fixdep: 1: scripts/basic/fixdep: ^?ELF^B^A^A^B: not found scripts/basic/fixdep: 2: scripts/basic/fixdep: Syntax error: word unexpected (expecting “)”) scripts/Makefile.build:265: recipe for target ‘/var/lib/dkms/gasket/1.0/build/gasket_core.o’ failed make[1]: *** [/var/lib/dkms/gasket/1.0/build/gasket_core.o] Error 2 make[1]: *** Deleting file ‘/var/lib/dkms/gasket/1.0/build/gasket_core.o’ Makefile:1652: recipe for target ‘/var/lib/dkms/gasket/1.0/build’ failed make: *** [/var/lib/dkms/gasket/1.0/build] Error 2

@frank-w @sinovoip can you please provide any inputs.

you build on r64 directly? Is fixdep built?

https://github.com/frank-w/BPI-R2-4.14/tree/5.4-r64-main/scripts/basic

It should be a aarch64 binary…the ELF shows it is linux binary…try file/type on this

maybe you need to compile kernel again to have all libs/binaries available before compiling your own module. have not tried yet compiling kernel on r64, but imho it should work (crosscompile should be skipped in build.sh depending on host-arch)

@frank,

As rightly mentioned by you, fixdep is a x86 binary.

I have compiled the kernel using build.sh and have used a package option. Do I need to compile the kernel in a different way ?

i guess you need to compile fixdep on r64…it seems to be a helper command (used on host only) which does not use CROSS_COMPILE environment variable. Try go into that directory on r64 and run “make”. If that does not work you may need to compile kernel on r64 only for the helper (but i guess you can break compilation after first kernel part is compiled)…i think you don’t need kernel only the helper