What's new

Compilation error for asuswrt-merlin.ng with rt-ac86u

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

jyavenard

Occasional Visitor
Hi

I'm trying to compile merlin.ng from source (so I can enable some extra services)

I've followed the instructions (which allowed me to build for a rt-ac68u no problem)

However, it breaks very early on with:

make[4]: Entering directory '/home/jyavenard/asuswrt-merlin.ng/release/src-rt-5.02hnd/kernel/linux-4.1'
make[5]: '../../.config' is up to date.
scripts/kconfig/conf --olddefconfig Kconfig
../../bcmdrivers/Kconfig.autogen:2: syntax error
Kconfig.bcm:1336: missing end statement for this entry
Kconfig:15: missing end statement for this entry
../../bcmdrivers/Kconfig.autogen:1: invalid statement
Kconfig.bcm:1338: unexpected end statement
Kconfig:20: unexpected end statement
scripts/kconfig/Makefile:84: recipe for target 'olddefconfig' failed
make[5]: *** [olddefconfig] Error 1
Makefile:565: recipe for target 'oldnoconfig' failed
make[4]: *** [oldnoconfig] Error 2
make[4]: Leaving directory '/home/jyavenard/asuswrt-merlin.ng/release/src-rt-5.02hnd/kernel/linux-4.1'
make.hndrt:332: recipe for target 'prek' failed
make[3]: *** [prek] Error 2
make[3]: Leaving directory '/home/jyavenard/asuswrt-merlin.ng/release/src-rt-5.02hnd'
Makefile:4065: recipe for target 'setprofile' failed
make[2]: *** [setprofile] Error 2
make[2]: Leaving directory '/home/jyavenard/asuswrt-merlin.ng/release/src-rt-5.02hnd'
Makefile:3899: recipe for target 'bin' failed
make[1]: *** [bin] Error 2
make[1]: Leaving directory '/home/jyavenard/asuswrt-merlin.ng/release/src-rt-5.02hnd'
Makefile:4048: recipe for target 'rt-ac86u' failed
make: *** [rt-ac86u] Error 2


any ideas?
thanks
 
Hi

I'm trying to compile merlin.ng from source (so I can enable some extra services)

I've followed the instructions (which allowed me to build for a rt-ac68u no problem)

However, it breaks very early on with:

make[4]: Entering directory '/home/jyavenard/asuswrt-merlin.ng/release/src-rt-5.02hnd/kernel/linux-4.1'
make[5]: '../../.config' is up to date.
scripts/kconfig/conf --olddefconfig Kconfig
../../bcmdrivers/Kconfig.autogen:2: syntax error
Kconfig.bcm:1336: missing end statement for this entry
Kconfig:15: missing end statement for this entry
../../bcmdrivers/Kconfig.autogen:1: invalid statement
Kconfig.bcm:1338: unexpected end statement
Kconfig:20: unexpected end statement
scripts/kconfig/Makefile:84: recipe for target 'olddefconfig' failed
make[5]: *** [olddefconfig] Error 1
Makefile:565: recipe for target 'oldnoconfig' failed
make[4]: *** [oldnoconfig] Error 2
make[4]: Leaving directory '/home/jyavenard/asuswrt-merlin.ng/release/src-rt-5.02hnd/kernel/linux-4.1'
make.hndrt:332: recipe for target 'prek' failed
make[3]: *** [prek] Error 2
make[3]: Leaving directory '/home/jyavenard/asuswrt-merlin.ng/release/src-rt-5.02hnd'
Makefile:4065: recipe for target 'setprofile' failed
make[2]: *** [setprofile] Error 2
make[2]: Leaving directory '/home/jyavenard/asuswrt-merlin.ng/release/src-rt-5.02hnd'
Makefile:3899: recipe for target 'bin' failed
make[1]: *** [bin] Error 2
make[1]: Leaving directory '/home/jyavenard/asuswrt-merlin.ng/release/src-rt-5.02hnd'
Makefile:4048: recipe for target 'rt-ac86u' failed
make: *** [rt-ac86u] Error 2


any ideas?
thanks

I updated the wiki instructions not long back with how I got it to build on Ubuntu and what you have to add/change.

https://github.com/RMerl/asuswrt-merlin/wiki/Compile-Firmware-from-source-using-Ubuntu
 
... any ideas?
Change link /bin/sh to point to the bash shell, not dash.

Always compile from a fresh backup copy of the source code. Do not type anywhere make clean. Do not try to compile a different target after successfully compiling another one.
 
Last edited:
The HND tree is sensitive to make clean indeed, something is broken in its build system, and I don't have the patience to figure out Broadcom's spider web of a build system for HND.
 
Change link /bin/sh to point to the bash shell, not dash.

Always compile from a fresh backup copy of the source code. Do not type anywhere make clean. Do not try to compile a different target after successfully compiling another one.

That's what I figured and I didn't do make clean, and also changed sh to link to bash.

this didn't help.

Looks like something wasn't checked-in in the tree to me...

Edit: It's building fine after the today's pull
 
Last edited:
Here's snippets from my build scripts with example.

How to setup the toolchains
Code:
cd
git clone https://github.com/RMerl/am-toolchains.git

sudo mkdir -p /opt

sudo rm -rf /opt/toolchains
sudo ln -s ~/am-toolchains/brcm-arm-hnd /opt/toolchains

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


Example: How to compile from a fresh backup copy of the Asuswrt source code for RT-AC86U
Code:
cd
rm -f 9a7ccd464cb535a1b39cc3e34421bc5b4ceb25f4.tar.gz
wget https://github.com/RMerl/asuswrt-merlin.ng/archive/9a7ccd464cb535a1b39cc3e34421bc5b4ceb25f4.tar.gz
tar xzvf 9a7ccd464cb535a1b39cc3e34421bc5b4ceb25f4.tar.gz
rm -rf asuswrt-merlin.ng
mv asuswrt-merlin.ng-master asuswrt-merlin.ng
rm -rf ~/asuswrt-merlin.ng/release/src-rt-5.02hnd/bcmdrivers/broadcom/net/wl/impl51/main/src/toolchains
ln -s ~/am-toolchains/brcm-arm-hnd ~/asuswrt-merlin.ng/release/src-rt-5.02hnd/bcmdrivers/broadcom/net/wl/impl51/main/src/toolchains
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

sudo rm -f /bin/sh && sudo ln -s bash /bin/sh

export LD_LIBRARY_PATH=/opt/toolchains/crosstools-arm-gcc-5.3-linux-4.1-glibc-2.22-binutils-2.25/usr/lib
export TOOLCHAIN_BASE=/opt/toolchains
echo $PATH | grep -qF /opt/toolchains/crosstools-arm-gcc-5.3-linux-4.1-glibc-2.22-binutils-2.25/usr/bin || export PATH=$PATH:/opt/toolchains/crosstools-arm-gcc-5.3-linux-4.1-glibc-2.22-binutils-2.25/usr/bin
echo $PATH | grep -qF /opt/toolchains/crosstools-aarch64-gcc-5.3-linux-4.1-glibc-2.22-binutils-2.25/usr/bin || export PATH=$PATH:/opt/toolchains/crosstools-aarch64-gcc-5.3-linux-4.1-glibc-2.22-binutils-2.25/usr/bin

cd ~/asuswrt-merlin.ng/release/src-rt-5.02hnd
make rt-ac86u
 
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