Results 1 to 2 of 2
Hi I am trying to create the socket in kernal space and for that I have written server.c file.
I am trying to comiple this programe in kernel space by ...
- 02-08-2010 #1Just Joined!
- Join Date
- Feb 2010
- Posts
- 1
How run C programe in Kernel
Hi I am trying to create the socket in kernal space and for that I have written server.c file.
I am trying to comiple this programe in kernel space by following the procedure of creating the Makefile and than running the make. My files are as follows and I am getting folwwoiung error.
Can somebody will help me on this please ?
-Thanks
Makefile
obj-m += server.o
#KVERSION = $(shell uname -r)
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
when I run make I get following error
% make
make: Nothing to be done for `all'.
- 02-09-2010 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
Is there a tab before the make command after the target all: ? If it is empty, or just spaces, it won't work. It has to be a tab. Also, when posting code, including make files, use the CODE directive - start with square-bracket+code+close-bracket contents of code square-bracket+/code+close-bracket - to do so. Ie,
Code:obj-m += server.o #KVERSION = $(shell uname -r) all: make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules clean: make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote