Making kernel module packages for in-tree-modules into a standalone feed?


I want to add some additional kernel modules, which are part of the kernel source, to OpenWrt.

I like to do it via feeds instead of modifying the package/kernel/linux/modules/*.mk files (or adding new ones there), because I want to keep my additions separated from official OpenWrt.

Is this possible? If so, how?

I have read the guide "Creating packages" → "Creating packages for kernel modules", but that covers only modules with external sources.

So far I have not succeeded by just creating Makefiles with content similar to the package/kernel/linux/modules/*.mk files: It misses (of course) further instructions on actually where the source is and how to build.
I somehow have to refer to the main kernel source directory and modify the main kernel's .config and build them from inside the main kernel's source directory.


What → I have been succeeding (although quite hacky so far) is