compilation of driver

utkarshrawat - November 28, 2011

 

Hi All

Iam trying to compile one simple driver example but it seems its getting problem in compilation .

I have one simple driver example in linux thats working fine. But when Iam compiling same makefile into montavista (Linux (none) 2.6.18_pro500-pc_target-x86_586 #1 PREEMPT Sun Mar 11 08:37:26 EST 2007 i586 GNU/Linux)

Iam getting error

 

make -C /lib/modules/2.6.18_pro500-pc_target-x86_586/build M=/home/drvr1_proc modules
make: *** /lib/modules/2.6.18_pro500-pc_target-x86_586/build: No such file or directory. Stop.
make: *** [all] Error 2

I Know it will not compile because of different enviroment Since its linux fedora 11 ,Can u please tell me how should I compile one simple driver.

Follwing Makefile sourcecode

 

obj-m	+= drvr1.o

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

clean:
rm -r *.ko
rm -r *.o

 

 

Share this

Comments

compilation of driver

This method requires a configured and built kernel already.  As you can see, the build is complaing about a missing file.  A configured kernel is not provided in the filesystem.

Ya  when I when went to this

Ya  when I when went to this PATH

lib/modules/2.6.18_pro500-pc_target-x86_586

I found out there was no build directory ,do I have to install montavista again or is there any other soultion

What are you running?

Can you provide more information about which version of MontaVista Linux you're using?  If it's a licensed version, you're likely able to contact support directly to discuss your issue.