I'm trying to build some kernel module acts like simple firewall for practicing kernel programming. I'm trying to build my module split to multiple c and header files but it won't finish build with error that I didn't define licence even I defined with MODULE_LICENSE("GPL"); My Make file is

obj-m += firewall.o

firewall-objs := fileio.o plstring.o rulemanager.o

    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean

Is there any way to build kernel module split to multiple files? I have tried to define licence to every c files but it didn't work.

  • Better asked/searched for in Linux specific venue, e.g. in Corbet et al "Linux Device Drivers" (O'Reilly, 3rd edition 1998). – vonbrand Aug 16 at 15:01

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.