I am trying to build a demo kernel module, but when I do make, I get following,
make[1]: Entering directory '/usr/src/linux-headers-4.4.0-47-generic'
make[2]: *** No rule to make target 'arch/x86/entry/syscalls/syscall_32.tbl', needed by 'arch/x86/entry/syscalls/../../include/generated/asm/syscalls_32.h'. Stop.
arch/x86/Makefile:199: recipe for target 'archheaders' failed
make[1]: *** [archheaders] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.4.0-47-generic'
Makefile:4: recipe for target 'all' failed
I am building module across linux kernel - 4.4.0-47 version - 64 bit OS. Can anyone please help me to understand why I am facing this Error.Thank you in advance.
Make sure you have proper make file. this is a very common issue. or you could use below statement in makefile also.
obj-m += your_module_name.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
it should work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With