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

Guest #1498479
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

A question of your own? This thread is over 16 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.