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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
06-18-2012, 03:39 PM
|
#1
|
Member
Registered: Jun 2012
Location: ghaziabad , delhi , india
Posts: 105
Rep:
|
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 !
|
|
|
06-18-2012, 04:08 PM
|
#2
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
( 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.
|
06-19-2012, 04:55 AM
|
#3
|
Member
Registered: Jun 2012
Location: ghaziabad , delhi , india
Posts: 105
Original Poster
Rep:
|
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 !
|
|
|
06-19-2012, 05:02 AM
|
#4
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,452
|
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?
|
|
|
06-19-2012, 05:30 AM
|
#5
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
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 ?
.
|
|
|
All times are GMT -5. The time now is 08:48 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|