LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 02: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, 03:08 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
( 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 03:11 PM.
 
1 members found this post helpful.
Old 06-19-2012, 03: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, 04:02 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,838

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
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, 04:30 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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



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

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

All times are GMT -5. The time now is 11:18 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
Open Source Consulting | Domain Registration