TP-Link Archer AX1500 - $70 802.11AX router support?

For no particular reason, I was curious to see how far I could keep running make before it I hit a dead end with the sources for the router

I downloaded the GPL sources folder from here: https://www.tp-link.com/uk/support/download/archer-ax10/v1/#GPL-Code

I'm running Ubuntu 20.04 LTS on an X86 Laptop.

Tried it initially with a Ubuntu VM on an Arm Mac and ran into an exec format errors with the cross compiler of course.

For every error I got with make I thought I'd just list what I did to resolve:

Ran make

Error 1: /bin/sh does not invoke bash shell

I use ohmyzsh as my shell so this seems have broken the script

Solution:

Specify bash location when running it

make SHELL=/bin/bash

Error 2: Could not retreive version from automake automake is likely not installed on your system

GNU Automake is a tool for automatically generating Makefile.in files compliant with the GNU Coding Standards. Automake requires the use of GNU Autoconf.

Solution

Install automake

sudo apt install automake

Error 3: Could not retreive version from libtoolize libtoolize is likely not installed on your system

"The libtoolize program provides a standard way to add libtool support to your package."

"GNU Libtool is a generic library support script that hides the complexity of using shared libraries behind a consistent, portable interface. "

Solution

Install libtoolize

sudo apt install libtool

Error 4: ERROR: lzo/lzo1x.h development library is required for build usually, this is provided by the liblzo2-dev library

LZO is a compression library

Solution

sudo apt install liblzo2-dev

Error 5: libuuid development library is required for build

The libuuid library is used to generate unique identifiers for objects that may be accessible beyond the local system. The Linux implementation was created to uniquely identify ext2 filesystems created by a machine. This library generates UUIDs compatible with those created by the Open Software Foundation (OSF) Distributed Computing Environment (DCE) utility uuidgen.

The UUIDs generated by this library can be reasonably expected to be unique within a system, and unique across all systems. They could be used, for instance, to generate unique HTTP cookies across multiple web servers without communication between the servers, and without fear of a name clash.

Solution

sudo apt-get install uuid-dev

Error 6: pkg-config zlib failed


Package zlib was not found in the pkg-config search path.

Perhaps you should add the directory containing `zlib.pc'

to the PKG_CONFIG_PATH environment variable

Package 'zlib', required by 'world', not found

Solution

I got lost here, specifing the system's path pkg config path didn't work as it gave an error at: ./ax10v1_GPL/bcm675x/bcm963xx_router/make.common on line 3397

I hopelessly googled zlib and found nothing except this page about building asus routers

https://github-wiki-see.page/m/RMerl/asuswrt-merlin.ng/wiki/Compile-Firmware-from-source

So I just instealled the list of packages they recommended:


sudo apt-get install libtool-bin cmake libproxy-dev uuid-dev liblzo2-dev autoconf automake bash bison \

bzip2 diffutils file flex m4 g++ gawk groff-base libncurses5-dev libtool libslang2 make patch perl pkg-config shtool \

subversion tar texinfo zlib1g zlib1g-dev git gettext libexpat1-dev libssl-dev cvs gperf unzip \

python libxml-parser-perl gcc-multilib gconf-editor libxml2-dev g++-multilib gitk libncurses5 mtd-utils \

libncurses5-dev libvorbis-dev git autopoint autogen automake-1.15 sed build-essential intltool libglib2.0-dev \

xutils-dev lib32z1-dev lib32stdc++6 xsltproc gtk-doc-tools libelf1:i386

And it started compiling!

Error 7: Error: Unable to access jarfile /home/jonathan/tplink/ax10v1_GPL/bcm675x/bcm963xx_router/hostTools/yuicompressor/yuicompressor-2.4.8.jar

The build ended in an error so I ran it again outputting the logs to a file with this command:


make SHELL=/bin/bash 2>&1 | tee buildlog.log

And that file didn't exist in the folder

I found the github for it:

So I went into the hostTools folder:


mkdir yuicompressor

wget https://github.com/yui/yuicompressor/releases/download/v2.4.8/yuicompressor-2.4.8.jar

Error 8: configure: error: OpenSSL libcrypto not found

So I think it might be a better idea to use Ubuntu 18.04 LTS instead to build

Because it requires libssl1.0-dev which has been removed in 20.04

Someone made a PPA with it packaged for 20.04 so I dubiously installed it

However I think this is where I call it quits haha

I still get this error:


configure: error: OpenSSL libcrypto not found
make[4]: *** [Makefile:56: objs/arm/config_complete] Error 1
make[4]: Leaving directory '/home/jonathan/tplink/ax10v1_GPL/bcm675x/bcm963xx_router/userspace/gpl/apps/strongswan'
make[3]: *** [makefile.modsw.autogen:1005: gpl/apps/strongswan] Error 2

I found that this also gets generated:
bcm675x/bcm963xx_router/userspace/gpl/apps/strongswan/objs/arm/config.log

And I see errors like:

configure:8108: /home/jonathan/tplink/ax10v1_GPL/Iplatform/build/../../bcm675x/toolchain/opt/toolchains/crosstools-arm-gcc-5.5-linux-4.1-glibc-2.26-binutils-2.28.1/usr/bin/arm-buildroot-linux-gnueabi-gcc -V >&5
arm-buildroot-linux-gnueabi-gcc.br_real: error: unrecognized command line option '-V'
arm-buildroot-linux-gnueabi-gcc.br_real: fatal error: no input files

Also this:

arm-buildroot-linux-gnueabi-gcc: WARNING: unsafe header/library path used in cross-compilation: '-L/lib'
/home/jonathan/tplink/ax10v1_GPL/bcm675x/toolchain/opt/toolchains/crosstools-arm-gcc-5.5-linux-4.1-glibc-2.26-binutils-2.28.1/bin/../lib/gcc/arm-buildroot-linux-gnueabi/5.5.0/../../../../arm-buildroot-linux-gnueabi/bin/ld: warning: library search path "/lib" is unsafe for cross-compilation
/lib/libgcc_s.so.1: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status

The strongswan config log:

The build log:

Maybe if someone else was curious to build this further, they could try an older version of ubuntu?
Perhaps 16.04 since it seems like 2017 is mentioned a lot

Though perhaps these are the missing files that you need to actually compile it?

WARNING: could not find ../../bcmdrivers/broadcom/char/archer/bcm963178/.archer_dep.o.cmd for ../../bcmdrivers/broadcom/char/archer/bcm963178/archer_dep.o
WARNING: could not find ../../bcmdrivers/broadcom/char/bcmlibs/bcm963178/.bcmlibs_dep.o.cmd for ../../bcmdrivers/broadcom/char/bcmlibs/bcm963178/bcmlibs_dep.o
WARNING: could not find ../../bcmdrivers/broadcom/char/cmdlist/bcm963178/.cmdlist_dep.o.cmd for ../../bcmdrivers/broadcom/char/cmdlist/bcm963178/cmdlist_dep.o
WARNING: could not find ../../bcmdrivers/broadcom/char/ingqos/bcm963178/.bcm_ingqos_dep.o.cmd for ../../bcmdrivers/broadcom/char/ingqos/bcm963178/bcm_ingqos_dep.o
WARNING: could not find ../../bcmdrivers/broadcom/char/pktflow/bcm963178/.pktflow_dep.o.cmd for ../../bcmdrivers/broadcom/char/pktflow/bcm963178/pktflow_dep.o
WARNING: could not find ../../bcmdrivers/broadcom/char/tms/bcm963178/.nciTMSkmod_dep.o.cmd for ../../bcmdrivers/broadcom/char/tms/bcm963178/nciTMSkmod_dep.o
WARNING: could not find ../../bcmdrivers/broadcom/char/vlan/bcm963178/.bcmvlan_dep.o.cmd for ../../bcmdrivers/broadcom/char/vlan/bcm963178/bcmvlan_dep.o

@pedrolucasbp Good luck looking at it!

I was wondering if it would have been possible to modify the firmware to allow it to use higher wifi channels than 48, this seems way out of my skills.

2 Likes

Thanks for the list of recommended packages. After all I was able to build it myself.
I have used docker and ubuntu precise 12.04 and now it is done.
I have published my work on github
But now I don't know what to do with this. How to compile final .bin package and install it on the router. I have found /Iplatform/openwrt/scripts/brcmImage.pl which is likely does what I am thinking of but I am not pretty sure about it. But it generated me a 31M file that sounds bcm863xx_fs_kernel :slight_smile: (I used ./brcmImage.pl -k ../../../bcm675x/bcm963xx_router/targets/TP6750/vmlinux -r ../../../bcm675x/bcm963xx_router/targets/TP6750/rootfs.img command while staying at /Iplatform/openwrt/scripts/. )

Also I'm scared of installing anything on my router because it sounds like an easy way to buy a new one with openwrt support.

Don't worry, just do it :slight_smile:
Jokes aside vendor SDKs are not supported around here...aka you're on your own.
You need to buy yourself a supported device.

2 Likes


got a telnet root on this device

2 Likes

Hello!
Yes, we with @gmaxus were able to root the router. I have prepared the detailed guide about it in my github repo: https://github.com/Waujito/TPLlAX1500GPL

Also with the GPL code it is possible to build custom programs and even kernel modules for the device. For ease of use, I added GPL auto build via github actions to the repo.

1 Like