Results 1 to 10 of 13
Hai Guys,...
As i had been assigned with a project reagarding the /proc file system.. I need to insert modules ... But i m facing a lot of troubles to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-30-2007 #1Just Joined!
- Join Date
- Mar 2007
- Posts
- 20
Modules insertion in My kernel...
Hai Guys,...
As i had been assigned with a project reagarding the /proc file system.. I need to insert modules ... But i m facing a lot of troubles to compile them and insert them... A lot of version troubles...could some one help me to get out of it.....My kernel version is 2.6.15-1.2054_FC5
I couldn compile my simple hello.c program to get a Hello.Ko output file.....
Pease help me guys !!!!
- 03-30-2007 #2
Whatz the error that you get?
Do you have the source of your running kernel, itz required for building your module.---------------------------------
Registered Linux User #440311
HI2ARUN _AT_ GMAIL _DOT_ COM
---------------------------------
- 03-30-2007 #3Just Joined!
- Join Date
- Mar 2007
- Posts
- 20
Modules !!!
I don think i have the source....wer do i find themm.....
- 03-30-2007 #4
You can get it from www.kernel.org
Configure, compile, and have a running kernel.
Then compile your module.---------------------------------
Registered Linux User #440311
HI2ARUN _AT_ GMAIL _DOT_ COM
---------------------------------
- 03-31-2007 #5Just Joined!
- Join Date
- Mar 2007
- Posts
- 42
Don't forget backup you're running kernel first....
Originally Posted by cyberinstru
Or don't override the running kernel.... while compiling the new kernel
- 03-31-2007 #6Just Joined!
- Join Date
- Mar 2007
- Posts
- 20
Thanx
But how do i take a back up... and then re-compile a new kernel !!!!
Gimme the steps yaar....
Thanx for helping...
- 04-01-2007 #7
You will need to do some research yourself, Google is your friend.
There are a lot of tutorials detailing how to write a simple module that prints "Hello world" in dmesg out therePut your hand in an oven for a minute and it will be like an hour, sit beside a beautiful woman for an hour and it will be like a minute, that is relativity. --Albert Einstein
Linux User #425940
Don't PM me with questions, instead post in the forums
- 04-02-2007 #8Just Joined!
- Join Date
- Aug 2006
- Location
- india
- Posts
- 57
hi winifred,
I am at the same situation where ur standing, when ur including the driver what is the makefile u wrote for it.
look at my make:
************************************************** ***************************
obj-m += hello.ko
all:
make -C /lib/modules/2.6.x.x/build M=$(PWD) modules
************************************************** ***************************
it has to look into /usr/src for that source 2.6kernel that is not happening for me it is saying no rule in makefile
pls give me ur makefile
****cyberinstructer please help buddy***
- 04-03-2007 #9
Try this.
Code:MYKERNEL=`uname -r` ifneq ($(KERNELRELEASE),) # call from kernel build system obj-m := hello.o else KERNELDIR ?= /lib/modules/$(MYKERNEL)/build PWD := $(shell pwd) default: $(MAKE) -C $(KERNELDIR) M=$(PWD) modules endif clean: rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions depend .depend dep: $(CC) $(CFLAGS) -M *.c > .depend ifeq (.depend,$(wildcard .depend)) include .depend endif---------------------------------
Registered Linux User #440311
HI2ARUN _AT_ GMAIL _DOT_ COM
---------------------------------
- 04-05-2007 #10Just Joined!
- Join Date
- Aug 2006
- Location
- india
- Posts
- 57
i am using ur makefile only cyberinstructer but one more pbm
build link in my /lib/modules is looking for this source ,( it is a broken link)
usr/src/kernels/2.6.15-1.2054_FC5-i686
i included a wrong source i guess it is showing error as ...(kernel-2.6.15-1.2054_FC5.src is what i included)
[root@localhost hello]# make -f Makefile.txt
make -C /lib/modules/`uname -r`/build M=/home/rajasekhar/hello modules
make: *** /lib/modules/2.6.15-1.2054_FC5/build: No such file or directory. Stop.
make: *** [default] Error 2
if so please send me the correct i686 source ,i search on kernel.org but i think i am a bad searcher


Reply With Quote
