0

I made a simple kernel module and a defult Makefile I was given in lecture.

obj-m += module.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

I'm getting the error

make[1]: Entering directory '/usr/src/linux-headers-4.15.0-142-generic'
make[2]: *** No rule to make target 
'/home/fw/Documents/Workshop_in_Information_Security/module.c', needed by 
'/home/fw/Documents/Workshop_in_Information_Security/module.o'.  Stop.
Makefile:1584: recipe for target 
'_module_/home/fw/Documents/Workshop_in_Information_Security' failed
make[1]: *** [_module_/home/fw/Documents/Workshop_in_Information_Security] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-142-generic'
Makefile:4: recipe for target 'all' failed
make: *** [all] Error 2

I'm running on ubuntu and I have these lines in my module

module_init(nf_minifirewall_init_function);
module_exit(my_module_exit_function);

I'm very new to this subject so if needed any more information let me know. Thank you

2
  • 1
    Ubuntu 18.04 LTS reached End of Standard Support last year, and is thus off-topic on this site. You can use ESM/Pro support options (cost maybe involved) if you wish but community support (such as this site) no longer exists, though SE Unix & Linux allow all Ubuntu questions too. Please see askubuntu.com/help/on-topic as Canonical provide ESM/Pro services.
    – guiverc
    Commented Jan 6 at 11:15
  • The kernel mention is only used by releases that are either EOL, or EOSS (thus off-topic on this site; be it 18.04 or another release)
    – guiverc
    Commented Jan 6 at 11:16

0

You must log in to answer this question.

Browse other questions tagged .