Debian multi-arch

This is the AC3200 running Asus-Merlin.

$ sudo dpkg --add-architecture armel
$ sudo apt-get update
$ inst crossbuild-essential-armel

Try building a hello world program:

$ arm-linux-gnueabi-gcc -o hello hello.c
$ file hello
hello: ELF 32-bit LSB pie executable ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=c0a6f1e6a507d14337f1594657f795971706ef39, not stripped

Try it on the router:

$ ./hello
-sh: ./hello: not found

Damn! Back to the drawing board. Revert with:

$ purge crossbuild-essential-armel
$ sudo apt-get autoremove
$ sudo dpkg --remove-architecture armel

By hand

Get kvic-z/brcm-arm-toolchains.

Build the hello world as:

$ LD_LIBRARY_PATH=/home/alok/src/brcm-arm-toolchains-master/hndtools-arm-linux-2.6.36-uclibc-4.5.3/lib \
    arm-brcm-linux-uclibcgnueabi-gcc -o hello hello.c

It does not understand the -L directive. An issue was filed.