Building modules: missing scripts/basic/Makefile
Quoted 22 lines
Hi Steven,
Quoted 19 lines · Steven Laabs
Hi,
I'm trying to build my first kernel module but when running the makefile, make tries to use a file at
/usr/src/linux-headers-3.16.0-4-common/scripts/basic/Makefilewhich gives me the "No such file or directory" error. I've looked into the folder it is referencing and it does not have anyMakefile, the only file in that location is the fixdep executable. The scripts folder itself is linked to ../../lib/linux-kbuild-3.16/scripts.The
MakefileI am using (located in a folder in my home directory):obj-m = hello.o
KDIR ?= /lib/modules/$(shell uname -r)/buildall:
make -C $(KDIR) M=$(PWD) modulesclean:
make -C $(KDIR) M=$(PWD) cleanI'm not quite sure where to look for this
Makefileas I believe I have all of the proper headers installed, and I am running everything with the proper permission level.Any ideas on what I may be missing here?
Quoted 7 lines
Quoted 3 lines
Thanks,
StevenYou should use "+=" and not "="
-- obj-m = hello.o
++ obj-m += hello.o
Thanks for pointing that out, I've made that correction. Still missing the Makefile as previously mentioned unfortunately so I am unable to build.
Quoted 1 line
Thanks for pointing that out, I've made that correction. Still missing the
Makefileas previously mentioned unfortunately so I > am unable to build.
Hi Steven, please verify the headers are correctly installed by running:
dpkg -s linux-headers-$(uname -r) .
If they are not properly installed please run:
apt-get install kernel-headers-$(uname -r)
You should be able to build :)
Good luck - Aruna