Question

hi I'm really interested in Linux kernel development but I'm having trouble understanding a few big concepts.

First, is a device driver programmer and embedded programmer two completely differnet jobs??

I mean I know embedded programmers get in to firmwares and circuits and stuff like that

but do device driver programmers also do the same thing?

Second, I heard that it's good to start linux kernel development by writing device drivers.

Does this mean you have to master device drivers?

Frankly, i want to know exactly what each of these programmers do

what I really want is to understand ARM and x86 based linux kernel and get in to development

and I'm just curious do I really have to know all the circuits and stuff like that.

P.S, is a system programmer also a differnet job??

Was it helpful?

Solution

Some concepts within today's Linux kernel are really complex: scheduling, memory management (MM), locking, stuff specific to each architecture, security, etc.

However, it is generally true that device drivers are somewhat simple (that is, compared to the rest), because their job is usually to act as bridges between userspace interfaces and the actual drived device. Consequently, they seldom play with the internal mechanics of the kernel, except for the drivers API, of course. Also, the kernel community is much more inclined to accept device drivers contributions since they affect only specific use cases (whereas contributions to the core, like MM or security, affect everyone).

Now, before trying anything on the kernel side, make sure to understand the userspace properly. Because, as mentioned above, device drivers register functions that get called when a user calls specific system calls (syscalls) on the special file representing the device. You must then understand very well those system calls.

Before actually writing code, go read a few books mentioned here. They are technical books, but you will need to understand the subject properly.

Also, go read actual code. That's probably the best way to learn: looking at what others did (which is, after all, the very essence of free software). You can start by looking at simple drivers, like the ones in drivers/leds.

About job titles: an "embedded programmer" (or embedded computer engineer) is of course a good candidate for writing device drivers. Embedded computer engineers may also write firmwares, microcontroller programs and actual userspace applications that act close to hardware components (device control, serial protocols, etc.).

You don't need to master circuits to write device driver code, but you certainly need to understand core hardware concepts like interrupts, memory-mapped I/O, timing, buses, locking, power management and possibly some assembly language.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top