Can anyone guide me on how to compile 3rd party kernel module for ipq40xx?

I've been breaking my brains trying to compile a rtl8192eu driver from Github for the ipq40xx platform. I have a Fritzbox 4040 and use the USB port with a wireless dongle in client mode. The rtl8xxx drivers don't work properly; I can scan for APs but can't connect to anything.

I've compiled this driver on both x86 and arm and it works great and was wondering how I could add the driver in the OpenWrt build system. I've compiled from scratch numerous times but never tried to cross compile drivers/modules from Github.

I used another wireless driver included with OpenWrt as package as example and modified the Makefile but the build always fails. I've spend a few days trying and compiling but kept failing and trying to fix the errors gave me a headache and I had to give up.

Really hoping someone here is willing and able to help me add the driver and build it for the Fritzbox 4040. I'm no programmer so I need someone to ELI5 certain things. I do have some experience compiling kernels and tinkering like that but thats where it stops.

Example used:

I'm no expert at this sort of thing, but I've found that once you have a standard OpenWRT build working you can go into the build_dir sources for the kernel (eg build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.209) to make changes there that OpenWRT will then leave in place as it does the standard build. So if you have a recipe for making it a part of the standard Linux build you should be able to hack it in there to appear in menuconfig (from the kernel sources folder - not the Openwrt makeconfig or kernel_makeconfig) to at least get a private build working.


I will try that, it's a bit hacky but if it works it works. I'm just not sure if this driver can be compiled for this platform to begin with.

When I made the package it was trying to compile it but always failed for whatever reason. I've tried a bunch of platforms found in the Makefile but none I tried worked.

I think it may need some modification before it will compile for ipq40xx cuz I got it to compile fine for x86 and arm targets. I'll have a go at the method you describe though. Thanks for chiming in :+1: