Adding OpenWrt support for Asus RT-AC57U v2

Hi. I have got RT-AC57U v2. What can I do to learn about its internals without opening the case? I wish to contribute, but I don't want to void my right to return it in 2 weeks in case this revision cannot be supported by OpenWRT.
EDIT:
If it is possible for OpenWrt to support this device, then I will keep it and help with testing. In this case I will be more than willing to open the case or do anything that might help as long as it doesn't brick the router.

There's a wikidevi entry in the meantime. You'll need to get a shell afaik, dmesg output and flash layout for someone willing to add initial support. When you have that you could ask on IRC as well if someone can help adding support.

Is there a tutorial I can follow to get this info? I'm very comfortable with Linux and terminal / shell, but I never had to deal with getting information and logs from a router.

Sure, there's instructions in the wiki.

1 Like

Hi @sed
I just got a v2 too and would love for it to be supported by OpenWRT, but don't have any experience in adding device support.
Message me if i can help.

Has anyone started to work on the V2 ? I just got one and would like to help.

@yeste At least, no one told here that he did.
I tried reading wiki about adding support, but it is too technical for me.

Hi, i would like to add support for this device.
Can somebody confirm that hw is supported?

Hello All.
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 ?

Some useful information was provided in another thread by @dipol0: Add support for Asus RT-AC57U_V2

1 Like

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).

1 Like

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.

1 Like
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 "you@example.com"
git config user.name "Your Name"
git commit -m "Initial commit"
git tag asuswrt_3.0.0.4.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_3.0.0.4.382.51832-gf068aa7.tgz
  • GPL_RT_AC59U_300438252274.zip / GPL_RT-AC59U_3.0.0.4.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.

2 Likes

Anything new on supporting the QCN5502 SoC?

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 :slight_smile:

2 Likes

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.
Stay tuned!

2 Likes

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: merlin.ua.1@gmail.com.

A have a "Asus RT-AC57U V2".
I would like to use it by OpenWRT firmware.
So I'm joining the club. :slight_smile:

According the othether forum thread (Add support for Asus RT-AC57U_V2). I collected device data.