What's new

Compiling and toolchain questions for RT-AX86U Pro

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

wifi_robot

New Around Here
Hi,
I am attempting to compile for an RT-AX86U Pro. I thought I had succeeded but then realized I had compiled for an RT-AX86U and attempting to install the firmware failed of course. Backtracking I verified that the pre-built RMerl firmware image for RT-AX86U Pro works great so I know that it can be built. I'm clearly doing it wrong.

Reading the docs (https://github.com/RMerl/asuswrt-merlin.ng/wiki/Compile-Firmware-from-source) there is no option mentioned for setting up the toolchain for RT-AX86U Pro, only the RT-AX86U. So I've taken an educated guess and come up with these options:


sudo ln -s ~/am-toolchains/brcm-arm-hnd /opt/toolchains
echo "export LD_LIBRARY_PATH=\$LD_LIBRARY:/opt/toolchains/crosstools-arm-gcc-5.5-linux-4.1-glibc-2.26-binutils-2.28.1/usr/lib" >> ~/.profile
echo "export TOOLCHAIN_BASE=/opt/toolchains" >> ~/.profile
echo "PATH=\$PATH:/opt/toolchains/crosstools-arm-gcc-5.5-linux-4.1-glibc-2.26-binutils-2.28.1/usr/bin" >> ~/.profile
echo "PATH=\$PATH:/opt/toolchains/crosstools-aarch64-gcc-5.5-linux-4.1-glibc-2.26-binutils-2.28.1/usr/bin" >> ~/.profile

cd ~/amng-build/release/src-rt-5.04axhnd.675x (what exactly is 5.04 and 675x referring to? I understand axhnd)
make rt-ax86u_pro

Things proceed as normal...and I should mention I have tried the Docker build environment, multi-pass and a plain Ubuntu 20.04 vm with similar results e.g. failed builds for the Pro.

CONFIGURED MODEL: RT-AX86U_PRO
SPECIFIED MODEL: RT-AX86U_PRO
DEFINED MODEL: RTAX86U_PRO
----------------------------------------------------------------------------
Clean old model configuration
Update model configuration

Copy router-sysdep.rt-ax86u_pro content
make bin

...<normal make output>

until here:
make[5]: Entering directory '/home/ubuntu/amng-build/release/src-rt-5.04axhnd.675x/kernel/linux-4.19'
scripts/kconfig/conf --olddefconfig Kconfig
/home/ubuntu/am-toolchains/brcm-arm-hnd/crosstools-aarch64-gcc-9.2-linux-4.19-glibc-2.30-binutils-2.32/bin/../libexec/gcc/aarch64-buildroot-linux-gnu/9.2.0/cc1: error while loading shared libraries: libisl.so.15: cannot open shared object file: No such file or directory

I'm hoping to get a clearer understanding of which toolchain and which release directory to use for building. The docs are great if the specific router is listed but I'm at a loss when the router is supported but no clear instruction exists in the docs to build the firmware. Any help/guidance would be appreciated and I suspect others would benefit too. Thanks all.
 
Looks like at least one problem was a missing LD_LIBRARY_PATH. Updated build .profile is

export LD_LIBRARY_PATH=$LD_LIBRARY:/opt/toolchains/crosstools-aarch64-gcc-9.2-linux-4.19-glibc-2.30-binutils-2.32/lib/:/opt/toolchains/crosstools-arm-gcc-5.5-linux-4.1-glibc-2.26-binutils-2.28.1/usr/lib
export TOOLCHAIN_BASE=/opt/toolchains
PATH=$PATH:/opt/toolchains/crosstools-arm-gcc-5.5-linux-4.1-glibc-2.26-binutils-2.28.1/usr/bin
PATH=$PATH:/opt/toolchains/crosstools-aarch64-gcc-5.5-linux-4.1-glibc-2.26-binutils-2.28.1/usr/bin

Notice the addition of the aarch64 libs
 
The RT-AX86U_PRO needs to be built from the 5.04 SDK folder.
 
Thank you.
Looking at the build folders the only one with 5.04 is listed as src-rt-5.04axhnd.675x. is that correct? If so that's the one I'm using and so far it looks to be building successfully with the above addition to the LD_LIBRARY_PATH

~/amng-build/release$ ls
image src-rt src-rt-5.02axhnd src-rt-5.02hnd src-rt-6.x.4708
src src-rt-5.02L.07p2axhnd src-rt-5.02axhnd.675x src-rt-5.04axhnd.675x src-rt-7.14.114.x
 
Got it.

This is what I ended up with:
-rw-rw-r-- 1 ubuntu ubuntu 62687360 Jan 11 00:09 RT-AX86U_PRO_3004_388.6_beta1_nand_squashfs.pkgtb

I will flash it tomorrow. Thanks again.
 
Got it.

This is what I ended up with:
-rw-rw-r-- 1 ubuntu ubuntu 62687360 Jan 11 00:09 RT-AX86U_PRO_3004_388.6_beta1_nand_squashfs.pkgtb

I will flash it tomorrow. Thanks again.

I have found this utility provided by @Adamm to be most useful - and works for my routers - including the RT-AX86U-PRO ...
https://www.snbforums.com/threads/amcfwm-asuswrt-merlin-custom-firmware-manager.63227/
https://github.com/Adamm00/amcfwm

I use VMWare Workstation Player 17.5 [free version] to create a VM running Ubuntu 20-04-5.
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top