Cross-compiling a driver for LM73 sensor for ARM11-based board

Guest #1498479
Rate this post
useful
not useful
Hi everyone!!

I am working with a board with a ARM11 processor (Freescale i.MX31). I 
have successfully cross-compiled the linux kernel 2.6.31 and it's 
already running on the board.

In the board I have a LM73 temperature sensor connected via I2C. I 
already have the driver for the sensor (i.e. the lm73.c) and all the 
header files needed to cross-compile it.

I just wanted to ask if someone could tell me how to cross-compile the 
driver so that I can transfer it to the board and then insert it as a 
module.

I'm not an experienced linux user. I tried:

root@ubuntu:~/../LM73# "Cross_compiler_path" -o LM73 LM73.c

I get loads of errors that have nothing to do with my code but instead 
with header files that call other header files that call...

Maybe I should write a Makefile, which I guess would consist only of a 
few simple lines..??

I would appreciate any kind of help.

Thank you in advance.

Reply

Please log in before posting.

or

Log in with Google account

Registration is free and takes only a minute.

Register now