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!

How to compile 384?

Discussion in 'Asuswrt-Merlin' started by Shonk, Jun 14, 2018.

  1. Shonk

    Shonk Senior Member

    Joined:
    May 7, 2014
    Messages:
    369
    Im having problems getting 384 to compile on my ubuntu64 box
    any chance of someone helping me get this compiling for my rt-ac88u

    atm im opening terminal
    Code:
    su (to get root i know i could remove sudo but it makes no diff)
    
    cd /home/shonk
    git clone https://github.com/RMerl/asuswrt-merlin.ng
    git clone https://github.com/RMerl/am-toolchains
    
    sudo mkdir -p /opt
    sudo rm -rf /opt/toolchains
    sudo ln -s /home/shonk/am-toolchains/brcm-arm-hnd /opt/toolchains
    sudo rm -f /opt/brcm-arm
    sudo ln -s /home/shonk/am-toolchains/brcm-arm-sdk/hndtools-arm-linux-2.6.36-uclibc-4.5.3 /opt/brcm-arm
    
    its just a case of setting the paths now
    but the ones i have tried dont seem to work

    asuswrt-merlin.ng is in /home/shonk/
    am-toolchains is in /home/shonk

    then its

    cd /home/shonk/asuswrt-merlin.ng/release/src-rt-7.14.114.x/src
    make clean
    time make rt-ac88u
     
    Vexira likes this.
  2. kfp

    kfp Very Senior Member

    Joined:
    Jun 26, 2014
    Messages:
    707
    Code:
    sudo ln -sf /home/shonk/am-toolchains/brcm-arm-sdk/hndtools-arm-linux-2.6.36-uclibc-4.5.3 /home/shonk/asuswrt-merlin.ng/release/src-rt-7.14.114.x/src/toolchains
    
     
  3. azdps

    azdps Regular Contributor

    Joined:
    May 26, 2012
    Messages:
    91
    Rmerlin has instructions:

    https://github.com/RMerl/asuswrt-merlin/wiki/Compile-Firmware-from-source-using-Ubuntu

    I don't see that you exported the PATH environment variable unless you added the information to your ~/.profile file. I don't have my desktop with all my build information setup at the moment otherwise I would be able to provide you with a script.

    Also I don't think the info kfp is valid. RMerlin moved the toolchains to a completely separate location from the main source code as a result of Github's 1gb source code limitation per repository.
     
    Last edited: Jun 15, 2018
  4. Shonk

    Shonk Senior Member

    Joined:
    May 7, 2014
    Messages:
    369
    its the PATH environment variable that im after
     
  5. barbara

    barbara Occasional Visitor

    Joined:
    Apr 27, 2016
    Messages:
    20
    Location:
    New Hampshire, USA
    Here's the PATH I use to build an RT-AC88U firmware. It yelled at me when I did it wrong.
    Code:
    export PATH=$PATH:/opt/brcm-arm/bin:/opt/brcm-arm/arm-brcm-linux-uclibcgnueabi/bin
    
    
     
  6. Shonk

    Shonk Senior Member

    Joined:
    May 7, 2014
    Messages:
    369
    Can you paste the complete thing for 384

    Example of mine for 380
    Code:
    cd /home/shonk/
    git clone https://github.com/RMerl/asuswrt-merlin.git
    
    sudo rm /opt/brcm
    sudo rm /opt/brcm-arm
    sudo ln -s /home/shonk/asuswrt-merlin/tools/brcm /opt/brcm
    
    sudo ln -s /home/shonk/asuswrt-merlin/release/src-rt-6.x.4708/toolchains/hndtools-arm-linux-2.6.36-uclibc-4.5.3 /opt/brcm-arm
    
    export PATH=$PATH:/opt/brcm/hndtools-mipsel-linux/bin:/opt/brcm/hndtools-mipsel-uclibc/bin:/opt/brcm-arm/bin
    
    cd /home/shonk/asuswrt-merlin/release/src-rt-7.14.114.x/src
    time make clean
    time make rt-ac88u
    
     
  7. kfp

    kfp Very Senior Member

    Joined:
    Jun 26, 2014
    Messages:
    707
    What compiler errors are you seeing right now? Posting that would narrow the problem down.
     
  8. barbara

    barbara Occasional Visitor

    Joined:
    Apr 27, 2016
    Messages:
    20
    Location:
    New Hampshire, USA
    Your issue could be 'make clean'. I don't ever trust this command because she is flakey.
    Code:
    ### setup Broadcom ARM toolchain for Asuswrt-Merlin
    
    [ ! -d /opt ] && sudo mkdir -p /opt
    
    if [ ! -d ~/am-toolchains ]; then
      cd
      git clone https://github.com/RMerl/am-toolchains.git
    fi
    
    sudo rm -f /opt/brcm-arm
    sudo ln -s ~/am-toolchains/brcm-arm-sdk/hndtools-arm-linux-2.6.36-uclibc-4.5.3 /opt/brcm-arm
    
    sudo rm -f /bin/sh ; sudo ln -s bash /bin/sh
    
    export LD_LIBRARY_PATH=
    export TOOLCHAIN_BASE=
    export PATH=$PATH:/opt/brcm-arm/bin:/opt/brcm-arm/arm-brcm-linux-uclibcgnueabi/bin
    
    

    Now just compile it from a clean source.
    Code:
    rm -rf ~/asuswrt-merlin.ng/release/src-rt-6.x.4708/toolchains
    ln -s ~/am-toolchains/brcm-arm-sdk ~/asuswrt-merlin.ng/release/src-rt-6.x.4708/toolchains
    cd ~/asuswrt-merlin.ng/release/src-rt-7.14.114.x/src
    make rt-ac88u
    
    
     
    Last edited: Jun 15, 2018