jorsborn DD-WRT Novice
Joined: 19 Nov 2013 Posts: 2
|
Posted: Wed Nov 20, 2013 1:11 Post subject: Cross Compiler Problems |
|
I posted this earlier today in the Broadcom chip specific forum not realizing there was a developer forum for which this question is better suited... apologies.
I am running dd-wrt.v24-14929_NEWD-2_K2.6_big.bin on a Asus RT-N16. I believe this to be the proper binary based on the RT-N16 wiki and other forum posts. Things are great, however, there are a few additions I'd like to make and so it was necessary to learn to cross compile. The first addition was to compile FTDI serial support for this router.
So, for starters I downloaded the kernel from dd-wrt (Using /brcm/linux.v24)...
Code: |
svn co -r 14929 svn://svn.dd-wrt.com/DD-WRT/
|
I then got the toolchain from...
Code: |
ftp://dd-wrt.com/others/sourcecode/toolchains/current-toolchains.tar.bz2
|
I modified my PATH variable to point to the binaries in my selected toolchain....
Code: |
toolchain-mipsel_4.1.1_BRCM24
|
This appeared to be the closest match to me given the output of /proc/cpuinfo.
Then, I ran a make config and added in USB serial (FTDI) support. Running make modules it builds with no errors and I find a 'ftdi_sio.o' module in my /drivers/usb/serial/ directory.
However, moving this to the router and attempting to install the mod with insmod results in nothing. There is no feedback on the terminal and it's not listed after when using lsmod.
Since this didn't work I attempted to use the toolchain to produce a simple hello world application. This also doesn't run. There is no output (error or otherwise). Finally I compiled the same hello world source on the router and it runs just fine.
So, a hello world application compiled on the router runs but the same application cross compiled does nothing. Running a file on both binaries yields the same output:
Code: |
test: ELF 32-bit LSB executable, MIPS, MIPS32 version 1 (SYSV), dynamically linked (uses shared libs), not stripped
|
Doing a hexdump of both shows that they are definitely not the same.
I suspected that I am simply using the wrong toolchain. I tried the older version (toolchain-mipsel_3.3.6_BRCM24). The result was the same for the ftdi module but the cross compiled hello world seems to work with it.
Any suggestions? |
|