Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 05-08-2005, 11:26 AM   #1
Registered: Apr 2004
Distribution: Debian -unstable
Posts: 700

Rep: Reputation: 31
Linux 2.6 Module programming - failed first attempts

Hello !

Ok , I'm reading in an attempt to learn a bit about Linux Kernerl Module programming .

The programming part is fairly easy to understand .. what I can't understand is how I am supposed to compile the modules ..

So, let's look at a simple Makefile for compiling a module named hello-1.c:
.. so .. do I just go "vi Makefile" in the same dirrectory as my hello-1.c and insert there obj-m += hello-1.o ; followed by "make -C /usr/src/linux-`uname -r` SUBDIRS=$PWD modules" ? because it doesn't work ..

Also .. "usual" task as .. writing/reading to/from files/sockets and other tasks .. are they achieved in modules in the same way (same functions) as in normal programs ?

Also , does anyone know of any more , valuable (preferably Free and available Online) resources on this topic ?

Thank you for your attention !
Old 05-08-2005, 12:24 PM   #2
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
You might find the 3rd edition of Linux Device Drivers useful. I have to the point that I purchased a paper copy even though it's available for free online from the publisher (thank you, O'Reilly).


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
SSH tricks -- any way to block failed attempts by IP address tensigh Linux - Security 10 06-06-2008 03:46 PM
Failed SSH login attempts Capt_Caveman Linux - Security 38 01-03-2006 03:22 PM
Multiple installation attempts in a laptop failed miserably KLG Ubuntu 1 07-08-2005 06:46 AM
lock password after failed attempts... manudath Linux - Security 2 04-28-2005 10:55 AM
all attempts failed btb103 Linux - General 1 10-23-2001 05:31 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:51 AM.

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