If you want to use a program, currently not contained in the OpenWrt repository, you probably won't find a binary compiled for your CPU. Provided that it is released as open source, you can download the code and compile it using the OpenWrt Buildroot.
Note that not every code is compilable for every CPU architecture. Also performance and available RAM on embedded systems is limited compared to ordinary computers.
staging_dir/toolchain-architecture_gcc-compilerver_uClibc-libcver/bin/
directoryPATH
environment variable:PATH=$PATH:(your toolchain/bin directory here)
export PATH
STAGING_DIR
environment variable to the above toolchain dir and export it:STAGING_DIR=(your toolchain directory here)
export STAGING_DIR
--build=architecture-unknown-linux-gnu --host=architecture-openwrt-linux-uclibc
(for example: ./configure --build=x86_64-unknown-linux-gnu --host=mips-openwrt-linux-uclibc
)./config.guess
to get the --build=
option.'checking whether we are cross compiling... yes
' is yes.CC
and LD
environment variables (usually not needed if GNU configure was used)make CC=architecture-openwrt-linux-uclibc-gcc
LD=architecture-openwrt-linux-uclibc-ld
find -iname *program*
file program
to confirm cross-compiling was successful. CFLAGS
and LDFLAGS
to point to the staging_dir/target-architecture_uClibc-libcver/usr/include
and .../usr/lib
directoriesmake menuconfig
. [Advanced configuration options→Toolchain Options→Build gdb]./scripts/remote-gdb
When compilation is finished, copy the resulting binary and related libraries to the target device to test it.
It might be necessary to set LD_LIBRARY_PATH
on the target to point the binary to libraries in non-standard locations.
If the program works well enough, you maybe want to build a real package for the opkg package manager and make it easily accessible for everyone out there. See Creating your own packages and Using Dependencies for further information on that.