Difference between revisions of "Linux drivers development"

From ArmadeusWiki
Jump to: navigation, search
m (add some links)
(Driver compilation)
Line 6: Line 6:
  
 
== Driver compilation ==
 
== Driver compilation ==
copier mon mail
+
 
 +
Our custom drivers build are integrated to linux build system.
 +
You can select, in the linux "menuconfig"/"xconfig" tool, which Armadeus
 +
drivers you want to add on your target. (only gpio, ppdev & ps2keyboard are
 +
integrated yet).
 +
 
 +
Here is the way to add custom drivers:
 +
* in armadeus/target/linux/modules/, add a directory for you driver (ex toto/)
 +
* put reference to this directory in the armadeus/target/linux/modules/Makefile and armadeus/target/linux/modules/Kconfig files
 +
* in toto/ put your driver source code and create 2 files, Kconfig and Makefile. (Use armadeus/target/linux/modules/Makefile & Kconfig as examples.)
 +
 
 +
To compile the modules, either launch:
 +
* "make" in armadeus/target/linux/modules/ directory
 +
or
 +
* "make linux" in armadeus/
 +
 
 +
only "make linux" will install the modules in target rootfs
  
 
== i.MX register access from driver ==
 
== i.MX register access from driver ==

Revision as of 22:10, 20 December 2006

This page summarizes all you need to know before starting to develop Linux drivers for your Armadeus board

Recommended reading before starting

We advise you to read (not necessarly understand ;-) ):

Driver compilation

Our custom drivers build are integrated to linux build system. You can select, in the linux "menuconfig"/"xconfig" tool, which Armadeus drivers you want to add on your target. (only gpio, ppdev & ps2keyboard are integrated yet).

Here is the way to add custom drivers:

  • in armadeus/target/linux/modules/, add a directory for you driver (ex toto/)
  • put reference to this directory in the armadeus/target/linux/modules/Makefile and armadeus/target/linux/modules/Kconfig files
  • in toto/ put your driver source code and create 2 files, Kconfig and Makefile. (Use armadeus/target/linux/modules/Makefile & Kconfig as examples.)

To compile the modules, either launch:

  • "make" in armadeus/target/linux/modules/ directory

or

  • "make linux" in armadeus/

only "make linux" will install the modules in target rootfs

i.MX register access from driver

To access i.MX registers from your driver, please use the macros defined in:

#include <arch/arm/imx-regs.h>

For example:


Useful Links