Place out-of-tree kernel module source directories here. The build system will
automatically discover and build every module that has a module.conf.
modules/
r8125/
module.conf # Required — tells build system where the Kbuild Makefile is
src/
Makefile # Kbuild Makefile (obj-m := r8125.o)
*.c *.h
megaraid/
module.conf
Makefile # Kbuild Makefile at top level
*.c *.h
Each module directory must contain a module.conf file:
# Path to the Kbuild Makefile, relative to this module directory
# Use "." if Makefile is at the module root, "src" if in src/ subdirectory
MODSRC=srcThe Makefile at MODSRC must be compatible with:
make -C /path/to/kernel M=/path/to/module/<MODSRC> modulesModules without module.conf are skipped. If MODSRC points to a path
without a Makefile/Kbuild, the build will error out.
All .ko files are installed to /lib/modules/<KVNAME>/extra/<module_name>/
inside the main pve-kernel-<KVNAME> package.
cd modules/
git clone https://github.com/xxx/r8125.git
echo "MODSRC=src" > r8125/module.confThen rebuild:
bash autobuild.sh aarch64