Problem with make file
hi..i have been using the following make file to get .ko files in red hat linux. which i later used to insmod..
obj-m := mydriver.o KERNDIR ?= /lib/modules/$(shell uname -r)/build PWD := $(shell pwd) default: $(MAKE) -C $(KERNDIR) M=`pwd` modules clean: rm -f *.ko *.mod.c *.o but i installed ubuntu 6.06 recently and my make is no longer sucessful since ubuntu doesnt have /lib/modules/$(shell uname -r)/build path.. what do i do?any help is much appreciated. PS: This is my first post.. |
Quote:
|
check if you have /lib/modules/[kernel name]/build by browsing your filesystem.
Sometimes it is linked to /usr/src/kernels/[kernel name], so check for that too. [kernel name] can be found by typing $uname -r its actually your kernel source tree. If you cant find the source tree in default location, it may not have come with your distro. So first install the kernel source tree, then to can use its path in the Make file. If you have a little bit of time (and resource) you may choose to compile a whole new kernel and use it. Then you will have the source tree for sure. |
thanks for your reply.. but it didnt solve my problem. i found that my /usr/src directory is empty. so what do i do? install it..?okay,but how do i do it?
|
I guess can you can get the kernel source tree from the distribution's official website. It will also contain the details how to install it.
Regarding installation of a new kernel its a time taking process which may not always be successful. Let me know then , after you have considered the first option. |
All times are GMT -5. The time now is 10:58 PM. |