LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-07-2012, 05:39 AM   #1
Sandeep Kumar
LQ Newbie
 
Registered: Aug 2012
Location: RCF, Kapurthala
Distribution: Fedora
Posts: 3

Rep: Reputation: Disabled
Question how to use make to install modules


i was seeing lot of kernel code. when i try to make it it simply fails saying "no rule defined for target xxx"...

what is the correct way to make modules

Last edited by Sandeep Kumar; 08-07-2012 at 05:45 AM. Reason: need references...
 
Old 08-07-2012, 10:35 PM   #2
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 612

Rep: Reputation: 125Reputation: 125
Code:
make modules    # Build all modules
make modules_install    # Install all modules
For a listing of all make targets:
Code:
make help
Hope this helps.
 
1 members found this post helpful.
Old 08-07-2012, 11:50 PM   #3
SIG_SEGV
Member
 
Registered: Jul 2012
Location: Banglore, INDIA
Distribution: Fedora-Core
Posts: 70

Rep: Reputation: 11
I think you are not in the host directory of top Makefile, Means you are trying to make somewhere else......
Better you would use -C option (change dir) along with make before executing it and use appropriate target's name

EX: make -C $(dir of Top makefile) $(target name)
 
1 members found this post helpful.
Old 08-14-2012, 03:22 AM   #4
Sandeep Kumar
LQ Newbie
 
Registered: Aug 2012
Location: RCF, Kapurthala
Distribution: Fedora
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thumbs up Ndiswrapper

Quote:
Originally Posted by SIG_SEGV View Post
I think you are not in the host directory of top Makefile, Means you are trying to make somewhere else......
Better you would use -C option (change dir) along with make before executing it and use appropriate target's name

EX: make -C $(dir of Top makefile) $(target name)

I want to use ndiswraper for my acer5750 wifi driver. How to make the .ko module.
I am getting error messages
 
Old 08-14-2012, 10:31 AM   #5
SIG_SEGV
Member
 
Registered: Jul 2012
Location: Banglore, INDIA
Distribution: Fedora-Core
Posts: 70

Rep: Reputation: 11
Well here it is...
NOTE: "pgm means 'program' in this context"
1. Download a driver source pgm or construct it yourself. Choose as you wish...
2. write a make file that can handle the ordered compilation of your program and its dependencies.
For example:
obj-m:
pgm_name.o
pgm_name-objs:
dependency1.o dependency2.o .......
In this example obj-m represents that 'pgm_name' in this directory is built as a loadable kernel module and pgm_name-objs
represent the pgm's dependencies if any.....

if you need your driver to be a built in, then just use obj-y in place of obj-m....That's it.

3.then execute the make with the command
make -C $(dir of Top makefile) M=$(PWD) modules

Note: if the driver is to be a built-in then you have to compile the entire kernel.......Sorry, No way!

4.Now in the present directory you will get the .ko file.
5.Insert this module to the kernel, using
#insmod ./pgm_name.ko
('insmod' needs root permission)

Further questions are invited..........
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
make[1]: *** No rule to make target `modules'. Stop. mswamy78 Linux - Newbie 7 09-03-2011 12:50 AM
Suse 9.3: Cant install Linksys EG1032- No rule to make target 'modules.' Loopey SUSE / openSUSE 5 01-09-2008 01:00 PM
[root@oprations Module]# make make -C /lib/modules/2.6.18-1.2798.fc6/build SUBDIRS=/r korotania Fedora 7 06-22-2007 04:12 PM
CPAN make issues. No modules will install Brnzwngs Programming 3 07-26-2006 10:10 PM
make modules_install don't make any modules in /lib/modules ganesh_maillist Linux - Newbie 1 09-15-2003 02:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration