OpenWrt Forum Archive

Topic: TL-WR741ND V2 USB mod patch problems

The content of this topic has been archived on 6 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Iā€™m trying to make a USB mod for TL-WR741ND V2. I have soldered wires to the two pins to the AR7240 (53 and 54) for the usb support (100% tested ā€“ soldered perfect). Both line have pull down resistors to GND. I use voltage regulator 7805 to provide 5V to the port.
Here come the problem. How to patch the kernel to support usb? I have added the needed packages kmod-usb-storage and so on. I tried to compile Attitude Adjustment from source but it gives an error (ERROR 2 ā€“ V=s).  I can compile Barrier Breaker (trunk) from source but the patch from the Wiki is not for this version. I know how to setup Buildroot and select which packages to be compiled into the build. Please help me compile Barrier Breaker  or Attitude Adjustment with USB support for TL-WR741ND v2.


Here is the steps I use to build AA

svn co svn://svn.openwrt.org/openwrt/branches/attitude_adjustment AA
cd AA
./scripts/feeds update -a
./scripts/feeds install -a
make defconfig
make prereq
make menuconfig
+Added the patch from Wiki.
make -j 4 V=s 2>&1 | tee build.log | grep -i error

Here is the error (last lines of build.log - V=s)

[ 97%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestSVN.cxx.o
[ 97%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestBZR.cxx.o
[ 98%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestGIT.cxx.o
[ 98%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestHG.cxx.o
Linking CXX static library libCTestLib.a
make[6]: Leaving directory `/home/mexus/openwrt/Attitude_Adjustment/build_dir/host/cmake-2.8.12'
[ 98%] Built target CTestLib
make[6]: Entering directory `/home/mexus/openwrt/Attitude_Adjustment/build_dir/host/cmake-2.8.12'
Scanning dependencies of target ctest
make[6]: Leaving directory `/home/mexus/openwrt/Attitude_Adjustment/build_dir/host/cmake-2.8.12'
make[6]: Entering directory `/home/mexus/openwrt/Attitude_Adjustment/build_dir/host/cmake-2.8.12'
[ 99%] Building CXX object Source/CMakeFiles/ctest.dir/ctest.cxx.o
Linking CXX executable ../bin/ctest
make[6]: Leaving directory `/home/mexus/openwrt/Attitude_Adjustment/build_dir/host/cmake-2.8.12'
[ 99%] Built target ctest
make[6]: Entering directory `/home/mexus/openwrt/Attitude_Adjustment/build_dir/host/cmake-2.8.12'
Scanning dependencies of target documentation
make[6]: Leaving directory `/home/mexus/openwrt/Attitude_Adjustment/build_dir/host/cmake-2.8.12'
make[6]: Entering directory `/home/mexus/openwrt/Attitude_Adjustment/build_dir/host/cmake-2.8.12'
[ 99%] [ 99%] [ 99%] [100%] Generating ../Docs/cpack.txt
Generating ../Docs/ctest.txt
Generating ../Docs/ccmake.txt
Generating ../Docs/cmake.txt
make[6]: Leaving directory `/home/mexus/openwrt/Attitude_Adjustment/build_dir/host/cmake-2.8.12'
[100%] Built target documentation
make[5]: Leaving directory `/home/mexus/openwrt/Attitude_Adjustment/build_dir/host/cmake-2.8.12'
make[4]: Leaving directory `/home/mexus/openwrt/Attitude_Adjustment/build_dir/host/cmake-2.8.12'
touch /home/mexus/openwrt/Attitude_Adjustment/build_dir/host/cmake-2.8.12/.built
make[3]: Leaving directory `/home/mexus/openwrt/Attitude_Adjustment/tools/cmake'
make[2]: Leaving directory `/home/mexus/openwrt/Attitude_Adjustment'
make[1]: *** [/home/mexus/openwrt/Attitude_Adjustment/staging_dir/target-mips_r2_uClibc-0.9.33.2/stamp/.tools_install_nnnnn] Error 2
make[1]: Leaving directory `/home/mexus/openwrt/Attitude_Adjustment'
make: *** [world] Error 2

For Barrier Breaker I:

svn co svn://svn.openwrt.org/openwrt/trunk/ trunk
cd trunk
./scripts/feeds update -a
./scripts/feeds install -a
make defconfig
make prereq
make menuconfig

I edited:
target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr741nd.c - Adding: #include "dev-usb.h" After: #include "dev-leds-gpio.h"  ; Added: ath79_register_usb();   After: u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);  .
I don't know where to edit Kconfig. I think patch should be added to target/linux/ar71xx/patches-3.10/610-MIPS-ath79-openwrt-machines.patch.  Editing the second file make uncompilable, not sure if it's a bug in the source, because I updated from svn/git before compiling. I'll try again soon.

(Last edited by mexus on 3 Mar 2014, 21:34)

I managed to get it working, instructions added to the wiki

The discussion might have continued from here.