Linux supports kernel driver and kernel module. See the following page:
http://unix.stackexchange.com/questions/47208/what-is-the-difference-between-kernel-drivers-and-kern...
http://haifux.org/lectures/86-sil/kernel-modules-drivers/kernel-modules-drivers.html
http://www.tldp.org/LDP/lkmpg/2.6/html/lkmpg.html
There is a lot information for developing char device driver for Linux and adding this driver to LTIB. For example see the following pages:
http://www.tldp.org/LDP/lkmpg/2.6/html/x569.html
http://derekmolloy.ie/writing-a-linux-kernel-module-part-2-a-character-device/
http://blog-eforembedded.rhcloud.com/category/ltib/
http://ltib.org/pages/LTIB_generic_v1.4_-_version_6.4.1.pdf
Usually customers use LTIB for application code and device drivers.
For the cross compile is better to do using LTIB, you need to do the next steps to add in the LTIB menu
- 1.- Create your directory for your driver or use a directory under linux/drivers/
- 2.- Modify/create the Kconfig to add your driver as configurable in ltib.
- 3.- Modify/reate Makefile to compile your driver with the same kernel as all the drivers.
In case that you create a new directory you need to change the Kconfig and Makefile under linux/drivers to add your configurations.
When you have all your files, under ltib/ enter the command ./ltib -c, select Configure Kernel and in the next window select Device Drivers and you could find your driver there, chose your driver to be compiled as M and finally you can use this file in you board.
Have a great day,
Pavel Chubakov
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------