What's new

Build for RT-AX68U

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

rkboni

Occasional Visitor
Hi, all!

Despite the frequent sentiment of "nobody but RMerlin builds this anymore", I have to say that overall the experience of building the image from source was incredibly easy. Having beaten my head against DD-WRT builds a few years ago, I have to say this is so much better organized & documented! And it _almost_ build.

For the RT-AX68U build, the build fails trying to build wget like so:

Code:
make -C wget -j2
make[5]: Entering directory '/home/ubuntu/amng-build/release/src/router/wget'
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /home/ubuntu/amng-build/release/src/router/wget/build-aux/missing aclocal-1.16 -I m4
/home/ubuntu/amng-build/release/src/router/wget/build-aux/missing: line 81: aclocal-1.16: command not found
WARNING: 'aclocal-1.16' is missing on your system.
         You should only need it if you modified 'acinclude.m4' or
         'configure.ac' or m4 files included by 'configure.ac'.
         The 'aclocal' program is part of the GNU Automake package:
         <https://www.gnu.org/software/automake>
         It also requires GNU Autoconf, GNU m4 and Perl in order to run:
         <https://www.gnu.org/software/autoconf>
         <https://www.gnu.org/software/m4/>
         <https://www.perl.org/>
Makefile:1692: recipe for target 'aclocal.m4' failed
make[5]: *** [aclocal.m4] Error 127
make[5]: Leaving directory '/home/ubuntu/amng-build/release/src/router/wget'
Makefile:7192: recipe for target 'wget' failed
make[4]: *** [wget] Error 2
make[4]: Leaving directory '/home/ubuntu/amng-build/release/src/router'
Makefile:31: recipe for target 'router_all' failed
make[3]: *** [router_all] Error 2

From what I can tell from the other config files, wget is not one of the tools that needs to be built for the ax68u, so I hacked it out of the top-level router Makefile like so:
Code:
diff --git a/release/src/router/Makefile b/release/src/router/Makefile
index b16fe46af5..04cdce9401 100644
--- a/release/src/router/Makefile
+++ b/release/src/router/Makefile
@@ -1345,7 +1345,7 @@ obj-$(RTCONFIG_L2TP) += rp-l2tp
 obj-$(RTCONFIG_PPTP) += accel-pptp
 obj-$(RTCONFIG_EAPOL) += wpa_supplicant
 obj-$(RTCONFIG_HTTPS) += openssl
-obj-$(RTCONFIG_HTTPS) += wget
+#obj-$(RTCONFIG_HTTPS) += wget
 obj-$(RTCONFIG_HTTPS) += zlib
 obj-$(RTCONFIG_HTTPS) += curl
 obj-$(RTCONFIG_SSH) += dropbear

Clearly this should probably be conditional on the same settings that disable wget in the config as well, but I'm not yet familiar enough with the code to connect the dots.

FWIW, I saw this both on master and on the 386.4 branch.

Lastly, I'm not sure why it took me so long to find ASUSWRT... it's nice to have the configurability of DD-WRT with the support of the manufacturer!

Cheers!
 
The firmware requires wget for things like checking for firmware updates, and I believe Trend Micro signature downloads as well. amtm and entware possibly also require it. It's not optional for Asuswrt-Merlin.

Code:
merlin@ubuntu-dev:~$ dpkg -S /usr/bin/aclocal-1.16 
automake: /usr/bin/aclocal-1.16

You are missing a required automake package. The package list on the Wiki is fully accurate, I actually followed it a few days ago when testing a brand new WSL2 environment. Everything build on the first attempt.

 
Hi RMerlin,

Thanks for the reply... I built with a new VM using the instructions here: https://github.com/RMerl/asuswrt-merlin.ng/wiki/Compile-Firmware-from-source (ie, using a fresh Ubuntu 18.04 LTS VM). If I take a look at the "apt-get install" command lines in both of those pages, they end up installing the same tools (the one on the page I referenced has some duplicates, but once adjusted for that, is the same as the one in the WLS2 instructions you referenced).

Does wget need to have "-j2" removed? This smells like classic "generated files older than autoconf sources", and parallel builds are certainly one way to tickle that fairly frequently.

Also, AFAICT neither your WLS2 instructions not the ones I used install "aclocal" of any version.
--rafal
 
While you're here, I may as well ask the follow-up question. The reason I thought wget was unnecessary was the following bit of config output in the build log. For my edification, is this unrelated to the rest of the build?

Code:
scripts/kconfig/conf -o Config.in
networking/Config.in:139:warning: 'select' used by config symbol 'FEATURE_WGET_HTTPS' refer to undefined symbol 'TLS'
.config:766:warning: trying to assign nonexistent symbol FEATURE_WGET_SSL_HELPER
#
# using defaults found in .config
#
*
* Busybox Configuration
*
*
....
*
* Networking Utilities
*
nameif (NAMEIF) [N/y/?] n
nbd-client (NBDCLIENT) [N/y/?] n
nc (NC) [Y/n/?] y
  Netcat server options (-l) (NC_SERVER) [N/y/?] n
  Netcat extensions (-eiw and -f FILE) (NC_EXTRA) [Y/n/?] y
  Netcat 1.10 compatibility (+2.5k) (NC_110_COMPAT) [N/y/?] n
ping (PING) [Y/n/?] y
  ping6 (PING6) [Y/n/?] y
  Enable fancy ping output (FEATURE_FANCY_PING) [Y/n/?] y
wget (38 kb) (WGET) [N/y/?] n
...
 
Also, AFAICT neither your WLS2 instructions not the ones I used install "aclocal" of any version.
Sure it does, see my previous post. This is part of the automake package.

Thanks for the reply... I built with a new VM using the instructions here: https://github.com/RMerl/asuswrt-merlin.ng/wiki/Compile-Firmware-from-source (ie, using a fresh Ubuntu 18.04 LTS VM). If I take a look at the "apt-get install" command lines in both of those pages, they end up installing the same tools (the one on the page I referenced has some duplicates, but once adjusted for that, is the same as the one in the WLS2 instructions you referenced).
The WSL2 instructions target Ubuntu 20.04, and it lists an additional package needed by that version.

For my edification, is this unrelated to the rest of the build?

Asuswrt-Merlin uses the full wget package rather than the busybox applet. You are simply seeing leftovers from the original Broadcom SDK.
 
Sure it does, see my previous post. This is part of the automake package.

Oops, I did miss that. Thanks, and sorry for the cursory read. But let me follow up, below...

The WSL2 instructions target Ubuntu 20.04, and it lists an additional package needed by that version.

Are the multipass instructions incorrect in recommending Ubuntu 18.04? I'm happy to rebuild the image with 20.04 or install a newer automake on the existing 18.04 image, but if your official build env is 20.04, maybe the multipass instructions should be updated to match (or at least note they may only apply to older versions of the firmware if that's the reason for 18.04 there) and I shouldn't bother patching my current env if it will only bite me again ;)

There's also https://github.com/RMerl/asuswrt-me...ource-using-a-Debian-based-Linux-Distribution (out of date) and https://github.com/RMerl/asuswrt-merlin.ng/wiki/Compile-Firmware-from-source-using-Linux-Mint (at least as out of date as the latter)... I used https://github.com/RMerl/asuswrt-merlin.ng/wiki/Compile-Firmware-from-source because it seemed the most general (ie, not targeted at some specific Linux distribution), and I was happy to build the environment from scratch since this was my first spin on the ASUSWRT dev carousel.

Asuswrt-Merlin uses the full wget package rather than the busybox applet. You are simply seeing leftovers from the original Broadcom SDK.

Ah, that makes sense, thanks!
--rafal
 
...and one more question, while I'm here:

My build generated a RT-AX68U_386.4_0_cferom_pureubi.w image of size 90439700 vs. 90701844 for your build; is that expected, or would you expect that the image should be the same size whether it's built by you or anyone else? (also, is the RT-AX68U_386.4_0_pureubi.w -- w/out the "_cferom" in the middle -- of any use in the general case?)

Thanks again!
 
Are the multipass instructions incorrect in recommending Ubuntu 18.04?
Never heard of Multipass, so no idea what that is.
maybe the multipass instructions should be updated to match
I didn't write that page. This is a wiki, so it's up to the community to maintain it.

My build generated a RT-AX68U_386.4_0_cferom_pureubi.w image of size 90439700 vs. 90701844 for your build; is that expected, or would you expect that the image should be the same size whether it's built by you or anyone else?
The images won't match. We have different paths, different build dates and build environments, etc... The resulting content will be different, and that will also affect the image compression.
 
Never heard of Multipass, so no idea what that is.

That's fine. The question is if anything should be recommending building using Ubuntu 18.04 or if that's always going to lag and be a waste of time and it should be changed to recommend 20.04. I'm happy to update the Wiki if that's the way to go & it works (after I try it out, obvs)

I didn't write that page. This is a wiki, so it's up to the community to maintain it.

You're right re: that page but you've edited many of the other compiling pages which are still way out of date so I assumed you have some control/input/direction over the wiki content in general.

The images won't match. We have different paths, different build dates and build environments, etc... The resulting content will be different, and that will also affect the image compression.

I understand not matching, but differences in size of megabytes seem suspicious, no? Do the builds the community does not include the restricted bits (TrendMicro, etc)?

Thanks!
 
That's fine. The question is if anything should be recommending building using Ubuntu 18.04 or if that's always going to lag and be a waste of time and it should be changed to recommend 20.04. I'm happy to update the Wiki if that's the way to go & it works (after I try it out, obvs)
Both should be fine. I use 20.04 mostly because I go with the latest LTS release.

I understand not matching, but differences in size of megabytes seem suspicious, no? Do the builds the community does not include the restricted bits (TrendMicro, etc)?
The only thing missing at the moment from community builds is a few very small files related to the Trend Micro engine (and that is something I have recently discussed with Asus to have that resolved in a future update). Nothing that large however.
 
[EDITED: feex typoes]

Both should be fine. I use 20.04 mostly because I go with the latest LTS release.

Yeah, 18.04LTS does not appear to have a automake-1.16 package available w/out adding non-standard repos or building from source. I did build a 20.04LTS VM and it successfully built a Merlin install image the first time out of the box as you said. I think I'll spend some time on the Wiki updating things to recommend 20.04 and possibly breaking out the "how to set up a VM" (WLS, Multipass, ....) from the "how to configure and build once you have a Linux system set up", so that e.g. the build instructions that are almost the same in the WLS & Multipass pages can all go into one common page. I'll also update the other pages for 5+ year old OS versions to note that they're likely obsolete. Please let me know if doing so would cross over some line, as I am still a newb to this community even if I've battled other custom router builds for fun and better functionality for a while.

The only thing missing at the moment from community builds is a few very small files related to the Trend Micro engine (and that is something I have recently discussed with Asus to have that resolved in a future update). Nothing that large however.

Another reason to recommend 20.04 -- once I switched, the built image (at least for RT-AX68U) comes out to exactly the same size as your official image.

Thanks for your help getting to the bottom of this... and my compliments on how nicely this all comes together, something that's rare in the embedded router space.

Cheers,
--rafal
 
Last edited:
Please let me know if doing so would cross over some line, as I am still a newb to this community even if I've battled other custom router builds for fun and better functionality for a while.
Go ahead. I suspect the people who created each of these individual build pages rarely kept them up to date. There are probably too many different "how to build" guides anyway.

The WSL2 page is the only one that I wrote myself (as I was doing performance tests with WSL2 at the time, and WSL2 required a few tweaks to be usable for firmware building), you can reuse the package list for any other guide that's based on 20.04 LTS.
 
and my compliments on how nicely this all comes together, something that's rare in the embedded router space.
The community has been surprisingly active at building and maintaining the Wiki compared to many other projects. I only did a handful of pages myself, and someone took the time to create pages from the original README that used to contain the official documentation. I only had to flesh these outs a bit afterward.
 
Go ahead. I suspect the people who created each of these individual build pages rarely kept them up to date. There are probably too many different "how to build" guides anyway.
+100 to that!

The WSL2 page is the only one that I wrote myself (as I was doing performance tests with WSL2 at the time, and WSL2 required a few tweaks to be usable for firmware building), you can reuse the package list for any other guide that's based on 20.04 LTS.
That's the plan... Thanks!
 
Any plans for reproducible builds?
If you mean binary identical images, that is technically impossible. Even the kernel image will be different as it gets a build time datestamp.
 
Sorry it took so long, but I finally got around to doing the cleanup on the various "Build from source" pages in the Wiki. Hopefully the next person to look at them will be able to build everything right out of the box!
 
[EDITED: feex typoes]



Yeah, 18.04LTS does not appear to have a automake-1.16 package available w/out adding non-standard repos or building from source. I did build a 20.04LTS VM and it successfully built a Merlin install image the first time out of the box as you said. I think I'll spend some time on the Wiki updating things to recommend 20.04 and possibly breaking out the "how to set up a VM" (WLS, Multipass, ....) from the "how to configure and build once you have a Linux system set up", so that e.g. the build instructions that are almost the same in the WLS & Multipass pages can all go into one common page. I'll also update the other pages for 5+ year old OS versions to note that they're likely obsolete. Please let me know if doing so would cross over some line, as I am still a newb to this community even if I've battled other custom router builds for fun and better functionality for a while.



Another reason to recommend 20.04 -- once I switched, the built image (at least for RT-AX68U) comes out to exactly the same size as your official image.

Thanks for your help getting to the bottom of this... and my compliments on how nicely this all comes together, something that's rare in the embedded router space.

Cheers,
--rafal
Hello rkboni , I get same problem in ubuntu 18.04 . Then I try compile it in 20.04 ,But still failed . I used this page https://github.com/RMerl/asuswrt-merlin.ng/wiki/Compile-Firmware-from-source

You mentioned successful build for ubuntu 20.04.Can you tell me how it's done ?
 

Similar 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