I've built an android kernel (source code), now I'm trying to cross-compile a kernel module for it, v4l2loopback
to be precise. I've used this toolchain to build the kernel (kernel version is 4.9).
Here on github you can see that someone actually succeeded in compiling the module, and I've been trying to replicate their success myself. But in the last stage of actually building the kernel module I don't get a .ko
file output. Here is what I get:
# setting up
$ export ARCH=arm64
$ export CROSS_COMPILE=aarch64-linux-android-
$ export PATH=/home/username/redmi_7a/aarch64-linux-android-4.9-kernel/bin:$PATH
# go to the source code directory
$ cd v4l2loopback
$ export M="$PWD"
# I have the compiled kernel at /home/username/redmi_7a/kernel
make -C ../kernel
make: entering catalogue «/home/username/redmi_7a/kernel»
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CHK include/generated/bounds.h
CHK include/generated/timeconst.h
CHK include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
CHK scripts/mod/devicetable-offsets.h
Building modules, stage 2.
MODPOST 4 modules
make: exiting catalogue «/home/username/redmi_7a/kernel»
Seems like no errors, no nothing, but all I get is a v4l2loopback.o
file, instead of v4l2loopback.ko
file, as mentioned per v4l2loopback github page.
I tried find . -name "*.ko"
, but it didn't return anything.
I might've screwed something up during the kernel compilation, so it might not module's fault. I don't really know where to look, I'm really new to this.
Maybe I need to set some flag in the kernel .config
file and recompile?
All I really ask is a direction, what are the things I might've done wrong?