Fail to Compile Morse Driver for RV1106 Kernel

I don’t know what your config looks like, but I had a similar issue.

this was my error:

/build/source/dot11ah/main.o /build/source/dot11ah/main.c
       > In file included from /build/source/dot11ah/../rc.h:12,
       >                  from /build/source/dot11ah/../morse.h:37,
       >                  from /build/source/dot11ah/main.c:17:
       > /build/source/dot11ah/../mmrc-submodule/src/core/mmrc.h:11:10: fatal error: mmrc_osal.h: No such file or directory
       >    11 | #include "mmrc_osal.h"
       >       |          ^~~~~~~~~~~~~
       > compilation terminated.
       > make[4]: *** [/nix/store/8n3mbnlv1jjqp1czl301h67zrywlgm0j-linux-5.10.160-1025-rockchip-dev/lib/modules/5.10.160/source/scripts/Makefile.build:273: /build/source/dot11ah/main.o] Error 1
       > make[3]: *** [/nix/store/8n3mbnlv1jjqp1czl301h67zrywlgm0j-linux-5.10.160-1025-rockchip-dev/lib/modules/5.10.160/source/scripts/Makefile.build:516: /build/source/dot11ah] Error 2
       > make[2]: *** [/nix/store/8n3mbnlv1jjqp1czl301h67zrywlgm0j-linux-5.10.160-1025-rockchip-dev/lib/modules/5.10.160/source/Makefile:1938: /build/source] Error 2
       > make[1]: *** [/nix/store/8n3mbnlv1jjqp1czl301h67zrywlgm0j-linux-5.10.160-1025-rockchip-dev/lib/modules/5.10.160/source/Makefile:185: __sub-make] Error 2
       > make: *** [Makefile:179: all] Error 2
       For full logs, run:
         nix log /nix/store/xc1lsg49v1crv0w4nbg18rqqhkqb35pz-morse_driver-1.15.3.drv
error: 1 dependencies of derivation '/nix/store/4g51r6dnwsl53znm90xv2jc4aa4j9qc5-linux-5.10.160-1025-rockchip-modules.drv' failed to build

I resolved it by adding:

"CONFIG_ANDROID=n"

you likely have CONFIG_ANDROID=y for the android based kernel as I did.

that’s why passing CONFIG_ANDROID=y didn’t fix anything.