My setup:

  • OpenWRT 18.06.1
  • Raspberry Pi 2 B
  • Kernel 4.9.120

Attempting to build a very simple hello world kernel module results in the following error:

# make
make -C /lib/modules/4.9.120/build M=/c_programming/hellomodule modules
make[1]: *** /lib/modules/4.9.120/build: No such file or directory.  Stop.
make: *** [Makefile:6: all] Error 2

Makefile isn't a problem, since it works on Ubuntu just fine. What I've done so far:

  • I've checked and the directory indeed is missing.
  • Checked with opkg find '*headers*' however there's no packages linux-headers-<release> like on Ubuntu.

How should I proceed to actually build this thing ?

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.