Reputation: 3943
I already have a functional embedded linux system using MontaVista. My embedded board boots linux and runs the included binaries just fine. I know how to make a small C program and compile it with a Makefile
that calls arm_v5t_le-gcc
instead of gcc
.
That is all simple enough, but how the heck do you configure and install a "standard" linux package that requires ./configure
, make
, and make install
?
The main conceptual problem I have is that ./configure
collects data about your current system like compilers and include files and such. When I run ./configure
, it is just going to collect info about my desktop linux environment, not my embedded environment.
Upvotes: 2
Views: 1722
Reputation: 3943
I am answering my own question. It turns out you can run ./configure -h
to see some options, some of which allow you to describe your embedded (or cross compile) environment.
In my specific case, I wanted to compile libvisca (a Sony RS232 camera control library) for my embedded ARM environment that runs MontaVista. I ran the following commands to get it working:
export CC=arm_v5t_le-gcc
export AR=arm_v5t_le-ar
./configure --host=arm
make
So long as you have the above compilers in your $PATH
, you're all set. Happy compiling.
Upvotes: 3