assarbad / build-asuswrt-merlin

Helpers to build RMerl/asuswrt-merlin without much extra typing
The Unlicense
43 stars 19 forks source link

Toolchain of ARM routers not made available the correct way #5

Closed LeeWiu closed 9 years ago

LeeWiu commented 9 years ago
Linux ubuntu 3.13.0-45-generic #74-Ubuntu SMP Tue Jan 13 19:36:28 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

I added manually

sudo ln -s /home/thx/test/asuswrt-merlin/tools/brcm /opt/brcm
sudo ln -s /home/thx/test/asuswrt-merlin/release/src-rt-6.x.4708/toolchains/hndtools-arm-linux-2.6.36-uclibc-4.5.3 /opt/brcm-arm

And started compiling, will report if finishing successfully

assarbad commented 9 years ago

Thanks, seems to affect all ARM router models.

$ grep ARM target.mak
# Broadcom ARM platform
export RT-AC68U_BASE := IPV6SUPP=y HTTPS=y ARM=y BCM57=y AUTODICT=y BBEXTRAS=y USBEXTRAS=y EBTABLES=y \
export RT-AC56U := IPV6SUPP=y HTTPS=y ARM=y BCM57=y AUTODICT=y BBEXTRAS=y USBEXTRAS=y EBTABLES=y \
export RT-AC87U := IPV6SUPP=y HTTPS=y ARM=y BCM57=y AUTODICT=y BBEXTRAS=y USBEXTRAS=y EBTABLES=y WPS_DUALBAND=y ROG=y \

$ find . -type f -name '*-gcc'
./release/src-rt-6.x.4708/toolchains/hndtools-armeabi-2011.09/bin/arm-none-eabi-gcc
./release/src-rt-6.x.4708/toolchains/hndtools-arm-linux-2.6.36-uclibc-4.5.3/bin/arm-brcm-linux-uclibcgnueabi-gcc
./release/src-rt-6.x.4708/toolchains/hndtools-arm-linux-2.6.36-uclibc-4.5.3/bin/arm-linux-gcc
./tools/brcm/K26/hndtools-mipsel-linux-uclibc-4.2.3/bin/mipsel-linux-uclibc-gcc

None of the paths to the tool chain appear to be hardcoded, though - which is good.

assarbad commented 9 years ago

Actually no ... a little bit of it is more or less hardcoded ...

$ grep -R hndtools-arm-linux * 2>/dev/null|grep -v ^Binary
platform.mak:export TOOLS := $(SRCBASE)/toolchains/hndtools-arm-linux-2.6.36-uclibc-4.5.3
router/Makefile:export LD_LIBRARY_PATH := $(SRCBASE)/toolchains/hndtools-arm-linux-2.6.36-uclibc-4.5.3/lib
router/Makefile:        LD_LIBRARY_PATH="$(SRCBASE)/toolchains/hndtools-arm-linux-2.6.36-uclibc-4.5.3/lib" \

Need to figure out where $(SRCBASE) comes into the picture.

assarbad commented 9 years ago

This should be fixed as of 05e69fb9e093c8a085bd57486ff22e6300871584