Asus gt-ac5300 gpl source Compilation

stevef9432203

Regular Contributor
Have any of the local Uber-Geeks managed to get the gt-ac5300 source code to compile???? So far all efforts on my part
have failed badly. The cross toolchain directories appear totally absent. Sigh. I want add a few service feature(s)
but till I can build the damn image am in Snafu mode.
 

sfx2000

Part of the Furniture
Review RMerlin's git-hub...

The toolchain and paths are a bit odd, but they work for the most part - never played with gt-ac5300, and it's a bit of an odd duck in any event.
 

stevef9432203

Regular Contributor
Review RMerlin's git-hub...

The toolchain and paths are a bit odd, but they work for the most part - never played with gt-ac5300, and it's a bit of an odd duck in any event.
Very Nice in some ways, but opt ware or entware seem to be not useable

Sent from my SAMSUNG-SM-T677A using Tapatalk
 

stevef9432203

Regular Contributor
Very Nice in some ways, but opt ware or entware seem to be not useable

Sent from my SAMSUNG-SM-T677A using Tapatalk
Anybody been able to build any of the GPL gt-ac5300 source builds. Has been damn frustrating. Building Merlin code works, ac5300 is ok. GT seems basically broken.

Sent from my SAMSUNG-SM-T677A using Tapatalk
 

Odkrys

Senior Member
Digital Ocean Ubuntu 16.04.4 64bit.

dpkg --add-architecture i386

apt-get update

apt-get install libncurses5 libncurses5-dev m4 bison gawk flex \
g++-4.7 g++ gengetopt git gitk zlib1g-dev autoconf autopoint \
libtool shtool autogen mtd-utils intltool sharutils libstdc++5 texinfo \
dos2unix xsltproc u-boot-tools device-tree-compiler python qemu \
gperf liblzo2-dev uuid-dev build-essential lzma-dev liblzma-dev \
lzma binutils-dev patch cmake intltool libglib2.0-dev gtk-doc-tools \
libc6-i386 lib32stdc++6 lib32z1 libelf1:i386 libncurses5:i386 libc6-dev-i386 \
bc libtool-bin gnulib xutils-dev libltdl-dev unzip


useradd -d /USER -m -s /bin/bash USER
passwd USER

nano /etc/sudoers

-------------------------------------------------
# Allow members of group sudo to execute any command

%sudo ALL=(ALL:ALL) ALL

USER ALL=(ALL) ALL
-------------------------------------------------

chmod u-w /etc/sudoers


su - USER

wget http://dlcdnet.asus.com/pub/ASUS/wireless/GT-AC5300/GPL_GT_AC5300_300438420648.zip
unzip GPL_GT_AC5300_300438420648.zip
tar -xvzf GPL_GT-AC5300_3.0.0.4.384.20648-g21e3702.tgz

cd
git clone https://github.com/RMerl/am-toolchains.git

sudo dpkg-reconfigure dash
-> No

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

cd ~/asuswrt/release/src-rt-5.02hnd
make gt-ac5300
 

Emanuele_Bro

New Around Here
Hi to all, i'm also interested to compile sources of the ASUS rog gt-ac5300, i'm trying to compile with the procedure listed above and I will reply after I reach the firmware compiled; I would know how is possible, after a proper compiled firmware without any errors, that the router doesn't allow you to flash this new firmware. What kind of message does it return to you?
I would know if i flash a corrupted firmware and I would brik the router if there is a safe recovery procedure to flash again a stock firmware and recover the router from the briked state( how can I get into recovery state(TFTP) on this router?).
Thanks for the answers, cheers Emanuele
 
Last edited:

RMerlin

Asuswrt-Merlin dev
Recovery mode is identical to other Asus routers - press Reset while turning the router on. Test the procedure before proceeding to firmware flashing just to ensure you can properly enter recovery mode.

Also for extra safety, use the _ubi.w firmware image, not the cfe_ubi.w image. I'm not 100% sure if the cferom version will overwrite the bootloaders, or only some of its default values.
 

Emanuele_Bro

New Around Here
Thank you you thousands for the answer i followed so much of your discussions in also other forums you are a guru of crosscompiling :) I would love to add some features to the last firmware and preserve the lovely interface of the rog rapture gt-ac5300...i want to use fq_codel instead sfq as qdisc in the qos script but when I try to attach any fq_codel queue on the root parent htb I always get a an error RTNETLINK no such file or directory and with the modprobe I didn't find that module so I have to install it but I really don' know how cause it is the first time I work on arm crosscompiling, how did you solve the prblem of fq codel in asus Merlin? Thank you in advice:)
 

stevef9432203

Regular Contributor
Recovery mode is identical to other Asus routers - press Reset while turning the router on. Test the procedure before proceeding to firmware flashing just to ensure you can properly enter recovery mode.

Also for extra safety, use the _ubi.w firmware image, not the cfe_ubi.w image. I'm not 100% sure if the cferom version will overwrite the bootloaders, or only some of its default values.

Well so far I and another gentleman have finally managed to get clean builds of the of the gt-ac5300 rom images. Names match, but the image built by the make file is about 12Mb shorter than the image file on the factory Asus Web page. Sigh. Rom uploader just hangs. His VM of Ubuntu builds in about 6 hrs, mine 7.5 minutes. At a loss here. Any suggestions welcome.
 

RMerlin

Asuswrt-Merlin dev
Well so far I and another gentleman have finally managed to get clean builds of the of the gt-ac5300 rom images. Names match, but the image built by the make file is about 12Mb shorter than the image file on the factory Asus Web page. Sigh. Rom uploader just hangs. His VM of Ubuntu builds in about 6 hrs, mine 7.5 minutes. At a loss here. Any suggestions welcome.

No idea, since I've never tried to build the GT-AC5300 GPL.

Building the closest firmware (RT-AC86U) takes me a bit over 20 minutes on my VM running on an i7 7700K.
 

stevef9432203

Regular Contributor
Digital Ocean Ubuntu 16.04.4 64bit.

dpkg --add-architecture i386

apt-get update

apt-get install libncurses5 libncurses5-dev m4 bison gawk flex \
g++-4.7 g++ gengetopt git gitk zlib1g-dev autoconf autopoint \
libtool shtool autogen mtd-utils intltool sharutils libstdc++5 texinfo \
dos2unix xsltproc u-boot-tools device-tree-compiler python qemu \
gperf liblzo2-dev uuid-dev build-essential lzma-dev liblzma-dev \
lzma binutils-dev patch cmake intltool libglib2.0-dev gtk-doc-tools \
libc6-i386 lib32stdc++6 lib32z1 libelf1:i386 libncurses5:i386 libc6-dev-i386 \
bc libtool-bin gnulib xutils-dev libltdl-dev unzip


useradd -d /USER -m -s /bin/bash USER
passwd USER

nano /etc/sudoers

-------------------------------------------------
# Allow members of group sudo to execute any command

%sudo ALL=(ALL:ALL) ALL

USER ALL=(ALL) ALL
-------------------------------------------------

chmod u-w /etc/sudoers


su - USER

wget http://dlcdnet.asus.com/pub/ASUS/wireless/GT-AC5300/GPL_GT_AC5300_300438420648.zip
unzip GPL_GT_AC5300_300438420648.zip
tar -xvzf GPL_GT-AC5300_3.0.0.4.384.20648-g21e3702.tgz

cd
git clone https://github.com/RMerl/am-toolchains.git

sudo dpkg-reconfigure dash
-> No

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

cd ~/asuswrt/release/src-rt-5.02hnd
make gt-ac5300

Have you managed to load a gt -ac5300 image file you've built? No Joy here. Builds OK on two different VM machines, but image file about 12 MB TOO SHORT
 

Odkrys

Senior Member
https://github.com/odkrys/rt-ac86u_et

GT-AC5300 & RT-AC86U stock firmware + entware, some scripts, and ipset, nano, lsof

I didn't test all the features since I am not gt-ac5300 owner.
I made this for my needs in the future so it won't be released with new gpl.
Please modify the patch file and use it.

Q. Is this version works with aimesh ?
A. No idea. Now I only have one rt-ac86u.

Here are compilation steps.
ubuntu 16.04

dpkg --add-architecture i386

apt-get update

apt-get install libncurses5 libncurses5-dev m4 bison gawk flex \
g++-4.7 g++ gengetopt git gitk zlib1g-dev autoconf autopoint \
libtool shtool autogen mtd-utils intltool sharutils libstdc++5 texinfo \
dos2unix xsltproc u-boot-tools device-tree-compiler python qemu \
gperf liblzo2-dev uuid-dev build-essential lzma-dev liblzma-dev \
lzma binutils-dev patch cmake intltool libglib2.0-dev gtk-doc-tools \
libc6-i386 lib32stdc++6 lib32z1 libelf1:i386 libncurses5:i386 libc6-dev-i386 \
bc libtool-bin gnulib xutils-dev libltdl-dev unzip

useradd -d /USERNAME -m -s /bin/bash USERNAME
passwd USERNAME

nano /etc/sudoers

-------------------------------------------------
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
USERNAME ALL=(ALL) ALL
-------------------------------------------------

chmod u-w /etc/sudoers

su - USERNAME

sudo dpkg-reconfigure dash
-> No

cd
git clone https://github.com/RMerl/am-toolchains.git

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

[RT-AC86U]

wget https://dlcdnets.asus.com/pub/ASUS/wireless/RT-AC86U/GPL_RT_AC86U_300438432797.zip
unzip GPL_RT_AC86U_300438432797.zip
tar -xjf GPL_RT-AC86U_3.0.0.4.384.32797-g907bbdf.tar.bz2

cd ~/asuswrt
patch -p1 --dry-run < 32797-et.patch

patch -p1 < 32797-et.patch

[GT-AC5300]

wget https://dlcdnets.asus.com/pub/ASUS/wireless/GT-AC5300/GPL_GT_AC5300_300438432738.zip
unzip GPL_GT_AC5300_300438432738.zip
tar -xzf GPL_GT-AC5300_3.0.0.4.384.32738-gc9a116a.tgz

cd ~/asuswrt
patch -p1 --dry-run < 32738-et.patch

patch -p1 < 32738-et.patch


cd ~/asuswrt/release/src/router

svn checkout https://github.com/RMerl/asuswrt-merlin.ng/trunk/release/src/router/ipset_arm \
https://github.com/RMerl/asuswrt-merlin.ng/trunk/release/src/router/nano \
https://github.com/RMerl/asuswrt-merlin.ng/trunk/release/src/router/libmnl \
https://github.com/RMerl/asuswrt-merlin.ng/trunk/release/src/router/libnfnetlink

cd ~/asuswrt/release/src-rt-5.02hnd
make rt-ac86u or gt-ac5300
 

RMerlin

Asuswrt-Merlin dev
GT-AC5300 & RT-AC86U stock firmware + entware, some scripts, and ipset, nano, lsof

The GT-AC5300 build won't work properly. The binary blobs for httpd/shared/rc are different for each model, you need to use the binary blobs for the exact model you are compiling for.
 

Latest threads

Sign Up For SNBForums Daily Digest

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