LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


Reply
 
Search this Thread
Old 08-23-2012, 05:08 AM   #1
pradiptart
Member
 
Registered: Sep 2007
Posts: 102

Rep: Reputation: 12
what is the difference between a linux embedded and a device driver programer ?


Hi,
Can any one tell me a simple doubt in my mind about is there any difference between a linux device driver developer and a linux embedded programmer.
I am asking this because I want to become a device driver programmer but i do not know circuit design ,so I want to know if this is needed by a device driver programmer or not and what things needed to be a good device driver programmer.

I got some idea about the embedded is related to electronics and circuits and some programming also.as device driver is also mix of a hardware( as I have to know about the hardware ) and a software (to interact with the hardware ) so what is the difference between this two field and kindly tell me this .

what are the things that a device driver programmer should know and which is not for the embedded programmer.kindly tell me simple difference betweent this two field.

It is one career related question so kindly help me to know this things.

Thanks
 
Old 08-23-2012, 08:39 AM   #2
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,626

Rep: Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260
"Embedded Linux" is something that's part of an appliance, such as (most obviously) a cell-phone or perhaps a traffic light system or a microwave oven.

"Device drivers" are the low-level components that allow the Linux kernel to communicate with a particular hardware device.

I suggest, frankly, that you start small. Get "into" a Linux shop in, frankly, any capacity, not some esoteric one.
 
1 members found this post helpful.
Old 08-23-2012, 09:36 AM   #3
rstewart
Member
 
Registered: Feb 2005
Location: Sunnyvale, CA
Distribution: Ubuntu
Posts: 205

Rep: Reputation: 38
To be a device driver programmer you don't necessarily need to know circuit design. That said however, you do need to know how to read chip data sheets, and technical app notes in order to know how to fully utilize the hardware. Being an embedded programmer you may or may not need to know the hardware at the chip level - that really depends upon the project, usually not, but you need to fully understand multi-threading issues, semaphores, mutexes, shared memory, etc in order to provide either real-time or near real-time performance. You will also need to understand how the hardware operates and how the device drivers work in order to make the most efficient code designs for the project.
 
1 members found this post helpful.
Old 08-23-2012, 11:42 AM   #4
pradiptart
Member
 
Registered: Sep 2007
Posts: 102

Original Poster
Rep: Reputation: 12
hi,sundialsvcs and rstewart
Thanks for your reply,I got some idea about the difference.

@sundialsvcs :
Quote:
I suggest, frankly, that you start small. Get "into" a Linux shop in, frankly, any capacity, not some esoteric one.
I have not got any thing from this line ,kindly explain ..what i will start ?? as you are saying..kindly explain something.

@rstewart:
Quote:
but you need to fully understand multi-threading issues, semaphores, mutexes, shared memory, etc in order to provide either real-time or near real-time performance. You will also need to understand how the hardware operates and how the device drivers work in order to make the most efficient code designs for the project.
you are saying this all need for a device driver program ,am i correct or not.I am doing small programs to understand these concepts.

Thanks for your reply..
 
Old 08-23-2012, 12:32 PM   #5
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Embedded systems people will probably do some or a lot of device driver programming, as well as higher level design, programming, and/or integration. It is probably useful to have some hardware and electronics knowledge in either role. Embedded systems are likely to talk to other devices or external hardware, so understanding something about the electrical nature and other aspects of such devices can be useful. It is probable that people skilled in one field also have some expertise in the other, and I would guess that a lot of people would function well in both fields, or not even draw a clear distinction between them.

'Embedded systems' does not imply anything about the nature of the system or the software; Linux or any other OS may or may not be present in something we would call an embedded system. On smaller microcontrollers and the like, one tends to program to 'bare metal', and that may or may not involve a high level programming language. The GUI might be a pin on a chip, to which you attach a DVM, scope probe, or an LED.

Bringing up a new board is one of the more interesting jobs in embedded systems. The design is supposed to work, but often doesn't. The supplied hardware is supposed to match the design, but often doesn't. Real-world and other unexpected influences haven't been understood, and there quite possibly is no code whatsoever that is known to run on the new hardware. Working through problems like those requires knowledge from programming, electronics design, electronics troubleshooting and repair, test & measurement, and a good dose of instinct, insight, and insanity.

Writing device drivers for an established OS or other framework usually requires knowledge of the software components on each side of the driver. That will be some kind of hardware (and the related infrastructure, like buses and other interfaces) on the one side. On the other will be either an OS, or some kind of (hopefully) specified application-layer software interface. Interpreting chip data sheets, CPU data sheets, and peripheral bus/interface specs is probably useful knowledge. Sometimes, a device driver is layered between other software layers, rather than talking to actual silicon. Sometimes a 'device driver' is just a bunch of subroutines used within the application code running on the board.

--- rod.

Last edited by theNbomr; 08-23-2012 at 05:10 PM.
 
1 members found this post helpful.
Old 08-23-2012, 02:38 PM   #6
pradiptart
Member
 
Registered: Sep 2007
Posts: 102

Original Poster
Rep: Reputation: 12
Hi theNbomr,
Quote:
Writing device drivers for an established OS or other framework usually requires knowledge of the software components on each side of the driver. That will be some kind of hardware (and the related infrastructure, like buses and other interfaces) on the one side. On the other will be either an OS, or some kind of (hopefully) specified application-layer software interface. Interpreting chip data sheets, CPU data sheets, and peripheral bus/interface specs is probably useful knowledge. Sometimes, a device driver is layered between other software layers, rather than talking to actual silicon. Sometimes a 'device driver' is just a bunch of subroutines used within the application code running on the board.
I really appreciate the way you have explained this things so clearly,What I got is device driver programmer is more concerned about the software thing and some hardware knowledge (like buses and other interfaces) for ,how to use the hardware efficiently using programming.

I do not have any electronic knowledge ,can i will become a device driver programmer.I am very interested in this device driver development.

Thanks for your lucid explanation.

Last edited by pradiptart; 08-23-2012 at 03:05 PM.
 
Old 08-23-2012, 05:08 PM   #7
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Sure. You just have to learn some of the lexicon of IC datasheets and how it translates into what you have to do to stuff the right bits where & when they belong. It isn't so much different, conceptually, from the interface to the OS. Of course, learning any special skill takes some work; if it didn't, it wouldn't be a special skill.
All of this talk will make a lot more sense when it comes to actually doing something. Someone else already suggested starting small. I always think the old PC parallel port makes a great learning tool for crafting a device driver. It is simple, well documented, and if you can scrounge an old clunker PC, it will probably have one built in. It only has a few registers, and with a DVM, you can see the effect of everything you write. Contrive a method of your own to communicate with another device or other computer using parallel ports. Or any other novel use you can dream up. The port can go do input, output, and generate interrupts, so you can exercise a lot of the stuff you need to use in writing hardware device drivers.
Another good training device is the Filesystem in USErspace (fuse). It is a framework for creating your own filesystem (which are typically implemented as device drivers), but everything is done in userspace. The concepts used in a kernel-mode driver are all there, but everything is done in Linux userspace.
--- rod.
 
1 members found this post helpful.
Old 08-24-2012, 12:26 AM   #8
pradiptart
Member
 
Registered: Sep 2007
Posts: 102

Original Poster
Rep: Reputation: 12
Hi theNbomr,

Quote:
Sure. You just have to learn some of the lexicon of IC datasheets and how it translates into what you have to do to stuff the right bits where & when they belong. It isn't so much different, conceptually, from the interface to the OS. Of course, learning any special skill takes some work; if it didn't, it wouldn't be a special skill.
Thanks for your reply,Kindly tell me following things.

1. kindly tell where these information about the above things will be available.can you give me some link to start or tell me to where to enter this device driver world as you told "trying some small programming on parallel port" .can you give me some books name or some website from where I will start and learn the basics to clear fundamental things.

2. Also give some idea What are the programming language I need to know for this? .Whether assembly is needed or not I have some idea about 8085 assembly not expert,Kindly tell me what to study as a programming languages.

Thanks

Last edited by pradiptart; 08-24-2012 at 12:33 AM.
 
Old 08-24-2012, 09:01 AM   #9
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Go to websites of chip manufacturers to find their datasheets. You can find examples of chips supported in the Linux kernel by browsing the kernel sources. Same for the various buses and other communications channels such as PCI, I2C (eye-squared-see), SPI, USB, etc. When you are given a hardware oriented device driver project, you will know what chips are involved, and the datasheets should be provided, or else you can seek them out. Just Google it. Same for parallel port info. There used to be hundreds of sites with parallel port projects and data. Now, it is probably just dozens.
For writing Linux device drivers, the book Linux Device Drivers, 3rd Edition (LDD3) is available in hardcopy and online for free. Other OS's should have documentation, and for commercial OS's such as vxWorks, the vendor will have toolkits and documentation available (for fee).
The language you use will probably be dictated by the project. Small architectures will often require all or part of the project to use assembler. C is probably the most versatile high level language to learn if you're starting from ground zero. I have seen other languages used (FORTAN, Forth, Pascal) but not recently.
--- rod.
 
1 members found this post helpful.
Old 08-27-2012, 12:32 AM   #10
pradiptart
Member
 
Registered: Sep 2007
Posts: 102

Original Poster
Rep: Reputation: 12
Thanks,

I know C and learning also some more concept.I will read the LDD3 book,I will buy that book and also the Linux kernel development book of Love also as it a good book on linux kernel internals.

Thanks for your answers and make my all doubt clear ,Keep it up.
 
  


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
Linux PCIE and PCI device driver difference? ningzhanghnu Linux - General 2 03-04-2012 10:30 AM
what difference between Windows and Linux device Driver Architecture? rubinliutoo Linux - General 2 06-28-2008 10:19 PM
What is the Linux difference between PCIE and PCI device driver? jbreaka4lyfe Linux - General 0 06-04-2008 02:54 PM
Device driver for embedded board zvivered Linux - Kernel 1 10-22-2007 05:20 PM


All times are GMT -5. The time now is 05:23 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