1

I've been following this guide to it's entirety when building existing kernel modules with no issues.

My problem arises when I try to add my own driver.c files to the /linux/drivers/input/touchscreen folder (for example). I can't seem to get the build system to recognize these new files, even when I explicitly add them to the make file.

Normally I configure the modules I want to build through menuconfig

make ARCh=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig

Then I cross compile on host Linux with:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules dtbs

but my driver.c file doesn't get compiled. The build system totally ignores it. This is not surprising since the files don't show up in menuconfig. Is there a elegant way to 'register' these new files with the build system so I don't have to add them directly to the make file? But even if I add them to the make file myself, they STILL don't build. I think I've missed something that should be easy and now I am really confused about what to do.

  • Pretty sure menuconfig works with .Kconfig files, but you don't need it in order to compile a module; have a look at "Compiling and Loading" in chapter 2 of LDD3. – goldilocks Oct 11 '17 at 21:36
  • @goldilocks Thanks for the pointer, I've skimmed through that before but perhaps not closely enough. Will look into it asap! – f2a8 Oct 12 '17 at 23:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.