What's new

Compiling firmware from sources

  • 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!

I finally managed to find the problem with chrome console

I added BETA1-thx to SerialNo= in version.config
From now I will replace (Merlin build) with (thx build) and should be ok.
Thanks again

That's why I don't put "26b" in the version string - you can't use letters in there.
 
Back in business :)

1z6ds2x.png
 
RMerlin, what branch are you supporting now? You've updated dropbear in 354, but not in 364. Maybe the branch 364 is not supposed to be maintained for now?
 
RMerlin, what branch are you supporting now? You've updated dropbear in 354, but not in 364. Maybe the branch 364 is not supposed to be maintained for now?

The master is always the only one fully supported as the "main" one. Any branch is either temporary (pending merging into master as I work on something), or an experiment that might or might not be merged. 364 is just an experiment, where I only merged other patches because I needed to test them under 364.

That's one difference in Git versus traditional cvs such as SVN: while in SVN you might branch off from master to prepare a release,, in Git you usually branch off for development that is intended to be eventually merged back in master. Releases are based off master, not off a branch. Slightly different workflow.
 
Last edited:
Oh, sorry for bothering you. Now I got it. 364 is for DSL-N55U, not for RT routers:D
 
Oh, sorry for bothering you. Now I got it. 364 is for DSL-N55U, not for RT routers:D

The firmware code itself is compatible. If I had a stable wireless driver to use with, I would have made a new release based on 364.

I might make one more try at reverting the SDK back to the older one, and see if I can things working under 364. So far I just haven't had much success.
 
[OFFTOPIC]It's a pity that Asus is totally unaware of that uClibc buildroot is not abandoned and its developers keep it up-to-date. Asus loves to use an extremely ancient software :([/OFFTOPIC]
 
Today I tried to compile the firmware but I get the following error:

make[4]: Entering directory `/home/thx/asuswrt-merlin/release/src-rt/linux/linux-2.6'
CHK include/linux/version.h
CHK include/linux/utsrelease.h
UPD include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-mips
CC arch/mips/kernel/asm-offsets.s
/bin/sh: 1: mipsel-linux-gcc: not found
make[5]: *** [arch/mips/kernel/asm-offsets.s] Error 127
make[4]: *** [prepare0] Error 2
make[4]: Leaving directory `/home/thx/asuswrt-merlin/release/src-rt/linux/linux-2.6'
make[3]: *** [kernel_header] Error 2
make[3]: Leaving directory `/home/thx/asuswrt-merlin/release/src/router'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/thx/asuswrt-merlin/release/src-rt-6.x'
make[1]: *** [bin] Error 2
make[1]: Leaving directory `/home/thx/asuswrt-merlin/release/src-rt-6.x'
make: *** [rt-ac66u] Error 2
 
Today I tried to compile the firmware but I get the following error:

/bin/sh: 1: mipsel-linux-gcc: not found

Code:
sudo ln -s …/asuswrt-merlin/tools/brcm /opt/brcm
export PATH=$PATH:/opt/brcm/hndtools-mipsel-linux/bin:/opt/brcm/hndtools-mipsel-uclibc/bin
 
:) Got it:
Code:
unlink /opt/brcm
and again
Code:
sudo ln -s /home/thx/asuswrt-merlin/tools/brcm /opt/brcm
 
And again I have a question :)
Does BCM4706 support MIPS32 Rev.2? AFAIK MIPS32 74K chips implement MIPS32 Rev.2, so BCM4706 is very likely to support it. But Asus compiles the router firmware in -mips32 mode, not -mips32r2 mode. Maybe BCM4706 is some kind of odd chip and doesn't support Rev.2 instructions, or Asus's toolchain produces bad -mips32r2 code, or maybe there is another reason not to use -mips32r2 ?
RMerlin, can you comment this situation, please?
 
And again I have a question :)
Does BCM4706 support MIPS32 Rev.2? AFAIK MIPS32 74K chips implement MIPS32 Rev.2, so BCM4706 is very likely to support it. But Asus compiles the router firmware in -mips32 mode, not -mips32r2 mode. Maybe BCM4706 is some kind of odd chip and doesn't support Rev.2 instructions, or Asus's toolchain produces bad -mips32r2 code, or maybe there is another reason not to use -mips32r2 ?
RMerlin, can you comment this situation, please?

Not a clue. I don't know anything about MIPS architecture, so I just let the toolchain spit out the binaries as Asus had it setup.
 
RMerlin, I have a curiosity question.

Why do your binary blobs differ from ASUS's ones (in comparison with RT-AC66U 372.1300)? For instance:
release\src\router\wps\prebuilt\wps_monitor: your=396079 bytes, ASUS=363996 bytes;
release\src\router\libbcm\prebuild\libbcm.so: your=7554, ASUS=7423;
and so on.
 
RMerlin, I have a curiosity question.

Why do your binary blobs differ from ASUS's ones (in comparison with RT-AC66U 372.1300)? For instance:
release\src\router\wps\prebuilt\wps_monitor: your=396079 bytes, ASUS=363996 bytes;
release\src\router\libbcm\prebuild\libbcm.so: your=7554, ASUS=7423;
and so on.

Because mine didn't come from that specific compiled firmware. Mine came from either the 1363/1393 GPL, or from the N66U compiled firmware. So, there might be some minor differences.
 
RMerlin, what do options AUTODICT and GRO do, and why are they disabled for N66U and AC66U?
 
RMerlin, what do options AUTODICT and GRO do, and why are they disabled for N66U and AC66U?

GRO is Generic Receive Offload. It's a kernel option that allows to optimize the way the network driver handles traffic. Unfortunately it's completely broken in the kernel used by the N66/AC66, and will lead to random kernel panics, so it's kept disabled.

It had a (different) issue on AC56 (which uses a different kernel), but Asus were able to fix it with a kernel patch, so it's kept enabled for that model.

One interesting thing to note is that GRO had almost no effect on performance on the N66/AC66 (unless it was so badly broken that it didn't work at all), but on the RT-AC56U it bumps SMB performance from 35 MB/s to 50 MB/s.


AUTODICT handles the way the httpd daemon handles the language files. I didn't look at the details as to what it actually did, but one of the things that AUTODICT does in addition to how the language dictionnaries are handled is optimize the html files by removing all comments and white spaces from it. In the past Asus had only used it with models that had less flash space, but they seem to also be using it for the AC56 by default. I'm not sure of all the benefits AUTODICT might bring, but one of the side-effect is, since all HTML files are pre-processed, it makes it harder for someone to dynamically replace one of the HTML files using a binding mount.

This is a feature I need to spend some time studying in the future.
 
RMerlin, thank you for your so detailed explanation. That helped me very much. Now I know that it's better to leave them disabled. :)
 
Hi, RMerlin! I'm here to bug you again.
I noticed a totally noncritical bug: Traffic monitor fails to detect wired traffic correctly. When I copy a huge file from a computer connected to LAN to a computer connected to Wireless 2.4 it shows that Wireless 2.4 recieves a large amount of data, that is correct, but Wired tab shows no activity at all. All the data comes surprisingly from the Internet. So, Traffic monitor seems to treat the wired traffic as the Internet traffic. At least at my side :)
 
Error building from latest sources:
dropbear
make[4]: Entering directory `/home/thx/asuswrt-merlin/release/src/router/dropbear'
mipsel-uclibc-gcc -ffunction-sections -fdata-sections -Wl,--gc-sections -o dropbearmulti dbmulti.o -lcrypt atomicio.o bignum.o buffer.o circbuffer.o cli-agentfwd.o cli-auth.o cli-authinteract.o cli-authpasswd.o cli-authpubkey.o cli-channel.o cli-chansession.o cli-kex.o cli-main.o cli-runopts.o cli-session.o cli-tcpfwd.o common-algo.o common-channel.o common-chansession.o common-kex.o common-runopts.o common-session.o compat.o dbutil.o dropbearkey.o dss.o fake-rfc2553.o gendss.o genrsa.o list.o listener.o loginrec.o packet.o process-packet.o progressmeter.o queue.o random.o rsa.o scp.o scpmisc.o signkey.o sshpty.o svr-agentfwd.o svr-auth.o svr-authpam.o svr-authpasswd.o svr-authpubkey.o svr-authpubkeyoptions.o svr-chansession.o svr-kex.o svr-main.o svr-runopts.o svr-service.o svr-session.o svr-tcpfwd.o svr-x11fwd.o tcp-accept.o termcodes.o -lcrypt libtomcrypt/libtomcrypt.a libtommath/libtommath.a -lutil
scp.o: In function `sink':
scp.c:(.text.sink+0x76c): warning: the use of LEGACY `utimes' is discouraged, use `utime'
rm -f dropbear
ln -s dropbearmulti dropbear
rm -f dbclient
ln -s dropbearmulti dbclient
rm -f dropbearkey
ln -s dropbearmulti dropbearkey
rm -f scp
ln -s dropbearmulti scp
make[4]: Leaving directory `/home/thx/asuswrt-merlin/release/src/router/dropbear'
make[4]: Entering directory `/home/thx/asuswrt-merlin/release/src/router/lzo'
make all-am
make[5]: Entering directory `/home/thx/asuswrt-merlin/release/src/router/lzo'
make[5]: Leaving directory `/home/thx/asuswrt-merlin/release/src/router/lzo'
make[4]: Leaving directory `/home/thx/asuswrt-merlin/release/src/router/lzo'
cd openvpn && CFLAGS="-O3 -Wall -DLINUX26 -DCONFIG_BCMWL5 -DDEBUG_NOISY -DDEBUG_RCTEST -pipe -DBCMWPA2 -funit-at-a-time -Wno-pointer-sign -mtune=mips32 -mips32 -DRTCONFIG_NVRAM_64K -DLINUX_KERNEL_VERSION=132630 -ffunction-sections -fdata-sections" \
LDFLAGS="-L/home/thx/asuswrt-merlin/release/src-rt-6.x/router/openssl -L/home/thx/asuswrt-merlin/release/src-rt-6.x/router/lzo/src/.libs -ffunction-sections -fdata-sections -Wl,--gc-sections" \
CPPFLAGS="-I/home/thx/asuswrt-merlin/release/src-rt-6.x/router/lzo/include -I/home/thx/asuswrt-merlin/release/src-rt-6.x/router/openssl/include -L/home/thx/asuswrt-merlin/release/src-rt-6.x/router/lzo -L/home/thx/asuswrt-merlin/release/src-rt-6.x/router/openssl -L/home/thx/asuswrt-merlin/release/src-rt-6.x/router/lzo/src/.libs" \
IPROUTE="/usr/sbin/ip" \
OPENSSL_CRYPTO_LIBS="-lcrypto" \
./configure --host=mipsel-linux --build=i686-linux-gnu --prefix= \
--disable-debug --disable-plugins --enable-management --enable-small \
--disable-selinux --disable-socks --enable-password-save \
ac_cv_lib_resolv_gethostbyname=no
/bin/sh: 1: ./configure: not found
make[3]: *** [openvpn/stamp-h1] Error 127
make[3]: Leaving directory `/home/thx/asuswrt-merlin/release/src/router'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/thx/asuswrt-merlin/release/src-rt-6.x'
make[1]: *** [bin] Error 2
make[1]: Leaving directory `/home/thx/asuswrt-merlin/release/src-rt-6.x'
make: *** [rt-ac66u] Error 2
root@ubuntu:/home/thx/asuswrt-merlin/release/src-rt-6.x#
 

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