What's new

amcfwm - AsusWRT-Merlin Custom Firmware Manager

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

The build log should give you a good idea why it failed;

Code:
cat $HOME/amcfwm/rt-ac86u-output.txt
I followed the steps on Fresh Ubuntu install :( Usually I build manually and it works.
 
where are there stored cflags for the build ? cant find them
 
What an unexpected early Easter egg you laid into the basket. Much appreciated, thanks @Adamm .
Is there a way to build against one's own fork of Asuswrt-Merlin, the variable $REMOTEFWVER seems to do that, right?
 
--> UPDATE - I see that the script by default tries to connect to the router and deliver the firmware to a target location. I changed the settings to disable that temporarily. All is well.

Yes as per the original script. This also doesn't necessarily have to be your router, I for instance connect to my NAS and store the images there.

where are there stored cflags for the build ? cant find them

All the firmware files are stored in "$HOME/amng" as per a regular build setup.

Is there a way to build against one's own fork of Asuswrt-Merlin, the variable $REMOTEFWVER seems to do that, right?

For now you can just replace the $HOME/amng folder with your own forks, although amcfwm will (incorrectly) detect an update and attempt a build every time its run as its comparing against Merlins branch. I will make this customisable in a future update.
 
Is there a way to build against one's own fork of Asuswrt-Merlin, the variable $REMOTEFWVER seems to do that, right?
For now you can just replace the $HOME/amng folder with your own forks, although amcfwm will (incorrectly) detect an update and attempt a build every time its run as its comparing against Merlins branch. I will make this customisable in a future update.

This should now be dynamic, so all you need to do now is just either replace the $HOME/amng folder completely with your fork or change the "source location" value.
 
Last edited:
Simply superb @Adamm - many thanks. Brings together a lot of bitty guides splattered about and mostly out of date.
My first compile with your setup worked flawlessly for RT-AC86U :D.
 
Thanks for sharing @Adamm. I had been using your previous script to make my firmware builds, and it worked just fine.

While most should just get the builds from the official sources, it is nice to be able to build your own and validate what is actually run, unlike some other projects.

The code is quite large. I am curious how hard it would be to attempt a GPL merge.
 
The code is quite large. I am curious how hard it would be to attempt a GPL merge.

That depends on how skilled you are, if you have no prior experience with C and ASUSWRT code base then you shouldn't even attempt it.
 
@Adamm seems on a clean machine, after setup it never pulls down the amng.ax88 folder.

During the build process the amng folder is rsync’d to all the individual model folders
 
During the build process the amng folder is rsync’d to all the individual model folders

Sorry, I thought I had attached a screenshot, but didn't. It doesn't seem to work. Get an error that the folder doesn't exist.

upload_2020-4-11_20-22-29.png


-- edit --

I think I need to do force build the first time to make it get past the FW version change check the first time.

-- edit --
Yup, that did it, it built just fine. Seems the folder is assumed to exist, but force build and clean make it get created.
 

Attachments

  • upload_2020-4-11_20-21-31.png
    upload_2020-4-11_20-21-31.png
    90.3 KB · Views: 187
Last edited:
Sorry, I thought I had attached a screenshot, but didn't. It doesn't seem to work. Get an error that the folder doesn't exist.

View attachment 22566

-- edit --

I think I need to do force build the first time to make it get past the FW version change check the first time.

-- edit --
Yup, that did it, it built just fine. Seems the folder is assumed to exist, but force build and clean make it get created.

Your signature doesn't include your router model [or anything for that matter ;)] ... so which model were you building for? I had no issues after clean install to build RT-AC86U.
 
Your signature doesn't include your router model [or anything for that matter ;)] ... so which model were you building for? I had no issues after clean install to build RT-AC86U.

Gotcha @juched - had same error when trying to run build for my AC5300 after successful build for AC86U.
 
Sorry, I thought I had attached a screenshot, but didn't. It doesn't seem to work. Get an error that the folder doesn't exist.

View attachment 22566

-- edit --

I think I need to do force build the first time to make it get past the FW version change check the first time.

-- edit --
Yup, that did it, it built just fine. Seems the folder is assumed to exist, but force build and clean make it get created.
Gotcha @juched - had same error when trying to run build for my AC5300 after successful build for AC86U.

Small oversight in the changes last night, fixed in the latest update.
 
Install trashes ssh access. looks like it changes the port to "harden" the ssh server. Not good...
 
Install trashes ssh access. looks like it changes the port to "harden" the ssh server. Not good...

Whats not good about running SSH on a non standard port? This script was designed around fresh Ubuntu installs and it informs the user of the new port.
 
amcfwm

AsusWRT-Merlin - Custom Firmware Manager

Inspired By @RMerlin Original Script


Features
  • Can configure default Ubuntu 18.04 VM
  • Interactive menu
  • Configurable settings
  • No hard-coded settings/variables
  • Daily build cronjob if git changes detected
  • POSIX compliance

89aSCSN.png

U0iTesC.png

qWznMh8.png



Installation

This script is hosted on GitHub, you can follow the most recent changes here.

1. Download amcfwm
Code:
mkdir -p "$HOME/amcfwm" && curl -s "https://raw.githubusercontent.com/Adamm00/am_cfwm/master/amcfwm.sh" -o "$HOME/amcfwm/amcfwm.sh" && chmod 755 "$HOME/amcfwm/amcfwm.sh"

2. Setup VM Enviorment
Code:
sh $HOME/amcfwm/amcfwm.sh install

3. Setup Firmware/Toolchain Git Repo
Code:
sh $HOME/amcfwm/amcfwm.sh repo


Ubuntu 18.04.4 LTS Download Links

ISO - http://releases.ubuntu.com/18.04.4/ubuntu-18.04.4-desktop-amd64.iso
Torrent - http://releases.ubuntu.com/18.04/ubuntu-18.04.4-desktop-amd64.iso.torrent


Usage

amcfwm provides both a user interactive menu, and command line interface for those who prefer it.

Menu
To open the menu its as simple as typing;

Code:
amcfwm

CLI
Code:
( amcfwm install ) Setup VM Enviorment For Compiling
( amcfwm repo ) Setup Firmware/Toolchain Git Repos

( amcfwm build ) Build Configured Firmware Images If Updates Available

( amcfwm settings srcloc /path/to/location ) Change Location Of The Original Source Code
( amcfwm settings stageloc /path/to/location ) Change Location Of Built Images
( amcfwm settings finalloc admin@router.asus.com:/mnt/sda1/Share ) Change Remote Location To SCP Compiled Firmware Images
( amcfwm settings sshport 22 ) Change Remote Location SSH Port

( amcfwm settings buildrev enable|disable ) Enable/Disable Git Revision In Firmware Name
( amcfwm settings rsynctree enable|disable ) Enable/Disable Rsync Tree From Central Source Tree Before Build
( amcfwm settings cleanuptree enable|disable ) Enable/Disable Make Clean Before Build
( amcfwm settings forcebuild enable|disable ) Enable/Disable Force Building Firmware Images If No Updates Detected
( amcfwm settings buildcron enable|disable ) Enable/Disable Daily Build Cronjob

( amcfwm settings transferzip enable|disable ) Enable/Disable Transferring Of .zip Files
( amcfwm settings transfertrx enable|disable ) Enable/Disable Transferring Of .trx Files
( amcfwm settings transferw enable|disable ) Enable/Disable Transferring Of .w Files
( amcfwm settings transfertxt enable|disable ) Enable/Disable Transferring Of .txt Files

( amcfwm settings bac56 enable|disable ) Enable/Disable Building Of AC56U Image
( amcfwm settings bac68 enable|disable ) Enable/Disable Building Of AC68U Image
( amcfwm settings bac87 enable|disable ) Enable/Disable Building Of AC87U Image
( amcfwm settings bac3200 enable|disable ) Enable/Disable Building Of AC3200 Image
( amcfwm settings bac88 enable|disable ) Enable/Disable Building Of AC88U Image
( amcfwm settings bac3100 enable|disable ) Enable/Disable Building Of AC3100 Image
( amcfwm settings bac5300 enable|disable ) Enable/Disable Building Of AC5300 Ima
( amcfwm settings bac86 enable|disable ) Enable/Disable Building Of AC86U Image
( amcfwm settings bax88 enable|disable ) Enable/Disable Building Of AX88U Image
( amcfwm settings bax58 enable|disable ) Enable/Disable Building Of AX58U Image

( amcfwm settings reset ) Reset All Settings To Default

( amcfwm cleanup ) Remove Inactive Build Directories

( amcfwm update ) Standard Update Check - If Nothing Detected Exit
( amcfwm update check ) Check For Updates Only - Wont Update If Detected
( amcfwm update -f ) Force Update Even If No Changes Detected

( amcfwm uninstall ) Uninstall AMCFWM


Donate

This script will always be open source and free to use, but if you want to support future development you can do so by Donating With PayPal.



Note: Support will only be provided for questions relating to this script, not general VM/Linux questions. If you are unfamiliar with working in a Linux environment this script probably isn't aimed at you.
:eek::eek::eek::eek::eek::D:D:D:D:D:D:mad::mad::mad::mad::mad::mad:
The looks on ones face when one realizes this all could have been done by an automated script.....:cool::cool::cool:

Thanks @Adamm

you have brilliantly saved Asuswrt-merlin users one hell of a compile time because doing this manually is not for the faint of heart.

I have my own manually configured environment setup on 18.04.2.

I wonder how much different it is on 18.04.4
 
Whats not good about running SSH on a non standard port? This script was designed around fresh Ubuntu installs and it informs the user of the new port.
Changing the port is overkill.
Running on a full Bionic Desktop is a bit much as well. Much easier to set up a minimal server (https://help.ubuntu.com/community/Installation/MinimalCD)on a VM or spare PC. When prompted I just add OpenSSH server to the basic package. Very minimal... Oh yes, I did have to add curl to run the Adamm compile install script which added the rest of the required packages. As I do updates and installs from Putty or ssh client on another PC changing the port on the compile machine really bothers me.
 
Changing the port is overkill.

I think there's a pretty good consensus that leaving SSH ports default and having password based logins are a bad idea, but to each their own. I've specifically made it so the port will only be changed if left default.

Running on a full Bionic Desktop is a bit much as well. Much easier to set up a minimal server (https://help.ubuntu.com/community/Installation/MinimalCD)on a VM or spare PC.

The recommendation for Ubuntu desktop was mostly for support reasons, someone more unfamiliar with Linux will have an easier time in a Desktop environment. This isn't enforced so users are free to use either flavour.
 

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