I am trying to build kgdboe according to the following tutorial.
I am running Ubuntu 20.04 with an updated kernel 5.9.0 as I needed a driver which was not available in stock kernel. I updated the kernel by downloading the headers, modules and kernel image .deb packages and installing them manually. My
uname -r output is
5.9.0-050900-generic. When I try to build the module with
make -C /lib/modules/$(uname -r)/build M=$(pwd), I get the error:
ERROR: modpost: "__module_address" [/home/ipc/Downloads/kgdboe/kgdboe.ko] undefined!
I have also manually downloaded complete Linux kernel source tree from GIT and checked out 5.9.0. If I make this module with path in make command pointing to the full source tree, the module buids. But since the module magic version and uname -r output doesn't match, I am unable to insert the module even with
My question is, why am I not able to build with only the linux headers? Am I missing some step that prepares the headers folder for building modules? I am trying to find a way of building this module against the kernel headers or if I could update the version magic of built module (5.9.0) to
uname -r output.