LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-18-2012, 03:39 PM   #1
tushar_pandey
Member
 
Registered: Jun 2012
Location: ghaziabad , delhi , india
Posts: 105

Rep: Reputation: Disabled
why make command is not working


i am using make command for compiling my module , but it is working properly !

see i have created my module ... hello.c & i am taking the help of this article "http://www.cyberciti.biz/tips/compiling-linux-kernel-module.html"

so my whole procedure is based on this article !
 
Old 06-18-2012, 04:08 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
( http://www.cyberciti.biz/tips/compil...el-module.html
> http://www.tldp.org/LDP/lkmpg/2.6/html/hello2.html )

This Makefile will work : hello-1.o , hello-1.ko are created ..
Code:
obj-m    := hello-1.o

KDIR    := /lib/modules/$(shell uname -r)/build
PWD    := $(shell pwd)

default:
	$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules

.

Last edited by knudfl; 06-18-2012 at 04:11 PM.
 
1 members found this post helpful.
Old 06-19-2012, 04:55 AM   #3
tushar_pandey
Member
 
Registered: Jun 2012
Location: ghaziabad , delhi , india
Posts: 105

Original Poster
Rep: Reputation: Disabled
to , knudfl , thanks for your reply

but can you please explain this process in detail , because i am new in LINUX and i want to join device driver development , so please if you can help me !

.... still i am not able to create modules !
 
Old 06-19-2012, 05:02 AM   #4
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 8,501

Rep: Reputation: 2431Reputation: 2431Reputation: 2431Reputation: 2431Reputation: 2431Reputation: 2431Reputation: 2431Reputation: 2431Reputation: 2431Reputation: 2431Reputation: 2431
I do not think this is the normal way of learning: you have just started to learn "linux" and you now want to implement device drivers without knowing how a simple makefile works. Aren't you?
 
Old 06-19-2012, 05:30 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
The way I see it :
A couple of lines are missing in the Makefile's from your link.


Prerequisites for building kernel modules :
A Linux OS that's easy to use for development.
Like Slackware, Fedora 17, CentOS 6.
I.e. the required kernel module build files in /usr/src/
are either included, or easy to install / update.

Which OS do you intend to use ?
.
 
  


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 command still not working? dorkytehl Linux - General 8 02-05-2011 01:22 PM
make command not working in opensuse suresh.j Linux - Kernel 3 08-03-2010 03:57 AM
'make' command still not working on cygwin acharyaa Linux - Newbie 2 01-22-2010 02:42 PM
'make' command not working in redhat 9 sparrott Linux - Newbie 1 03-30-2006 03:49 PM
New Kernel-make command not working ashley67 Linux - Newbie 6 12-01-2004 12:15 AM


All times are GMT -5. The time now is 08:14 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration