Compiling Device Driver Against ARM Linux

Ben Kelley
Guys,

Yesterday I made a simple driver based off of code that was in the mini2440
chinese manual.  It's a simple interrupt for one pin on the GPIO.  I have
researched how to compile and install device drivers on my current Linux
system without re-compiling the kernel.  As you know, in order for my
driver to work on the mini2440 I have to cross compile it.  I am a little
unlear on how to do this.  I sent my driver C file to the arm board and
also a simple Makefile script to the board as well.  When I type "make", it
says that the make command is not found on the arm board.  So, how do I go
about installing the make command on the arm board?  Or what commands do I
use to compile this driver in general?  I just need to be able to get the
".ko" file and use the "insmod" command to insert it into the mini2440
kernel, and then use other commands to get my own driver folder to show up
in the "/dev" directory.  Any help would be apperciated.  Thanks you!

-Ben

BenK
I have tried the command
arm-linux-gcc mydriver.c mydriver 

Everything compiles correctly, but it creates a binary file for me... I
need to compile it to where it gives me a ".ko" file.  Any help would be
appreciated.

-Ben

Abuda
Use the google translator in this link:

http://www.sergioprado.org/2010/12/30/mini2440-compilando-aplicacoes-e-d...

BenK
Abuda,
From a very fast translation and overview of this tutorial, it seems like
it should work.  I will try this as soon as possible.  Thank you so much! 
Any other suggestions from anyone else are appreciated.

-Ben

BenK
There is no easier way of doing this?  Thanks

-Ben

BenK
I am having an error when running make.  

/home/team3/Desktop/InterruptsTest/interrupt_driver.c:35: error:
'S3C2410_GPG0' undeclared here (not in a function)
/home/team3/Desktop/InterruptsTest/interrupt_driver.c:36: error:
'S3C2410_GPG3' undeclared here (not in a function)
/home/team3/Desktop/InterruptsTest/interrupt_driver.c:37: error:
'S3C2410_GPG5' undeclared here (not in a function)
/home/team3/Desktop/InterruptsTest/interrupt_driver.c:38: error:
'S3C2410_GPG7' undeclared here (not in a function)
/home/team3/Desktop/InterruptsTest/interrupt_driver.c:39: error:
'S3C2410_GPG6' undeclared here (not in a function)
/home/team3/Desktop/InterruptsTest/interrupt_driver.c:40: error:
'S3C2410_GPG11' undeclared here (not in a function)


I feel like I am missing a header file but I am unsure of which one.  I can
post my code if needed.  Thanks..

-Ben

Neo
The macro is defined in the file 
linux/arch/arm/mach-s3c2410/include/mach/regs-gpio.h
So, you need to use 
#include <mach/regs-gpio.h> 
in your file to resolve this error
-
Neo

raviteja
HI abuda,
   the site you
mention(http://www.sergioprado.org/2010/12/30/mini2440-compilando-aplicacoes-e-d...)
was not in english. plz refer any site which is in english.