I'm currently working with 20.04 LTS,and have attempted to compile and install the internal source tree module gpio-mockup. I've tried recompiling kernel versions 5.11.0-27-generic, 5.11.0-34-generic, and 5.13.17-0051317-generic to add this module. I will use this for gpio simulations with an auv glider flight-simulator that typically runs on microcontroller (stm32 with OpenRTOS, so it can be built and run on a laptop running the FreeRTOS-Posix simulator (the sources are the same as OpenRTOS).
The module does not install automatically with a kernel installation, it has to be added manually. I prefer not to downgrade the kernel version, but I followed the instructions in this post, as the source code is still listed under drivers in the .latest stable release (v5.14). Obviously, it's also included in v5.13 that I'm attempting to build. I successfully compiled it, but attempting to install the .ko file results in an auto Exec error, even if I verified that the kernel and module were from the same version with modinfo.
Can someone please clarify the process? Although I have some time with Ubuntu under my belt, this is the first kernel module build project I've attempted, nor do I consider myself an embedded C expert. Following specific instructions for a kernel driver build with the simplified Makefile, results in a "no rule to make target" error, or with the v5.13 build, I've found that compiling the module requires glibc >=v2.33, which is not in the standard upgrades. I'm definitely missing something. I have been successful in upgrading the kernel, but not compiling the driver I need. I appreciate any advice with compiling and installing the module.