I’ve cross-compiled a custom version of the R24.2.1 kernel for my TX1, and in the process I’ve changed it’s name from the default “3.10.96-tegra”. I’ve successfully built and flashed an image with my new kernel to my TX1 hardware, and now I’m trying to build a driver module natively on my TX1. Prior to building the driver, when I run “make modules_prepare” (from the custom kernel’s headers directory under /usr/src), the custom kernel name is being reverted in several files. When I build the driver, its vermagic string gets built with the original kernel name and insmod produces an error when I try to load it because it doesn’t match “uname -r”.
I can get around the problem by manually changing the string back to the custom name in one of the files, but that seems like a hack. I’ve also been very careful when cross-compiling the kernel to eliminate any references to the original kernel name in the headers or source files.
Any ideas what’s going on? Is there a better way to build an out-of-tree module than the way I’m doing it? I’m also happy to provide any additional details or output… just trying to keep things brief.