Search code examples
ubuntudevice-driverkernelsystems-programming

System programming in Ubuntu


[Question moved in from askubuntu.com]

I'd like to get into Ubuntu systems programming; to be specific - developing and debugging device drivers. However, I'm not sure about how to get started, even though I have prior experience contributing to other open source projects.

I have considerable skill/experience programming in Python(but thats going to be useless here, I guess), moderate C programming skills, good debugging skills(only user-mode programs though), decent static reversing skills(more of a hobby) and have gone through a short(but really enjoyable) kernel module programming tutorial here.

There are a few questions I'd like to ask.

  1. Any particular advice you would like to give me(something you had to learn the hard way). An abstract question, yes.
  2. I have been an Ubuntu user for a long time, but I'm not sure where I can start helping out. Given my specific interests in device drivers, any suggestions? Suggested reading material? I'm currently reading "Linux System programming - talking to the kernel and C library".
  3. Suggested reading material related to device driver debugging?

Thanks.


Solution

  • A few tips:

    • C is core to Linux kernel development. Other things may help you automate or test, but you'll be doing C.
    • Any Linux OS is fine for kernel development. Some may make building and deploying your kernels easier, from memory Ubuntu uses Debian's kernel packaging infrastructure which makes it easy to add your own modules and have them automatically built for new kernel versions.
    • Start by writing simple modules.
    • Start by playing with the kernel build process, and make config and friends. Reboot and run kernels you compiled yourself, this will give you confidence. Try tweaking the crap out of the kernel its a lot of fun and you will learn about all the subsystems in place.
    • I read this book years ago: http://www.amazon.com/Linux-Kernel-Primer-Top-Down-Architectures/dp/0131181637, it was okay, but I wasn't great at C back then either.
    • The tutorial link in your question is broken.