Hi, i would like to add support for this device.
Can somebody confirm that hw is supported?
Hi, i would like to add support for this device.
I just bought this device and was confused with HW version - got v2 instead of v1.
So I am also interested in having OpenWrt on this device installed.
Don't seem anyone is working on supporting v2 for now.
Still no news about progress on v2 ?
The original ASUS firmware for the device is open source and is based on some earlier version of OpenWrt. So I guess it must be supported. However, there's a comment about another router with the same CPU at Asus RT-AC58U V2 support coming? - #3 by tmomas that says
SoC = QCN5502 -> currently unsupported by OpenWrt
My understanding is that this hardware is not supported by existing OpenWrt images, but we can add support by looking at ASUS firmware (I may be wrong).
I've recently managed to (almost) build ASUS firmware from source. It was confusing since they sell basically the same devices under different model names.
There is one linker error in the code. Also, their Makefiles make use of git so you have to initialize the repository and do at least one commit and also create a tag/branch with a specific name to be able to run make without editing Makefiles. I am going to document this for future reference at some point. Next, we need to learn how they add support for the new SoC.
Please reach out to me if you have experience with this sort of thing and would like to help.
Building original ASUS firmware
Below I document the process of building the original ASUS images for RT-AC57U v2, RT-AC58U v2, RT-AC59U. All three router models use the same firmware.
Note about version control
ASUS makefiles use git to choose version suffixes for built images. But the .git repository is not included in the sources, so you will need to create a repository, make a commit and add a tag that is expected by makefiles.
Download source code, install packages and toolchain
Download source code.
Go to https://www.asus.com/Networking-IoT-Servers/WiFi-Routers/ASUS-WiFi-Routers/RT-AC59U/
Navigate to Support->Driver&Utility. Under Driver & Tools, select "Other" as OS. You will be able to download firmware images and source code there.
Extract the zip file. It contains another archive in tgz format. Extract it as well.
Install the packages listed in asuswrt/README.TXT. DO NOT follow other instructions in that file. It is outdated and confusing! Go there only if my instructions fail. I will narrow the list down in the future. I will not be surprised if most of it is not necessary.
Extract asuswrt/tools/openwrt-gcc463.mips.mesh.tar.bz2 to /opt:
cd /opt && sudo tar xf /path/to/extracted/sources/asuswrt/tools/openwrt-gcc463.mips.mesh.tar.bz2 && cd -
You should have the following dir: /opt/openwrt-gcc463.mips.mesh/bin
Prepare the environment and build
cd asuswrt/release/ git init git add * git config user.email "firstname.lastname@example.org" git config user.name "Your Name" git commit -m "Initial commit" git tag asuswrt_126.96.36.199.382 cd src-qca/ export PATH="/opt/openwrt-gcc463.mips.mesh/bin:$PATH" sed -i 's/^YYLTYPE yylloc;/extern YYLTYPE yylloc;/' linux/linux-3.3.x.mesh/scripts/dtc/dtc-lexer.lex.c make RT-AC59U ls image/
Builds successfully on Debian 10.
Takes 35-40 minutes on my laptop (4 threads, 5th generation Intel i3, 5400 RPM hard drive).
Tried the following sources:
- GPL_RT_AC57U_V2_300438251832.zip / GPL_RT-AC59U_188.8.131.52.382.51832-gf068aa7.tgz
- GPL_RT_AC59U_300438252274.zip / GPL_RT-AC59U_184.108.40.206.382.52274-gd0587b6.tgz
Note on reproducibility
You cannot reproduce the original firmware exactly. I found differences in many bytes, but haven't identified the reason for this. I will try to compare the filesystems inside the image and will report if they're the same or not.
I am currently working on comparing ASUS sources to original kernel sources and taking only those patches that are required to run linux kernel on this SoC. Once I have that, I am going to port the patches to mainline kernel.
Anything new on supporting the
Hi. I currently have a conflict of interest with my current employer (who holds copyrights to everything I do as per my employment agreement). This issue wasn't apparent at first because I failed to convey the exact nature of my work here. I am working towards resolving this issue. Once resolved, I will be able to continue work. I assure you that I will not abandon this effort
Hi everyone! I am happy to announce that I have resigned from my job and so there's nothing stopping me from doing this work anymore. Also, I will make sure my future contracts can't restrict my contributions to free software.
Since this forum doesn't allow a single person to post many consecutive messages, I will have to edit the last message when I post updates.
Hey bro. I have Asus rt-ac1300gp_v3 router which is also qcn5502 based. If you don't mind, I could join your work. Msg me, my email: email@example.com.
A have a "Asus RT-AC57U V2".
I would like to use it by OpenWRT firmware.
So I'm joining the club.
According the othether forum thread (Add support for Asus RT-AC57U_V2). I collected device data.
admin@RT-AC57U_V2:/tmp/home/root# cat /proc/cpuinfo system type : Qualcomm Atheros QCA5502 ver 1 rev 0 machine : ASUS RT-AC59U processor : 0 cpu model : MIPS 74Kc V5.0 BogoMIPS : 385.84 wait instruction : yes microsecond timers : yes tlb_entries : 32 extra interrupt vector : yes hardware watchpoint : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb] isa : mips1 mips2 mips32r1 mips32r2 ASEs implemented : mips16 dsp dsp2 shadow register sets : 1 kscratch registers : 0 package : 0 core : 0 VCED exceptions : not available VCEI exceptions : not available
admin@RT-AC57U_V2:/tmp/home/root# uname -a Linux RT-AC57U_V2 4.4.60 #1 Wed Jan 6 15:07:10 CST 2021 mips GNU/Linux
Comparing with the other forum thread (Add support for Asus RT-AC57U_V2) cpu is sligtly different.
"Qualcomm Atheros QCA5502 rev 0" VS "Qualcomm Atheros QCA5502 ver 1 rev 0"
Sligtly different capabilities:
isa : mips1 mips2 mips32r1 mips32r2
ASEs implemented : mips16 dsp dsp2
ASEs implemented : mips16 dsp
I think it is not a big deal, and the two device is identical.
I upgraded to the newest Asus firmware (220.127.116.11.382_52482), what use 4.4.60 kernel.
Thanks for your research. Didn't know they updated the kernel. It would have been nice if they also published the sources for it. The latest source release as of now is 18.104.22.168.382.52274 which is based on kernel 3.3.8 (according to top-level kernel Makefile). Any chance you remember what version of the kernel was reported by
uname in previous firmware releases? I would like to make sure they didn't just leave the old version numbers.
"Any chance you remember what version of the kernel was reported by uname in previous firmware releases?"
When I updated firmware have not interested in openWRT router firmware. So I did not use ssh.
I would not downgrade firmware, because I use the router.
Older firmwares can be downloaded here:
I'm a beginer in that field, so my next idea may be strange.
The openwrt-19-07-8 relase (OpenWrt 19.07.8 service release) use Linux kernel 4.14.241.
The newest Asus firmware use 4.4.60 kernel. Without kernel building, could we make openwrt-19-07-8 firmware image?
Or simpli we install openwrt by ssh?
No. Please read the following information from the wiki.
tl;dr: In order to install an OS on a device you need to patch the kernel so that it has all the drivers required to boot and run the OS on this specific device. Neither the mainline linux kernel nor OpenWrt project have patches for the hardware used on this device.
Our work therefore looks like this:
- Figure out which parts of code provided by ASUS are needed for this particular SoC;
- Port these patches to mainline kernel;
- Backport them to current kernel version used by OpenWrt if needed;
- Build OpenWrt image with patches from (3) and test it;
- Submit (2) and (3) to the community and work towards having them integrated into mainline.
First I search for leds.
The router has 9 leds:
5 Ghz Wifi
GPIO directory there is 9 files.
export gpio1 gpio15 gpio16 gpio17 gpio4 gpio5 gpiochip0 unexport
It may be coincidence, but I dont think so.
admin@RT-AC57U_V2:/tmp/home/root# cd /sys/class/gpio admin@RT-AC57U_V2:/sys/class/gpio# cat ./gpio1/value 1 admin@RT-AC57U_V2:/sys/class/gpio# cat ./gpio15/value 0 admin@RT-AC57U_V2:/sys/class/gpio# cat ./gpio17/value 1 admin@RT-AC57U_V2:/sys/class/gpio# cat ./gpio4/value 1 admin@RT-AC57U_V2:/sys/class/gpio# cat ./gpio5/value 0 admin@RT-AC57U_V2:/sys/class/gpio#
I created an basic OpenWRT Device Page for router:
I still would be happy if we doen not need to create new platform.
It is hard.
The ath79 platform conatains NETGEAR EX7300.
NETGEAR EX7300 uses Qualcomm Atheros QCN5502 cpu.
I think our plarform will be ath79 too.
I downloaded the source. https://dlcdnets.asus.com/pub/ASUS/wireless/RT-AC57U_V2/GPL_RT_AC57U_V2_300438252107.zip
It contains a file README.TXT. It is build manual for different routers, but it not contains RT-AC57U_V2, nor Qualcomm Atheros QCA5502.
A bit confusing.