Hi,
beb wrote:Hi father.mande. How do you build kernel modules for ADM? I downloaded the linux 5.13.x source, the ADM toolchain and the driver source. But how do I combine them? To build the driver it seems that I need the kernel headers. Where can I find them? Is there some documentation I am missing? It could be something very straight-forward that I am missing, because I am not experience with building kernel modules

As I know, Asustor don't provide full help and documentation on building kernel module ... (perhaps it's not true)
BUT some info exist (ex. in the developer guide (one for each kernel and sub-level sometimes) ... you can get it in dev. corner :
https://developer.asustor.com/ )
generally it's :
... the kernel source with potential change done by Asustor (ex. with sub-level at .x ... not really a standard)
... the Ubuntu version to use at base (in real or virtual system)
... the cross-compiler need to generate the correct architecture modules, kernels and program (ex. for 4.2+ only x86_64 and arm64 are usable, for older arm and x86 also can be used)
... the full kernel header to download in fact kernel source (GPL source in sourceforge.net)
... the kernel config file ... also in sourceforge
...
so after the scheme is as usual :
create the Ubuntu and update it, install cross-compiler, get the kernel config file and do change you want, don't forgot to verify the CONFIG_CROSS_COMPILE value in, generate modules ... then test it on real NAS.
... you can't change (easily) the modules.dep file, so use modinfo and insmod, lsmod and not modprobre for your own modules.
If you own the NAS target of your modules and don't want to provide the module for all kernels and sub-level, you can use an Ubuntu chroot to do all (with or without cross-compile) locally on NAS
For the modules itslef, you must know what you do the depends and the how-to load after boot the modules, because A.D.M. restart at boot with its initial content.
Philippe.
NB if your request is short (a special modules) don't hesitate to ask for builder in the forum, some people have lot of experience on doing this, including my small expertise when I have some free time to do it)
NB1 don't also forgot to ask to Asustor (through support) ... sometimes they have the response immediately ...