I am trying to compile and add the kernel module for the TP-Link TU09 USB WiFi module for my Rockchip board. I've got the driver source saved locally and am running the bitbake recipe below:
DESCRIPTION = "Kernel module for compiling TP-Link T9UH USB dongle"
# Licenses are not handled here
LICENSE = "CLOSED"
LIC_FILES_CHKSUM = ""
# Prepare recipe to handle a non-standard driver as part of the build
SRC_URI = "file://${TOPDIR}/../T9UH_Driver/src.tar.xz;protocol=file"
# We don't need to track versions for now
SRCREV = "${AUTOREV}"
# Set the work directory that gets cleared out on a make failure
CLEANBROKEN = "1"
S = "${WORKDIR}/src"
# Set the extra flags needed flag
EXTRA_OEMAKE += "CONFIG_PLATFORM_ROCKCHIP=y \
CONFIG_PLATFORM_I386_PC=n \
CONFIG_PLATFORM_ANDROID_X86=n"
# Build as a *.ko module
inherit module
# Do the standard compilation (make)
do_compile() {
oe_runmake -C ${S}
}
# Ensure the kernel module is copied to the correct directory once it's compiled and built
do_install() {
install -d ${D}/lib/modules/${KERNEL_VERSION}/extra
install -m 0755 ${S}/8814au.ko ${D}/lib/modules/${KERNEL_VERSION}/extra
}
# Add the module to the kernel modules package
FILES_${PN} = "${base_libdir}/modules/${KERNEL_VERSION}/extra/*.ko"
# Add module to the dependencies to ensure it's installed correctly
RDEPENDS_${PN} = "kernel-module-${KERNEL_VERSION}"
# Specify the module dependencies
MODULE_DEPENDS = "cfg80211"
COMPATIBLE_MACHINE = "${MACHINE}"
I get the following error in the log.docompile:
DEBUG: Executing shell function do_compile
NOTE: make -j 8 CONFIG_PLATFORM_ROCKCHIP=y CONFIG_PLATFORM_I386_PC=n CONFIG_PLATFORM_ANDROID_X86=n KERNEL_SRC=/home/mydev/Radxa_Zero_3W/build-radxa-zero-3w/tmp/work-shared/radxa-zero-3w/kernel-source -C /home/mydev/Radxa_Zero_3W/build-radxa-zero-3w/tmp/work/radxa_zero_3w-poky-linux/t9uh-driver-radxa/1.0/src
make: Entering directory '/home/mydev/Radxa_Zero_3W/build-radxa-zero-3w/tmp/work/radxa_zero_3w-poky-linux/t9uh-driver-radxa/1.0/src'
make ARCH=arm64 CROSS_COMPILE=aarch64-poky-linux- -C M=/home/mydev/Radxa_Zero_3W/build-radxa-zero-3w/tmp/work/radxa_zero_3w-poky-linux/t9uh-driver-radxa/1.0/src modules
make[1]: Entering directory '/home/mydev/Radxa_Zero_3W/build-radxa-zero-3w/tmp/work/radxa_zero_3w-poky-linux/t9uh-driver-radxa/1.0/src'
make[1]: Leaving directory '/home/mydev/Radxa_Zero_3W/build-radxa-zero-3w/tmp/work/radxa_zero_3w-poky-linux/t9uh-driver-radxa/1.0/src'
make[1]: *** M=/home/mydev/Radxa_Zero_3W/build-radxa-zero-3w/tmp/work/radxa_zero_3w-poky-linux/t9uh-driver-radxa/1.0/src: No such file or directory. Stop.
make: *** [Makefile:1714: modules] Error 2
make: Leaving directory '/home/mydev/Radxa_Zero_3W/build-radxa-zero-3w/tmp/work/radxa_zero_3w-poky-linux/t9uh-driver-radxa/1.0/src'
ERROR: oe_runmake failed
WARNING: /home/mydev/Radxa_Zero_3W/build-radxa-zero-3w/tmp/work/radxa_zero_3w-poky-linux/t9uh-driver-radxa/1.0/temp/run.do_compile.4132099:173 exit 1 from 'exit 1'
WARNING: Backtrace (BB generated script):
#1: bbfatal_log, /home/mydev/Radxa_Zero_3W/build-radxa-zero-3w/tmp/work/radxa_zero_3w-poky-linux/t9uh-driver-radxa/1.0/temp/run.do_compile.4132099, line 173
#2: die, /home/mydev/Radxa_Zero_3W/build-radxa-zero-3w/tmp/work/radxa_zero_3w-poky-linux/t9uh-driver-radxa/1.0/temp/run.do_compile.4132099, line 157
#3: oe_runmake, /home/mydev/Radxa_Zero_3W/build-radxa-zero-3w/tmp/work/radxa_zero_3w-poky-linux/t9uh-driver-radxa/1.0/temp/run.do_compile.4132099, line 152
#4: do_compile, /home/mydev/Radxa_Zero_3W/build-radxa-zero-3w/tmp/work/radxa_zero_3w-poky-linux/t9uh-driver-radxa/1.0/temp/run.do_compile.4132099, line 147
#5: main, /home/mydev/Radxa_Zero_3W/build-radxa-zero-3w/tmp/work/radxa_zero_3w-poky-linux/t9uh-driver-radxa/1.0/temp/run.do_compile.4132099, line 186
The source files of the driver are definitely in the /home/mydev/Radxa_Zero_3W/build-radxa-zero-3w/tmp/work/radxa_zero_3w-poky-linux/t9uh-driver-radxa/1.0/src
directory. My .bb above is in /home/mydev/Radxa_Zero_3W/, and I call it from there as follows: bitbake -k t9uh-driver-radxa
Why would this fail compile?
Expected to see a successful make on the driver code; instead it failed immediately.