1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

[Release] amcfwm - AsusWRT-Merlin Custom Firmware Manager

Discussion in 'Asuswrt-Merlin' started by Adamm, Apr 10, 2020.

  1. Adamm

    Adamm Part of the Furniture

    Joined:
    Mar 26, 2013
    Messages:
    2,796
    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

    [​IMG]
    [​IMG]
    [​IMG]


    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 [email protected]:/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 bax56 enable|disable ) Enable/Disable Building Of AX56U 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/Compiling questions. If you are unfamiliar with working in a Linux environment this script probably isn't aimed at you.
     
    Last edited: Apr 16, 2020
  2. Adamm

    Adamm Part of the Furniture

    Joined:
    Mar 26, 2013
    Messages:
    2,796
    Reserved
     
    Vexira likes this.
  3. Adamm

    Adamm Part of the Furniture

    Joined:
    Mar 26, 2013
    Messages:
    2,796
    Reserved
     
    Marin likes this.
  4. Marin

    Marin Very Senior Member

    Joined:
    Sep 15, 2015
    Messages:
    930
    Awesome! I’m looking forward to having something to play with this weekend!

    Thank you [mention]Adamm [/mention] !


    Sent from my iPhone using Tapatalk
     
    L&LD, no_name and Adamm like this.
  5. dave14305

    dave14305 Part of the Furniture

    Joined:
    May 19, 2018
    Messages:
    2,939
    Location:
    USA
    You know someone will try to install this script on their router. :)

    Very nice tool for those wanting to build their own. Thank you.
     
  6. Ronald Schwerer

    Ronald Schwerer Senior Member

    Joined:
    Jan 8, 2017
    Messages:
    459
    I was wondering if it would run on my overloaded/under-powered 68U. Then I decided against it.
     
    Last edited: Apr 10, 2020
  7. John Fitzgerald

    John Fitzgerald Regular Contributor

    Joined:
    Jul 26, 2018
    Messages:
    117
    Good for the morning laugh: "Is there a lightweight version available for the router?" :oops:
     
    QuikSilver likes this.
  8. Delusion

    Delusion Senior Member

    Joined:
    May 4, 2019
    Messages:
    214
    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: Apr 10, 2020
  9. Adamm

    Adamm Part of the Furniture

    Joined:
    Mar 26, 2013
    Messages:
    2,796
    The build log should give you a good idea why it failed;

    Code:
    cat $HOME/amcfwm/rt-ac86u-output.txt
     
  10. Delusion

    Delusion Senior Member

    Joined:
    May 4, 2019
    Messages:
    214
    Thanks.. maybe symlinks fix for HND toolchain is missing?

    here is the output:
    https://pastebin.com/raw/cS48P5uW
     
  11. Adamm

    Adamm Part of the Furniture

    Joined:
    Mar 26, 2013
    Messages:
    2,796
    Can't reproduce this on my end on a fresh VM, make sure you followed the steps precisely as this should work on a minimal Ubuntu install without any additional steps.
     
  12. maghuro

    maghuro Senior Member

    Joined:
    Feb 19, 2020
    Messages:
    342
    Location:
    Portugal
    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!
     
    Sky, distilled and thelonelycoder like this.
  13. Adamm

    Adamm Part of the Furniture

    Joined:
    Mar 26, 2013
    Messages:
    2,796
    It builds images based on the latest github commit.
     
    maghuro likes this.
  14. Asad Ali

    Asad Ali Very Senior Member

    Joined:
    May 25, 2017
    Messages:
    763
    Location:
    Pakistan
    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: Apr 10, 2020
  15. JGrana

    JGrana Senior Member

    Joined:
    May 31, 2013
    Messages:
    290
    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: Apr 10, 2020
  16. fields987

    fields987 Occasional Visitor

    Joined:
    Mar 14, 2020
    Messages:
    31
    Thanks, Adamm, just curious what the use cases for this would be as opposed to waiting for the official builds from Merlin?
     
  17. Adamm

    Adamm Part of the Furniture

    Joined:
    Mar 26, 2013
    Messages:
    2,796
    This will be done automatically by the "repo" command.

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

    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
     
    QuikSilver and L&LD like this.
  18. heysoundude

    heysoundude Very Senior Member

    Joined:
    Sep 20, 2016
    Messages:
    890
    1. Pour water on router, then
    2. unplug router Power supply, then
    3. run. everyone connected to your wifi will be looking for you.
     
    Sky, distilled, ^Tripper^ and 4 others like this.
  19. TechTinkerer

    TechTinkerer Regular Contributor

    Joined:
    Feb 12, 2020
    Messages:
    109
    Location:
    Land of the distanced happydance
    nicotine patches i hear are good :D
     
    Sky, QuikSilver, heysoundude and 2 others like this.
  20. JSinFCVA

    JSinFCVA Regular Contributor

    Joined:
    Oct 11, 2017
    Messages:
    72
    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: Apr 10, 2020