Monday, December 3, 2012

Linux Study Material

Kernel compilation:
Developing Kernel modules/Device drivers:

Implementing System calls in Linux:
Improtant Documentation:   

Applying a patch:
  • Linuxdocs:
The GCC compiler, the GNU Make, and the KBuild:
The Kernel Development: 

The Kernel Debugger:
Kernel Support for Faster Web Proxies


  1. Hey Rajeev
    This is really informative buddy,thanks for helpping people like me who are just beginners in this domain.


  2. If you need any additional assistance, feel free to send me email. I will try my best to help you

    1. Hi Rajeev,

      Can you please give me your email ID.

      Thanks and Regards,
      Pravin Jogdand

  3. Hi Rajeev,

    I was working with Linux ubuntu flavour , suggest me how to start debugging the kernel ,will the information find in the site ,you have mention is applicable to ubuntu



  4. This comment has been removed by the author.

  5. Hi Tamil Sorry for delayed response, ideally there shouldnt be any problem with basic debugging, start using kernel debugger to step through,
    Follow some of the basics from below

    Ping me if you have any specific question on these.
    Again apologies for delayed response was travelling

  6. also updated the post with these so that others dont have issues finding them

  7. thanks for your reply , I am started to debug the kernel ,if I come across
    any issues I will ping you .Also i will update once i completed a small example .

  8. ya , i have successfully added a simple kernel module to my ubuntu 12.10

  9. Great...I am happy that, i can be of some help to you.

  10. Hi Rajeeev,

    is it possible to write device drivers as loadable kernel module.

  11. yeah we can do that...kindly go through below article for more info.
    else i will send you some sample code which i wrote when i was starting on DD's

  12. ya sure ,thanks for your guidelines i will try myself Rajeev,if I need any clarification I let you know

  13. Hi Rajeev,
    I like to know, when I read or write some thing to file ,how it actually stores to hard drive. My question is eg: when i use fwrite in c program to store my name in the text file,how fwrite links to system call, drivers and finally how it writes to hard disk.I know its very generic question . if possible give me the roadmap for me to proceed. After 3 day I am again starting with kernel module programming :)

  14. is "Essential Linux Device Drivers " book will be useful to get start driver programing ???

  15. Yes it will surely help.... Let me know if you need any response will be slow in coming days ....I m out on vacation

    Sent from my i Pad

  16. Hi Rajeeev,
    when I started doing small kernel module programming , I feel like, I don't have much knowledge about Linux system files , So I am gonna to start from the base by following the book "Essential Linux Device Drivers", Mean while I will keep you update about my learning status . Thanks for your continues support

  17. Hi Rajeev,
    i wanna to have serial communication between my Linux system and between my piccolo c2000 real time controller . how to do i start proceed.



  18. i m not sure if i understood your question, But there are plenty of ways you can have serial communication from controller to linux box.
    follow some standard rules
    1. Make sure you use correct cables (2 & 3 crossed out, no handshake lines to start with)
    2. Seperate the devices, i.e. connect your Linux machine to a PC running a terminal program and try to establish 2-way communication -
    3. connect Linux and C2000 only if they both work against a known and proven device i.e.
    RS232, IEEE 1394

  19. ya ,thank your reply , i have made small mistake in mu code ,its working fine know .



  20. Hi,
    I want to port kernel for device .
    Can u plz help me whcih device is easy to port the kernel
    Any SMT Board model name that will easily port kernel for that Board

  21. Hi Dileep,
    Try following article for the basic porting..if that doestnt help give me a shout and will take you to step by step approach.

  22. Hi Rajeev,

    Is there any examples for pci drivers??

  23. Kindly Look at the Blog under Device Driver. under alsa proj. Seach for PCI Driver Example's. Let me know how it goes.


  24. Hi Rajeev,
    under this blog i have checked the device driver section, but i cant find alsa proj. i have few basic questions in pci
    1)how pci bus id are allocated to new devices connected to it.

  25. 2) How pci bus connector connects to Processor,For example if my system has 3 PCIe connector's , in which PCIe network card is connected in one pcie slot and PCIe graphics card on other and one left this two will simultaneous communicates ????.

  26. Just do ctrl+f and search for "writing-an-alsa-driver" you will find a section called
    Basic Flow for PCI Drivers: go into the full code example and you are there. Let me know if you still have issue locating it.

  27. hi Rajeev its been long time , i am visting again ,
    i have read about char drivers understood very well. i like to implement some real time driver. so i am going for serial driver. could u tell me is there any simple serial driver so that i will communicate via my pc serial port . So that understood more practically



  28. Follow the blog have everything you need here..... ctrl+f and search for serial-drivers

  29. Hi Rajeev any IDE available for device driver development

  30. You can use either of these for the same.

    See my blog links for more details

    Let me know for any other questions you have details

  31. Hi,Rajeev

    I am new in device driver. i want to learn I2c communication with device driver. Do you have tutorial

  32. Hi Rajeev,

    I have knowledge about Low Level Drivers. I have worked on some high level drivers also.
    But I don't have deep understanding about high level drivers.

    1). My question is how my driver is attached to bus driver..?
    2). When a device is connected,How the bus(I2C) driver find out which driver is there for this device.
    3). How the kernel takes care of driver table.
    4). What about probe in a driver.
    5). Who calls probe.
    6). In the kernel where can i find specific code that shows the calling of probe function of the specific driver.

  33. great work!!
    though i am not able to understand much of the data from the above links (beginner) i must appreciate your wok.


  34. Thanks Nilesh.... I have created this to help,Its just a start, Keep on reading and if you have specific questions dont hesitate to contact me.

  35. Hi Rajeev,

    I wanted to know about pcie hotplug. How it works, what is pciehp, acpiphp drivers, are they same? im a begineer on this can you please help me on this.


  36. Hello Sathyavathi,

    I think you should do some study, also i dont know what you are trying to do so it would be difficult to help without knowing what you want. But please read some of the documents attached.

    I am sure these will help.

    Let me know if this helps?

  37. hello rajeev sir i want to learn linux device driver on arm so please help me out how can i start. i already have a knowing of arm controller and linux intern and shell scripting but not try any driver program yet so please help me out regarding linux device driver and porting linux on arm

    Akash Garg

  38. Hello Akash,
    What help you are looking for, did you get a chance to go through the basic of Device Drivers? In my opinion start going through Device driver section in the blog and go through example program to start with. there are some good articles about Porting as well. go through it... Send me email if you have any doubts.

    Hope this helps

  39. thanks sir for your reply. i never go through with any device driver yet but i want to do.
    basically i had 1.5 year exp with micro controllers now i want to go with porting and device driver on controller basically with beaglebone or raspberry pi (ARM series). please help me out in that section .

  40. go through documents, it has all the required information. if any problems then ask for help.

  41. Hi Rajeev,

    I have a question regarding PCIe hot-plug.
    Can we do a hot-remove of a device when it is mounted?
    i.e i mount the device and hotremove it without unmounting.
    If yes. the filesystem will handle unmount of the device or we have handle unmounting the device in the driver.
    Second scenario- Can i go in the directory where the device is mounted and hotremove the device?
    i.e mount /mnt
    cd /mnt then hot remove the device.
    here also the filesystem will take care of unmounting and flushing the cache?
    or it should be handled in driver. if unmounted from mount point what is the behaviour?

  42. great collection man. thanks alot.

  43. This comment has been removed by the author.