A cross-compile toolchain exists of a set of tools: a compiler, linker, assembler, debugger and a C library. A cross-compile toolchain runs on your host system and creates native binaries for your target system. A cross-compile toolchain is basically created in six steps:
The cross-compile toolchain is created in
staging_dir_$(cpu_arch)
. All the tools running on the host, but used to create, analyze
or debug for the target are kept in this directory. All addon headers and
libraries are installed to this directory.
If you want to compile a simple application without using the ADK, just use the compiler directly (e.g. compiling a MIPS Little Endian application):
[label=compile a simple application with the cross-compiler] ./staging_dir_mipsel/bin/mipsel-freewrt-uclibc-gcc -o myapp myapp.c
Check with the tool file if you got a MIPS binary:
[label=check the binary with \app{file}]
$ file myapp
myapp: ELF 32-bit LSB MIPS-I executable, MIPS, version 1 (SYSV), dynamically
linked (uses shared libs), not stripped