Help - Search - Members - Calendar
Full Version: device driver programming
MandrivaUsers.org > Advanced Topics > Command Line, Kernel and Programming
grimx
I'm using Mandriva Free 07

What all do i need to start writting my own modules for linux??
I'm downloading an e-book at the moment, just woundering what else i'll need??
grimx
do i need a copy of the kernel source in order to write device driver modules??
scarecrow
QUOTE (grimx @ Mar 26 2008, 09:45 PM) *
do i need a copy of the kernel source in order to write device driver modules??


For some of them kernel headers should be enough, but yes- to be able to build the ABC kernel module you need the kernel-source RPM being installed.
grimx
i'm going to download it from linux.org
kernel version 2.6.24 right?

i'm on my friends window box because my
dsl connection is down, won't be repaired for
a couple of days.

ah never mind i got the version it is 2.6.17-15mdv
on linux.org i see 2.6.17, 18-Jan-2006
is that the correct one?????
Greg2
QUOTE (grimx @ Mar 26 2008, 05:08 PM) *
ah never mind i got the version it is 2.6.17-15mdv
on linux.org i see 2.6.17, 18-Jan-2006
is that the correct one?????

No. If you're using Linux kernel 2.6.17.15mdv for i586, you want that kernel source (from Mandriva, and with Mandriva patches) to compile a new driver for your system. Here: kernel-source-2.6.17.15mdv
iphitus
Why do you want to do device driver programming?

Do you have a reasonable amount of experience in C?
grimx
yeah, i'm ok. i mean i havn't done qeues or binary trees or anything, but i get the giest of it.
up till now i've been using the linux system calls for file and dir manipultaion.
i've written a program to turn hex into binary and to turn a decimal to hex and binary
upto a double word. I can post it if you want to see it.

the reason i want to write modules is to get closer to my system.
too learn more about it.
i mean the kernel is the core right, if i want to get to know linux is'nt that where i want
to be.
I feel a little in the dark using c and the system calls, when i can be closer.

granted i'm still learn'n the commands for the terminal
grimx
oh, and thanx Greg2 for the .rpm
Greg2
QUOTE (grimx @ Mar 27 2008, 04:29 PM) *
I feel a little in the dark using c and the system calls, when i can be closer.

You can not be closer than C, to the Linux kernel. After you understand C: Here's some information that will help you:
Linux Kernel Module Programming Guide

kernelnewbies.org/Drivers

kernelnewbies.org/KernelHacking
grimx
alright, thanx Greg2
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.