Compiling DD-WRT

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3, 4 ... 11, 12, 13  Next
Author Message
MastaG
DD-WRT Novice


Joined: 04 Mar 2014
Posts: 21

PostPosted: Wed Oct 15, 2014 13:10    Post subject: Reply with quote
Alright, so here's a script which will do everything for you.
It will download the complete source and make the necessary modifications for building the Broadcom K3 AC mipsel image.
It even takes care of downloading automake-1.14 which is required by one of the packages.

However be sure that you have all of the host tools installed required for building.
There are some strange ones like dia and cmake.

A huge thanks goes out to <Kong> for posting his inittial changes and commiting some of the fixes!
Without him it would've taken me much longer to figure it out.

Save it as a shell script and place it in a empty directory without any spaces.
Something like: /home/user/ddwrt/script.sh

Then run it by pointing it to your toolchain directory:
Code:
cd ddwrt
chmod a+x script.sh
./script.sh /opt/toolchain-mipsel_r2_gcc-4.7-linaro_uClibc-0.9.33.2


Before you run it, you need to make sure you have your docbook xsl sheets.
One of the packages (rtpproxy) is looking for them in:
/usr/local/share/xsl/docbook
In Fedora 20 their installed at:
/usr/share/sgml/docbook/xsl-stylesheets-1.78.1
So you can simply make a symlink in order to satisfy it:
Code:
sudo mkdir -p /usr/local/share/xsl
sudo ln -s /usr/share/sgml/docbook/xsl-stylesheets-1.78.1 /usr/local/share/xsl/docbook



So here it is:

Code:
#!/bin/bash
if [ "$1" = "" ]
then
   echo ""
   echo ""
   echo "Please run the script with the path to your cross-compiler directory"
   echo ""
   echo "eg $0 /opt/toolchain-mipsel_r2_gcc-4.7-linaro_uClibc-0.9.33.2"
   echo ""
   exit 0
fi
if [ ! -e $1/bin/mipsel-openwrt-linux-uclibc-gcc ]
then
   echo ""
   echo ""
   echo "$1/bin/mipsel-openwrt-linux-uclibc-gcc does not exist"
   echo ""
   echo "Please check that you specify the correct path to your cross-compiler!"
   echo ""
   exit 0
fi
if [ ! -e src/router/Makefile.brcm3x ]
then
   echo ""
   echo "Getting DD-WRT svn..."
   svn co svn://svn.dd-wrt.com/DD-WRT .
   mkdir mroot
else
   svn update
fi
export GCCMIPS="$1/bin"
export PATH=$GCCMIPS:`pwd`/mroot/bin:$PATH
RDIR="`pwd`"
if [ -e src/router/mipsel-uclibc/dd-wrt.v24-K3_R6300.trx ]
then
   rm -f src/router/mipsel-uclibc/dd-wrt.v24-K3_R6300.trx
fi
if [ ! -e init_done ]
then
   echo ""
   echo "Doing some inittial changes."
   echo "Huge thanks to <Kong>!"
   echo ""
   echo ""
   echo "Compiling some userspace tools..."
   echo ""
   cd opt/tools
   gcc -o trx trx.c
   cd ../..
   cd tools
   rm -f ./strip
   gcc strip.c -o ./strip
   rm -f ./write3
   gcc write3.c -o ./write3
   rm -f ./write4
   gcc write4.c -o ./write4
   rm ./webcomp
   gcc -o webcomp -DUEMF -DWEBS -DLINUX webcomp.c
   cd ..
   cd src/router/tools
   rm -f jsformat
   make jsformat
   cd ..
   echo ""
   echo "Setting up configs and makefiles.."
   rm -f .config
   cp configs/broadcom_K3x/.config_ac .config
   sed -i 's/^CONFIG_SPUTNIK_APD=y/#CONFIG_SPUTNIK_APD=y/g' .config
   sed -i 's/^CONFIG_ASTERISK=y/#CONFIG_ASTERISK=y/g' .config
   sed -i 's/^CONFIG_3COM=y/#CONFIG_3COM=y/g' .config
   cd ..
   echo -e "--- linux/universal/linux-3.10/drivers/net/wireless/Kconfig.orig\t2014-10-15 11:48:30.747229726 +0200" > ./kpatch
   echo -e "+++ linux/universal/linux-3.10/drivers/net/wireless/Kconfig\t2014-10-15 11:49:14.994041691 +0200" >> ./kpatch
   echo "@@ -280,15 +280,15 @@" >> ./kpatch
   echo " source \"drivers/net/wireless/ti/Kconfig\"" >> ./kpatch
   echo " source \"drivers/net/wireless/zd1211rw/Kconfig\"" >> ./kpatch
   echo " source \"drivers/net/wireless/mwifiex/Kconfig\"" >> ./kpatch
   echo "-if RALINK_DEVICE" >> ./kpatch
   echo "-source \"drivers/net/wireless/rt3352/rt2860v2_ap/Kconfig\"" >> ./kpatch
   echo "-source \"drivers/net/wireless/rt3352/rt2860v2_sta/Kconfig\"" >> ./kpatch
   echo "-endif" >> ./kpatch
   echo "-if SOC_MT7620_OPENWRT" >> ./kpatch
   echo "-source \"drivers/net/wireless/rt7620/rt2860v2_ap/Kconfig\"" >> ./kpatch
   echo "-source \"drivers/net/wireless/rt7620/rt2860v2_sta/Kconfig\"" >> ./kpatch
   echo "-source \"drivers/net/wireless/rt5592/Kconfig\"" >> ./kpatch
   echo "-source \"drivers/net/wireless/rt7612/rlt_wifi/Kconfig\"" >> ./kpatch
   echo "-endif" >> ./kpatch
   echo "+#if RALINK_DEVICE" >> ./kpatch
   echo "+#source \"drivers/net/wireless/rt3352/rt2860v2_ap/Kconfig\"" >> ./kpatch
   echo "+#source \"drivers/net/wireless/rt3352/rt2860v2_sta/Kconfig\"" >> ./kpatch
   echo "+#endif" >> ./kpatch
   echo "+#if SOC_MT7620_OPENWRT" >> ./kpatch
   echo "+#source \"drivers/net/wireless/rt7620/rt2860v2_ap/Kconfig\"" >> ./kpatch
   echo "+#source \"drivers/net/wireless/rt7620/rt2860v2_sta/Kconfig\"" >> ./kpatch
   echo "+#source \"drivers/net/wireless/rt5592/Kconfig\"" >> ./kpatch
   echo "+#source \"drivers/net/wireless/rt7612/rlt_wifi/Kconfig\"" >> ./kpatch
   echo "+#endif" >> ./kpatch
   echo "" >> ./kpatch
   echo " endif # WLAN" >>./kpatch
   patch -p0 < ./kpatch
   rm -f ./kpatch
   cd router
   sed -i 's#cd $(ARCH)-uclibc \&\& ../tools/bufenc/makefw.sh dd-wrt.v24-K3-nandboot#\#cd $(ARCH)-uclibc \&\& ../tools/bufenc/makefw.sh dd-wrt.v24-K3-nandboot#g' Makefile.brcm3x
   sed -i 's#mv $(TARGETDIR)/usr/lib/services.so $(TARGETDIR)/lib#mv $(TARGETDIR)/usr/lib/services.so $(TARGETDIR)/lib\n\tcp emf_bin/mipsel/igs.ko $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/drivers/net/wl/\n\tcp emf_bin/mipsel/emf.ko $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/drivers/net/wl/#g' Makefile.brcm3x
   sed -i 's#../../opt/asus/asustrx-rt66u -p RT-AC66U -v 3.0.0.1 -m 32000000 -o $(ARCH)-uclibc/dd-wrt.v24-K3_RT-AC66U.trx $(ARCH)-uclibc/lzma_vmlinuz -a 1024 $(ARCH)-uclibc/rootfs.squashfs#\#../../opt/asus/asustrx-rt66u -p RT-AC66U -v 3.0.0.1 -m 32000000 -o $(ARCH)-uclibc/dd-wrt.v24-K3_RT-AC66U.trx $(ARCH)-uclibc/lzma_vmlinuz -a 1024 $(ARCH)-uclibc/rootfs.squashfs#g' Makefile.brcm3x
   sed -i 's/include rules\/emf.mk/#include rules\/emf.mk/g' rules/all.mk
   ln -s $1/bin/lzma `pwd`/netgear/
   cd ../..
   touch init_done
   echo ""
   echo "Done"
   echo ""
fi
if hash aclocal-1.14 2>/dev/null
then
   echo ""
else
   echo ""
   echo "Automake 1.14 not found!"
   if [ -e `pwd`/automake-1.14.1/configure ]
   then
      echo ""
      echo "Previous compile somehow failed.."
      echo "Bailing out..."
      echo ""
      exit 0
   fi
   echo ""
   echo "Going to try to compile it :)"
   echo ""
   echo ""
   wget http://ftp.gnu.org/gnu/automake/automake-1.14.1.tar.gz
   tar -zxf automake-1.14.1.tar.gz
   rm -f automake-1.14.1.tar.gz
   cd automake-1.14.1
   ./configure --prefix=$RDIR/mroot
   make
   make install
   cd ../mroot/bin
   rm -f aclocal
   rm -f automake
   cd ../..
fi
echo ""
echo ""
cd src/router
echo ""
cd libutils
echo -n '#define SVN_REVISION "' > revision.h
svnversion -n . >> revision.h
echo '"' >> revision.h
cd ../httpd/visuals
echo -n '#define SVN_REVISION "' > revision.h
svnversion -n . >> revision.h
echo '"' >> revision.h
cd ..
echo -n '#define SVN_REVISION "' > revision.h
svnversion -n . >> revision.h
echo '"' >> revision.h
cd ..
echo "Installing dependencies.."
make -f Makefile.brcm3x jansson
make -f Makefile.brcm3x jansson-configure
make -f Makefile.brcm3x jansson
make -f Makefile.brcm3x jansson-install
make -f Makefile.brcm3x nvram
make -f Makefile.brcm3x nvram-install
make -f Makefile.brcm3x utils
make -f Makefile.brcm3x utils-install
make -f Makefile.brcm3x zlib-configure
make -f Makefile.brcm3x minidlna-configure
make -f Makefile.brcm3x minidlna
make -f Makefile.brcm3x minidlna-install
make -f Makefile.brcm3x install_headers
make -f Makefile.brcm3x iptables
make -f Makefile.brcm3x libnet
make -f Makefile.brcm3x libnet-install
make -f Makefile.brcm3x kernel
make -f Makefile.brcm3x ncurses-configure
echo "Configuring.."
make -f Makefile.brcm3x configure
echo "Building.."
make -f Makefile.brcm3x clean all install
if [ -e mipsel-uclibc/dd-wrt.v24-K3_R6300.trx ]
then
   STAMP="`date +%Y-%m-%d_%H:%M`"
   cp mipsel-uclibc/dd-wrt.v24-K3_R6300.trx ../../image/dd-wrt.v24-K3_AC_"$STAMP"_r"`svnversion -n .`".bin
   echo ""
   echo ""
   echo "Image created: dd-wrt.v24-K3_AC_"$STAMP"_r"`svnversion -n .`".bin"
   echo "Have a look in the \"image\" directory"
else
   echo ""
   echo ""
   echo "Whoops.. something went wrong, please check the output and consult the forums.."
fi
echo ""
echo ""


EDIT: A few (more) typos..


Last edited by MastaG on Thu Oct 16, 2014 9:09; edited 1 time in total
Sponsor
CoMMy
DD-WRT Novice


Joined: 08 Oct 2014
Posts: 5

PostPosted: Wed Oct 15, 2014 19:40    Post subject: Reply with quote
Thanks MastaG. Shocked

Any chance for any ARM script for R7000 ? Wink
MastaG
DD-WRT Novice


Joined: 04 Mar 2014
Posts: 21

PostPosted: Thu Oct 16, 2014 9:22    Post subject: Reply with quote
Well I suppose I can look into modifying it so it can produce ARM builds as well.
But I'll be a bit busy in the coming weeks.
And I was actually going to put my limited time into modifying the firmware for my own purposes (oscam, dvbapi, tvheadend etc...).

But wouldn't it be better to try and build for ARM yourself?
I just gave the script a spin here from a empty directory and it produced an image in one run without a hitch..
Basically all the modifications are already present (thx to <Kong> for the most).

All you need to do is find out if the ARM target needs another .config and Makefile and make a few edits..
Then change it to use the ARM toolchain and you should be ready to roll.
Seems like a nice challenge for you Wink

Btw, I'm attaching the image it produced here if anyone wants to give it a spin.
If you're curious what has been changed since the build you're currently running then look here: http://svn.dd-wrt.com/timeline
Beware that I haven't tested it yet for myself and my last build made my router go into emergency mode (which is a easy fix anyways..)



dd-wrt.v24-K3_AC_25122M.bin
 Description:
Mipsel K3_AC test build

Download
 Filename:  dd-wrt.v24-K3_AC_25122M.bin
 Filesize:  19.23 MB
 Downloaded:  450 Time(s)

adrien1977
DD-WRT Novice


Joined: 28 Apr 2010
Posts: 31

PostPosted: Sat Oct 18, 2014 20:19    Post subject: Reply with quote
I am going to try to compile on my mac.
I will report.

Just one quick question before i get too deep with it.

Will this compile the firmware for WNDR4500 V1?

thanks and THANK YOU for having done the heavy lifting for us!!!
cdmarshall
DD-WRT User


Joined: 09 Jul 2014
Posts: 308

PostPosted: Sat Oct 18, 2014 21:01    Post subject: Reply with quote
FYI for those that don't have the money for a dedicated machine to play with.

vmplayer for vmware is free for non commercial use. and allows you to install virtual machines of any kind on a pc or laptop. I use it constantly for many OS installations.

Just search vmplayer download on google.

_________________
EA-6900
Asus 68U
wabe
DD-WRT Guru


Joined: 17 Jun 2006
Posts: 591

PostPosted: Sun Oct 19, 2014 21:47    Post subject: Reply with quote
MastaG wrote:

All you need to do is find out if the ARM target needs another .config and Makefile and make a few edits..
Then change it to use the ARM toolchain and you should be ready to roll.
Seems like a nice challenge for you Wink



The Makefile is called Makefile.northstar and there is a corresponding .config

Will try it out myself when I get some spare time

_________________
AC-68U on Build 33525M
AC-68U on Build 33435M
AC-68U on Build 33010M
tusc
DD-WRT Novice


Joined: 14 Oct 2008
Posts: 19

PostPosted: Sun Oct 19, 2014 23:54    Post subject: Reply with quote
Here's my attempt at creating an ARM script based on MastaG's mips version. I spent some time this afternoon on it but it's not complete.

It's erroring during the configure part (make -f Makefile.northstar configure )

Building ddwrt is not as trivial as openwrt (much more elegant build system). That's all I'm going to comment on it unless I want to get flamed.

I'm still trying to figure out which toolchain to use for ARM builds. There are 5 listed in the Toolchains folder:

Code:
toolchain-arm_cortex-a9_gcc-4.9-linaro_musl-1.1.2_eabi
toolchain-arm_cortex-a9+neon_gcc-4.9-linaro_musl-1.1.1_eabi
toolchain-armeb_xscale_gcc-4.8-linaro_musl-1.1.2
toolchain-arm_gcc4.2.3
toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eab


I picked toolchain-arm_cortex-a9_gcc-4.9-linaro_musl-1.1.2_eabi as it's one of the few that does not enable hard fpu support.

What's odd is that the build version on my R7000 is not even listed. The top of dmesg on my router shows a version of Linaro not listed. I'm running Kong's 24345M build:
Linux version 3.10.25 (bluebat@opensuse) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.01 r39555) ) #1081 SMP PREEMPT Fri Jun 13 21:55:53 CEST 2014

I ran arm-linux-gcc -v in each of the toolchain bin folders to match the Linaro version.

The script will run until it hits the configure part as i said earlier. I had to create some sym links in /usr/bin to an older version of gnu tools (aclocal, automake, etc) as the configure script is expecting it (pretty ridiculous). I also had to comment out some apps from the .config file as they would not compile (radvd for example).

I haven't changed the sed commands in the scripts as I'm not sure if they only pertain to the MIPS build. These are the hints given by Kong at the beginning of this thread.

Good luck.

Code:

#!/bin/bash
if [ "$1" = "" ]
then
   echo ""
   echo ""
   echo "Please run the script with the path to your cross-compiler directory"
   echo ""
   echo "eg $0 /opt/toolchain-arm_cortex-a9_gcc-4.9-linaro_musl-1.1.2_eabi""
   echo ""
   exit 0
fi
if [ ! -e $1/bin/arm-openwrt-linux-muslgnueabi-gcc]
then
   echo ""
   echo ""
   echo "$1/bin/arm-openwrt-linux-muslgnueabi-gcc does not exist"
   echo ""
   echo "Please check that you specify the correct path to your cross-compiler!"
   echo ""
   exit 0
fi
if [ ! -e src/router/Makefile.northstar ]
then
   echo ""
   echo "Getting DD-WRT svn..."
   svn co svn://svn.dd-wrt.com/DD-WRT .
   mkdir mroot
else
   echo svn update
fi
export GCCARM="$1/bin"
export PATH=$GCCARM:`pwd`/mroot/bin:$PATH
RDIR="`pwd`"
if [ -e src/router/mipsel-uclibc/dd-wrt.v24-K3_R6300.trx ]
then
   rm -f src/router/mipsel-uclibc/dd-wrt.v24-K3_R6300.trx
fi
if [ ! -e init_done ]
then
   echo ""
   echo "Doing some inittial changes."
   echo "Huge thanks to <Kong>!"
   echo ""
   echo ""
   echo "Compiling some userspace tools..."
   echo ""
   cd opt/tools
   gcc -o trx trx.c
   cd ../..
   cd tools
   rm -f ./strip
   gcc strip.c -o ./strip
   rm -f ./write3
   gcc write3.c -o ./write3
   rm -f ./write4
   gcc write4.c -o ./write4
   rm ./webcomp
   gcc -o webcomp -DUEMF -DWEBS -DLINUX webcomp.c
   cd ..
   cd src/router/tools
   rm -f jsformat
   make jsformat
   cd ..
   echo ""
   echo "Setting up configs and makefiles.."
   rm -f .config
   cp configs/northstar/.config_northstar .config

   sed -i 's/^CONFIG_SPUTNIK_APD=y/#CONFIG_SPUTNIK_APD=y/g' .config
   sed -i 's/^CONFIG_ASTERISK=y/#CONFIG_ASTERISK=y/g' .config
   sed -i 's/^CONFIG_3COM=y/#CONFIG_3COM=y/g' .config
   cd ..
   echo -e "--- linux/universal/linux-3.10/drivers/net/wireless/Kconfig.orig\t2014-10-15 11:48:30.747229726 +0200" > ./kpatch
   echo -e "+++ linux/universal/linux-3.10/drivers/net/wireless/Kconfig\t2014-10-15 11:49:14.994041691 +0200" >> ./kpatch
   echo "@@ -280,15 +280,15 @@" >> ./kpatch
   echo " source \"drivers/net/wireless/ti/Kconfig\"" >> ./kpatch
   echo " source \"drivers/net/wireless/zd1211rw/Kconfig\"" >> ./kpatch
   echo " source \"drivers/net/wireless/mwifiex/Kconfig\"" >> ./kpatch
   echo "-if RALINK_DEVICE" >> ./kpatch
   echo "-source \"drivers/net/wireless/rt3352/rt2860v2_ap/Kconfig\"" >> ./kpatch
   echo "-source \"drivers/net/wireless/rt3352/rt2860v2_sta/Kconfig\"" >> ./kpatch
   echo "-endif" >> ./kpatch
   echo "-if SOC_MT7620_OPENWRT" >> ./kpatch
   echo "-source \"drivers/net/wireless/rt7620/rt2860v2_ap/Kconfig\"" >> ./kpatch
   echo "-source \"drivers/net/wireless/rt7620/rt2860v2_sta/Kconfig\"" >> ./kpatch
   echo "-source \"drivers/net/wireless/rt5592/Kconfig\"" >> ./kpatch
   echo "-source \"drivers/net/wireless/rt7612/rlt_wifi/Kconfig\"" >> ./kpatch
   echo "-endif" >> ./kpatch
   echo "+#if RALINK_DEVICE" >> ./kpatch
   echo "+#source \"drivers/net/wireless/rt3352/rt2860v2_ap/Kconfig\"" >> ./kpatch
   echo "+#source \"drivers/net/wireless/rt3352/rt2860v2_sta/Kconfig\"" >> ./kpatch
   echo "+#endif" >> ./kpatch
   echo "+#if SOC_MT7620_OPENWRT" >> ./kpatch
   echo "+#source \"drivers/net/wireless/rt7620/rt2860v2_ap/Kconfig\"" >> ./kpatch
   echo "+#source \"drivers/net/wireless/rt7620/rt2860v2_sta/Kconfig\"" >> ./kpatch
   echo "+#source \"drivers/net/wireless/rt5592/Kconfig\"" >> ./kpatch
   echo "+#source \"drivers/net/wireless/rt7612/rlt_wifi/Kconfig\"" >> ./kpatch
   echo "+#endif" >> ./kpatch
   echo "" >> ./kpatch
   echo " endif # WLAN" >>./kpatch

   patch -p0 < ./kpatch
   rm -f ./kpatch
   cd router
   sed -i 's#cd $(ARCH)-uclibc \&\& ../tools/bufenc/makefw.sh dd-wrt.v24-K3-nandboot#\#cd $(ARCH)-uclibc \&\& ../tools/bufenc/makefw.sh dd-wrt.v24-K3-nandboot#g' Makefile.northstar
   sed -i 's#mv $(TARGETDIR)/usr/lib/services.so $(TARGETDIR)/lib#mv $(TARGETDIR)/usr/lib/services.so $(TARGETDIR)/lib\n\tcp emf_bin/mipsel/igs.ko $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/drivers/net/wl/\n\tcp emf_bin/mipsel/emf.ko $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/drivers/net/wl/#g' Makefile.northstar
   sed -i 's#../../opt/asus/asustrx-rt66u -p RT-AC66U -v 3.0.0.1 -m 32000000 -o $(ARCH)-uclibc/dd-wrt.v24-K3_RT-AC66U.trx $(ARCH)-uclibc/lzma_vmlinuz -a 1024 $(ARCH)-uclibc/rootfs.squashfs#\#../../opt/asus/asustrx-rt66u -p RT-AC66U -v 3.0.0.1 -m 32000000 -o $(ARCH)-uclibc/dd-wrt.v24-K3_RT-AC66U.trx $(ARCH)-uclibc/lzma_vmlinuz -a 1024 $(ARCH)-uclibc/rootfs.squashfs#g' Makefile.northstar
   sed -i 's/include rules\/emf.mk/#include rules\/emf.mk/g' rules/all.mk
   ln -s $1/bin/lzma `pwd`/netgear/
   cd ../..
   touch init_done
   echo ""
   echo "Done"
   echo ""
fi
if hash aclocal-1.14 2>/dev/null
then
   echo ""
else
   echo ""
   echo "Automake 1.14 not found!"
   if [ -e `pwd`/automake-1.14.1/configure ]
   then
      echo ""
      echo "Previous compile somehow failed.."
      echo "Bailing out..."
      echo ""
      exit 0
   fi
   echo ""
   echo "Going to try to compile it :)"
   echo ""
   echo ""
   wget http://ftp.gnu.org/gnu/automake/automake-1.14.1.tar.gz
   tar -zxf automake-1.14.1.tar.gz
   rm -f automake-1.14.1.tar.gz
   cd automake-1.14.1
   ./configure --prefix=$RDIR/mroot
   make
   make install
   cd ../mroot/bin
   rm -f aclocal
   rm -f automake
   cd ../..
fi
echo ""
echo ""
read -p "Press [Enter] key to continue..."
cd src/router
echo ""
cd libutils
echo -n '#define SVN_REVISION "' > revision.h
svnversion -n . >> revision.h
echo '"' >> revision.h
cd ../httpd/visuals
echo -n '#define SVN_REVISION "' > revision.h
svnversion -n . >> revision.h
echo '"' >> revision.h
cd ..
echo -n '#define SVN_REVISION "' > revision.h
svnversion -n . >> revision.h
echo '"' >> revision.h
cd ..


echo "Installing dependencies.."
#make -f Makefile.northstar jansson
make -f Makefile.northstar jansson-configure
make -f Makefile.northstar jansson
make -f Makefile.northstar jansson-install
make -f Makefile.northstar nvram
make -f Makefile.northstar nvram-install
make -f Makefile.northstar utils
make -f Makefile.northstar utils-install
make -f Makefile.northstar zlib-configure
make -f Makefile.northstar minidlna-configure
make -f Makefile.northstar minidlna
make -f Makefile.northstar minidlna-install
make -f Makefile.northstar install_headers
make -f Makefile.northstar iptables
make -f Makefile.northstar libnet
make -f Makefile.northstar libnet-install
make -f Makefile.northstar kernel
make -f Makefile.northstar ncurses-configure


read -p "Press [Enter] key to continue..."
echo "Configuring.."
make -f Makefile.northstar configure
echo "Building.."
make -f Makefile.northstar clean all install
if [ -e mipsel-uclibc/dd-wrt.v24-K3_R6300.trx ]
then
   STAMP="`date +%Y-%m-%d_%H:%M`"
   cp mipsel-uclibc/dd-wrt.v24-K3_R6300.trx ../../image/dd-wrt.v24-K3_AC_"$STAMP"_r"`svnversion -n .`".bin
   echo ""
   echo ""
   echo "Image created: dd-wrt.v24-K3_AC_"$STAMP"_r"`svnversion -n .`".bin"
   echo "Have a look in the \"image\" directory"
else
   echo ""
   echo ""
   echo "Whoops.. something went wrong, please check the output and consult the forums.."
fi
echo ""
echo ""
wabe
DD-WRT Guru


Joined: 17 Jun 2006
Posts: 591

PostPosted: Mon Oct 20, 2014 8:27    Post subject: Reply with quote
tusc wrote:
Here's my attempt at creating an ARM script based on MastaG's mips version. I spent some time this afternoon on it but it's not complete.

It's erroring during the configure part (make -f Makefile.northstar configure )


I'm still trying to figure out which toolchain to use for ARM builds. There are 5 listed in the Toolchains folder:

Code:
toolchain-arm_cortex-a9_gcc-4.9-linaro_musl-1.1.2_eabi
toolchain-arm_cortex-a9+neon_gcc-4.9-linaro_musl-1.1.1_eabi
toolchain-armeb_xscale_gcc-4.8-linaro_musl-1.1.2
toolchain-arm_gcc4.2.3
toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eab


I picked toolchain-arm_cortex-a9_gcc-4.9-linaro_musl-1.1.2_eabi as it's one of the few that does not enable hard fpu support.


From what I've found out you picked the right toolchain.
Are you using a 32 or 64-bit linux distro? I read somewhere that the supplied toolchains require a 64-bit distro. Maybe Kong or MastaG can confirm

_________________
AC-68U on Build 33525M
AC-68U on Build 33435M
AC-68U on Build 33010M
BFeely
DD-WRT Novice


Joined: 10 Jul 2014
Posts: 8

PostPosted: Mon Oct 20, 2014 11:22    Post subject: Reply with quote
wabe wrote:
tusc wrote:
Here's my attempt at creating an ARM script based on MastaG's mips version. I spent some time this afternoon on it but it's not complete.

It's erroring during the configure part (make -f Makefile.northstar configure )


I'm still trying to figure out which toolchain to use for ARM builds. There are 5 listed in the Toolchains folder:

Code:
toolchain-arm_cortex-a9_gcc-4.9-linaro_musl-1.1.2_eabi
toolchain-arm_cortex-a9+neon_gcc-4.9-linaro_musl-1.1.1_eabi
toolchain-armeb_xscale_gcc-4.8-linaro_musl-1.1.2
toolchain-arm_gcc4.2.3
toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eab


I picked toolchain-arm_cortex-a9_gcc-4.9-linaro_musl-1.1.2_eabi as it's one of the few that does not enable hard fpu support.


From what I've found out you picked the right toolchain.
Are you using a 32 or 64-bit linux distro? I read somewhere that the supplied toolchains require a 64-bit distro. Maybe Kong or MastaG can confirm

I believe the correct toolchain is toolchain-arm_cortex-a9_gcc-4.9-linaro_musl-1.1.2_eabi
wabe
DD-WRT Guru


Joined: 17 Jun 2006
Posts: 591

PostPosted: Tue Oct 21, 2014 12:18    Post subject: Reply with quote
tusc wrote:
Here's my attempt at creating an ARM script based on MastaG's mips version. I spent some time this afternoon on it but it's not complete.

It's erroring during the configure part (make -f Makefile.northstar configure )

Building ddwrt is not as trivial as openwrt (much more elegant build system). That's all I'm going to comment on it unless I want to get flamed.



Made a quick attempt using Kongs instructions with similar results. I clearly have a problem with some missing dependencies that most likely can be fixed using a few symlinks. I read that there might be a problem with gcc in this forum which of course would be a total showstopper.

_________________
AC-68U on Build 33525M
AC-68U on Build 33435M
AC-68U on Build 33010M
tusc
DD-WRT Novice


Joined: 14 Oct 2008
Posts: 19

PostPosted: Tue Oct 21, 2014 18:21    Post subject: Reply with quote
wabe wrote:
tusc wrote:
Here's my attempt at creating an ARM script based on MastaG's mips version. I spent some time this afternoon on it but it's not complete.

It's erroring during the configure part (make -f Makefile.northstar configure )


I'm still trying to figure out which toolchain to use for ARM builds. There are 5 listed in the Toolchains folder:

Code:
toolchain-arm_cortex-a9_gcc-4.9-linaro_musl-1.1.2_eabi
toolchain-arm_cortex-a9+neon_gcc-4.9-linaro_musl-1.1.1_eabi
toolchain-armeb_xscale_gcc-4.8-linaro_musl-1.1.2
toolchain-arm_gcc4.2.3
toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eab


I picked toolchain-arm_cortex-a9_gcc-4.9-linaro_musl-1.1.2_eabi as it's one of the few that does not enable hard fpu support.


From what I've found out you picked the right toolchain.
Are you using a 32 or 64-bit linux distro? I read somewhere that the supplied toolchains require a 64-bit distro. Maybe Kong or MastaG can confirm


Wabe,

I'm building under 64-bit Ubuntu 14.04.1

As you mentioned it appears the gcc version is in transition as Kong and BS work out the kinks with musl builds.
<Kong>
DD-WRT Guru


Joined: 15 Dec 2010
Posts: 3883
Location: Germany

PostPosted: Tue Oct 21, 2014 18:55    Post subject: Reply with quote
Currently (r25138) you can use toolchain-arm_cortex-a9_gcc-4.9-linaro_musl-1.1.2_eabi toolchain it works with the bins in the repo. This might change if BS updates the bins. Of course you need a 64Bit system.
gahelm
DD-WRT Novice


Joined: 18 Aug 2014
Posts: 16

PostPosted: Wed Oct 22, 2014 19:56    Post subject: Reply with quote
Cant seem to get past this when I run the MastaG Script.

>>
make[1]: *** No rule to make target `/home/xxxxxx/DEV/DD-WRT/src/router/register/register_check.o', needed by `libutils.so'. Stop.
make[1]: Leaving directory `/home/xxxxxx/DEV/DD-WRT/src/router/libutils'
make: *** [libutils] Error 2

Whoops.. something went wrong, please check the output and consult the forums..
>>

Any ideas? I confirmed the "register_check.o" file is not there so I have to assume it is not being built. Not sure which script should make that happen.

I'm beginning to think my development environment is not correct.
I'm running this on 64bit Ubuntu14.04LTS via VMPlayer on a windows 8.1 machine.
wabe
DD-WRT Guru


Joined: 17 Jun 2006
Posts: 591

PostPosted: Wed Oct 22, 2014 20:38    Post subject: Reply with quote
gahelm wrote:


Any ideas? I confirmed the "register_check.o" file is not there so I have to assume it is not being built. Not sure which script should make that happen.

I'm beginning to think my development environment is not correct.
I'm running this on 64bit Ubuntu14.04LTS via VMPlayer on a windows 8.1 machine.


Most likely missing host tools in your distro. You need to add missing packages, most likely by installing them with sudo apt-get install xxx.
I don't use Ubuntu, however

_________________
AC-68U on Build 33525M
AC-68U on Build 33435M
AC-68U on Build 33010M
wabe
DD-WRT Guru


Joined: 17 Jun 2006
Posts: 591

PostPosted: Thu Oct 23, 2014 13:18    Post subject: Reply with quote
wabe wrote:
tusc wrote:
Here's my attempt at creating an ARM script based on MastaG's mips version. I spent some time this afternoon on it but it's not complete.

It's erroring during the configure part (make -f Makefile.northstar configure )

Building ddwrt is not as trivial as openwrt (much more elegant build system). That's all I'm going to comment on it unless I want to get flamed.



Made a quick attempt using Kongs instructions with similar results. I clearly have a problem with some missing dependencies that most likely can be fixed using a few symlinks. I read that there might be a problem with gcc in this forum which of course would be a total showstopper.


Fail in the configure step i.e "make -f Makefile.northstar configure" on module glib20 with the following compile error. Cannot figure out what the problem is:

./localename.c: In function '_nl_locale_name_thread_unsafe':
./localename.c:2617:31: error: dereferencing pointer to incomplete type
name = thread_locale->__names[category];
^
make[4]: *** [localename.lo] Error 1
make[4]: Leaving directory `/~/DEV/src/router/glib20/gettext/gettext-runtime/intl'

Anyone knows?

_________________
AC-68U on Build 33525M
AC-68U on Build 33435M
AC-68U on Build 33010M
Goto page Previous  1, 2, 3, 4 ... 11, 12, 13  Next Display posts from previous:    Page 3 of 13
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum