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!

Adamm

Part of the Furniture
amcfwm

AsusWRT-Merlin - Custom Firmware Manager

Inspired By @RMerlins Original Script


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

Y7m5sLA.png

jfZA1zF.png

jpFzJlA.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 20.04.2 LTS Download Links

ISO - https://releases.ubuntu.com/20.04.2.0/ubuntu-20.04.2.0-desktop-amd64.iso
Torrent - https://releases.ubuntu.com/20.04/ubuntu-20.04.2.0-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 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 Image
( 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 bax56 enable|disable ) Enable/Disable Building Of AX56U Image
( amcfwm settings bax86 enable|disable ) Enable/Disable Building Of AX86U Image
( amcfwm settings bgtac2900 enable|disable ) Enable/Disable Building Of GT-AC2900 Image
( amcfwm settings bgtax11000 enable|disable ) Enable/Disable Building Of GT-AX11000 Image
( amcfwm settings bax68 enable|disable ) Enable/Disable Building Of AX68U Image

( amcfwm settings webhookurl www.google.com/webhookurl ) Enable/Disable Webhook Notifications

( 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/Compiling questions. If you are unfamiliar with working in a Linux environment this script probably isn't aimed at you.
 
Last edited:
Reserved
 
Reserved
 
Awesome! I’m looking forward to having something to play with this weekend!

Thank you [mention]Adamm [/mention] !


Sent from my iPhone using Tapatalk
 
You know someone will try to install this script on their router. :)

Very nice tool for those wanting to build their own. Thank you.
I was wondering if it would run on my overloaded/under-powered 68U. Then I decided against it.
 
Last edited:
You know someone will try to install this script on their router. :)

Good for the morning laugh: "Is there a lightweight version available for the router?" :oops:
 
Failed to build an image for 86u :( I did a clean install of ubuntu on VMWARE Player and setup everything according the menu ..


-- 05:52 - Global cleanup...
--- 05:52 - Preparing trees
*** 05:52 - Cleaning up rt-ac86u...
*** 05:52 - Updating rt-ac86u tree...
*** 05:53 - rt-ac86u code ready.
--- 05:53 - All trees ready!
--- 05:53 - Launching all builds
*** 05:53 - Starting building rt-ac86u...
--- 05:53 - All builds launched, please wait...
!!! 05:54 - rt-ac86u build failed!
=== 05:54 - All done!
 
Last edited:
Failed to build an image for 86u :( I did a clean install of ubuntu on VMWARE Player and setup everything according the menu ..


-- 05:52 - Global cleanup...
--- 05:52 - Preparing trees
*** 05:52 - Cleaning up rt-ac86u...
*** 05:52 - Updating rt-ac86u tree...
*** 05:53 - rt-ac86u code ready.
--- 05:53 - All trees ready!
--- 05:53 - Launching all builds
*** 05:53 - Starting building rt-ac86u...
--- 05:53 - All builds launched, please wait...
!!! 05:54 - rt-ac86u build failed!
=== 05:54 - All done!

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

Code:
cat $HOME/amcfwm/rt-ac86u-output.txt
 
Hey Adamm, just installed script on my AC86U and started building. All working good, but suddenly the router shut down and smoke started coming from behind.
How can I stop smoke? Maybe if I run
Code:
nvram set smoke=0
it will work? However how can I access ssh with router off?

Now seriously... Thank you so much for your work :) everyone says that is in war times that the greatest works comes up!
My question is - will your script build based on latest release or will it build if there are new commits after latest official release?
Thanks once again!
 
My question is - will your script build based on latest release or will it build if there are new commits after latest official release?
Thanks once again!

It builds images based on the latest github commit.
 
One question: Does it show the progress bar or all the scrolling lines while its compiling the firmware?

Edit: As per the above posts it seems it doesn't but it does save the build log in a separate file so it's close enough.
 
Last edited:
Adamm, looks great! quick question

I am using your older build.sh. As a result amng, amng.ax88, am-toolchains are installed. Should I just rm -rf all of them? Any other things I should uninstall?

Thanks
 
Last edited:
Thanks, Adamm, just curious what the use cases for this would be as opposed to waiting for the official builds from Merlin?
 
I am using your older build.sh. As a result amng, amng.ax88, am-toolchains are installed.

This will be done automatically by the "repo" command.

Any other things I should uninstall?

Just the old build files on your desktop and /bin folder, amcfwm should handle the rest.

Thanks, Adamm, just curious what the use cases for this would be as opposed to waiting for the official builds from Merlin?

This script was just a personal one I decided to make public. There's no real "use case" besides wanting to compile/modify the firmware yourself
 
Quick question - after indicating a successful build for 86U, the script attempts to connect to router.asus.com (192.168.1.1). I was not sure what the purpose of this was, so I ^C exited from the script and it retrned to the master menu. Can you explain what it was doing? I'll look at the script as well and see if I can tell.

--> 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.

Very nice script and it worked fine so far. Oh. one suggestion you might add a [e] (exit) text on the settings menu. I see it does work, but does not appear in the options list. I like to visit the Settings menu to see what I've enabled, but not actually change anything. :)

Thanks for your effort and for sharing.
 
Last edited:

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