Quote:
Originally Posted by jaepi
Code:
[root@localhost dev-drive]# gcc -c hello.c
|
I don’t think you can do just this anymore (even when you could, you needed many more arguments). I think the preferred method of making a module out of your source is to use the kernel’s own build system. Execute something like this from the directory containing hello.c (and no, you shouldn’t need to be root for it to compile):
Code:
$ make -C /lib/modules/$(uname -r)/build M=$PWD obj-m=hello.o
Of course, it would be much easier to create a Makefile that does this sort of thing for you.