Difference between revisions of "Compile Software for the Humax"
Line 11: | Line 11: | ||
After this, close your telnet session and create a new one to properly set up the environment, and you are ready to compile your first piece of software on the Humax. | After this, close your telnet session and create a new one to properly set up the environment, and you are ready to compile your first piece of software on the Humax. | ||
− | == | + | === Example - compiling the GNU zip (gzip) program === |
+ | |||
+ | <pre> | ||
+ | humax# cd /mod/tmp | ||
+ | humax# wget http://ftp.gnu.org/gnu/gzip/gzip-1.4.tar.gz | ||
+ | --2011-08-18 16:39:58-- http://ftp.gnu.org/gnu/gzip/gzip-1.4.tar.gz | ||
+ | Resolving ftp.gnu.org... 140.186.70.20 | ||
+ | Connecting to ftp.gnu.org|140.186.70.20|:80... connected. | ||
+ | HTTP request sent, awaiting response... 200 OK | ||
+ | Length: 907411 (886K) [application/x-gzip] | ||
+ | Saving to: `gzip-1.4.tar.gz' | ||
+ | |||
+ | 100%[======================================>] 907,411 225K/s in 4.2s | ||
+ | |||
+ | 2011-08-18 16:40:03 (210 KB/s) - `gzip-1.4.tar.gz' saved [907411/907411] | ||
− | + | humax# tar -xvf gzip-1.4.tar.gz | |
+ | gzip-1.4/ | ||
+ | gzip-1.4/zgrep.1 | ||
+ | gzip-1.4/configure.ac | ||
+ | ... | ||
− | + | humax# cd gzip-1.4 | |
− | CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" | + | humax# CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" ./configure --prefix=/mod |
− | ./configure | + | checking for a BSD-compatible install... /mod/bin/busybox/install -c |
− | + | checking whether build environment is sane... yes | |
− | + | ... | |
− | |||
− | |||
</pre> | </pre> | ||
+ | |||
+ | |||
+ | == Cross compiling on an external host == |
Revision as of 16:47, 18 August 2011
Compiling on-box
It is possible to compile some software directly on the Humax itself, however due to the limited amount of CPU horsepower available, this is only recommended for fairly small packages.
First you need to install the gcc and gawk packages. gcc is the compiler itself and automatically pulls in dependant packages, gawk is needed to properly support packages which use GNU autoconf, which most do.
humax# opkg install gcc gawk
After this, close your telnet session and create a new one to properly set up the environment, and you are ready to compile your first piece of software on the Humax.
Example - compiling the GNU zip (gzip) program
humax# cd /mod/tmp humax# wget http://ftp.gnu.org/gnu/gzip/gzip-1.4.tar.gz --2011-08-18 16:39:58-- http://ftp.gnu.org/gnu/gzip/gzip-1.4.tar.gz Resolving ftp.gnu.org... 140.186.70.20 Connecting to ftp.gnu.org|140.186.70.20|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 907411 (886K) [application/x-gzip] Saving to: `gzip-1.4.tar.gz' 100%[======================================>] 907,411 225K/s in 4.2s 2011-08-18 16:40:03 (210 KB/s) - `gzip-1.4.tar.gz' saved [907411/907411] humax# tar -xvf gzip-1.4.tar.gz gzip-1.4/ gzip-1.4/zgrep.1 gzip-1.4/configure.ac ... humax# cd gzip-1.4 humax# CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" ./configure --prefix=/mod checking for a BSD-compatible install... /mod/bin/busybox/install -c checking whether build environment is sane... yes ...