Compiling
From OpenTViX
Things you may want to when compiling your applications
For the arm tvix 4000/5000/4100/5100
1. Install the OpenEM86XX toolchain
Debian / Ubuntu issues
On Ubuntu Linux (and possibly other Debian-based systems), attempting to run these tools under sudo (for example, in 'make install' steps) will fail with 'command not found', even when the above directory is in your path. This is because Debian's sudo package is compiled with the --with-secure-path option, which causes it to use a hard-coded path instead of your actual one.
The only known 'proper' fix is to recompile your own copy of sudo. As a workaround, you can add symlinks to the arm-uclinux tools to /usr/local/bin with this command:
sudo ln -s /usr/local/arm-uclinux-tools2/bin/arm-uclinux-elf-* /usr/local/bin/
2. After you've installed your toolchain and before you start compiling, you must first export the path to your toolchain's executables. Note that you will need to do this every time you start terminal/command prompt (unless you permanently add it to PATH).
export CC=arm-uclinux-elf-gcc export CFLAGS="-D__uClinux__ -mtune=arm7tdmi -O2" export LDFLAGS=-Wl,-elf2flt="-s262144"
3. When configuring use
./configure --host=arm-uclinux-elf
4. after make, compress your executable
flthdr -z <ARM executable>
For the mips tvix 6500/7000
1. Install the Lundman's toolchain optimised for opentvix by leader
2. After you've installed your toolchain and before you start compiling, you must first export the path to your toolchain's executables. Note that you will need to do this every time you start terminal/command prompt (unless you permanently add it to PATH).
declare -x ARCH="mips" declare -x CTARGET="mipsel-linux-uclibc" declare -x PATH="/usr/local/mips/bin:$PATH"