DGND3700 V1 Transmission Firmware Build

=Build prerequisites=
 * The following 5 things are needed to build (general build programs, original Netgear GPL source, my buildscript/patches/additions, fixed Netgear toolchain, [all] the program sources

General Build programs
Depending on your system, these or others may be needed sudo apt-get install autoconf automake bison flex autopoint libtool libglib2.0-dev intltool bbe imagemagick

You may also need some 32bit programs if you are using a 64bit system (ia32-libs or ia32-libs-multiarch packages <= 13.04 amd64)

Ubuntu 13.10 amd64
now ia32-libs has been replaced with these sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6

Ubuntu 14.10 amd64 and above
now make 4 (default) needs to be replaced with make 3.8 to work - get the .deb and install. wget http://de.archive.ubuntu.com/ubuntu/pool/main/m/make-dfsg/make_3.81-8.2ubuntu3_amd64.deb sudo dpkg -i make_3.81-8.2ubuntu3_amd64.deb

Ubuntu 15.10 amd64
lib32bz2-1.0

is replaced with

libbz2-1.0:i386

thus

sudo apt-get install lib32z1 lib32ncurses5 libbz2-1.0:i386 lib32stdc++6

Netgear's original GPL firmware source bundle
DGND3700_V1.0.0.17_1.0.17_src_full.zip

Latest Version
DGND3700_2014-10-26_19:00.BUILD.tar.gz 1.8 MB

Previous Versions
DGND3700_2014-05-29_16.49.BUILD.tar.gz

DGND3700_2014-03-15_09.22.BUILD.tar.gz

DGND3700_10121522_A_D.BUILD.tar.gz

DGND3700_09121810_A_D.BUILD.tar.gz

DGND3700_06101913_A_D.BUILD.tar.gz

Toolchain to cross compile to MIPS
uclibc-crosstools-gcc-4.2.3-3-16-feb-2013.tar.gz

... Or you can build it yourself if you are feeling masochistic

Additional Source Dependencies
These are mainly updates from the original firmware (by years), some are new additions.


 * Please note this list is very likely to be out of date, check in go.sh for precise versions.

http://downloads.sourceforge.net/project/wake-on-lan/wol/0.7.1/wol-0.7.1.tar.gz http://downloads.sourceforge.net/project/p910nd/p910nd/0.97/p910nd-0.97.tar.bz2 http://members.aon.at/linuxfreak/linux/mini_snmpd-1.2b.tar.gz http://downloads.sourceforge.net/project/igmpproxy/igmpproxy/0.1/igmpproxy-0.1.tar.gz http://downloads.sourceforge.net/project/inadyn-mt/inadyn-mt/inadyn-mt.v.02.24.38/inadyn-mt.v.02.24.38.tar.gz http://downloads.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0.tar.gz http://www.thekelleys.org.uk/dnsmasq/dnsmasq-2.68.tar.xz http://downloads.sourceforge.net/project/e2fsprogs/e2fsprogs/v1.42.9/e2fsprogs-1.42.9.tar.gz http://downloads.sourceforge.net/project/bbe-/bbe/0.2.2/bbe-0.2.2.tar.gz http://avahi.org/download/avahi-0.6.31.tar.gz ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.33.tar.gz ftp://xmlsoft.org/libxml2/libxml2-git-snapshot.tar.gz http://curl.haxx.se/download/curl-7.35.0.tar.bz2 https://github.com/1100101/Automatic/archive/v0.8.3.tar.gz https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz http://download.transmissionbt.com/files/transmission-2.82.tar.xz http://downloads.sourceforge.net/project/strace/strace/4.7/strace-4.7.tar.xz http://downloads.sourceforge.net/project/fuse/fuse-2.X/2.7.6/fuse-2.7.6.tar.gz http://tuxera.com/opensource/ntfs-3g_ntfsprogs-2014.2.15.tgz http://ftp.samba.org/pub/samba/stable/samba-3.6.22.tar.gz http://downloads.sourceforge.net/project/nfs/nfs-utils/1.2.7/nfs-utils-1.2.7.tar.bz2 http://ftp.osuosl.org/pub/blfs/6.3/p/portmap-6.0.tgz http://www.citi.umich.edu/projects/nfsv4/linux/libnfsidmap/libnfsidmap-0.25.tar.gz http://www.busybox.net/downloads/busybox-1.22.1.tar.bz2 http://www.ffmpeg.org/releases/ffmpeg-2.0.2.tar.gz http://downloads.sourceforge.net/libexif/libexif-0.6.21.tar.bz2 http://downloads.sourceforge.net/project/libpng/zlib/1.2.8/zlib-1.2.8.tar.bz2 http://downloads.sourceforge.net/flac/flac-1.3.0.tar.gz http://www.ijg.org/files/jpegsrc.v9.tar.gz http://downloads.sourceforge.net/project/mad/libid3tag/0.15.1b/libid3tag-0.15.1b.tar.gz http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.xz http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.xz http://downloads.sourceforge.net/project/sqlite.mirror/SQLite%203.7.15.2/sqlite-autoconf-3080301.tar.gz http://downloads.sourceforge.net/project/minidlna/minidlna/1.1.2/minidlna-1.1.2.tar.gz http://mirror.ox.ac.uk/pub/OpenBSD/OpenSSH/portable/openssh-6.3p1.tar.gz https://matt.ucc.asn.au/dropbear/releases/dropbear-2013.56.tar.bz2

=How to build=

Extract main files
I created 'DGND3700_V1.0.0.17_1.0.17_src_full' arbitarily in my home folder as the main build/source folder, however it can be wherever you wish so long as the internal structure is the same and the toolchain is linked properly.

Below is created by extracting the Netgear .zip source, my patches/additions .tar.gz, my toolchain .tar.gz, creating 'sources' folder and downloading them all into it. (the versions must all be the same)

/home/xxxx/Downloads/DGND3700_V1.0.0.17_1.0.17_src_full ├── additions │   ├── acos_service │   ├── adsl_phy.bin │  │  │   └── watch.sh ├── DGND3700_build_instructions.txt ├── DGND3700_src.tar ├── go.sh ├── patches │   ├── busybox_mdev.c.patch │   ├── curl_Makefile.in.patch │  │  │   ├── userspace_gpl_apps_Makefile.patch │   └── userspace_project_gpl_Makefile.patch ├── sources │   ├── avahi-0.6.31.tar.gz │   ├── busybox-1.21.0.tar.bz2 │  │  │   ├── transmission-2.77.tar.xz │   └── zlib-1.2.7.tar.bz2 └── uclibc-crosstools-gcc-4.2.3-3-16-feb-2013 ├── bin ├── lib ├── mips-linux -> mips-linux-uclibc ├── mips-linux-uclibc └── usr

Link toolchain
Create "/opt/toolchains/" and soft link your extracted toolchain (wherever it is) to "/opt/toolchains/uclibc-crosstools-gcc-4.2.3-3" (this path is hard coded into lots of Netgears sources.)

sudo mkdir -p /opt/toolchains sudo ln -s /home/xxxx/Downloads/DGND3700_V1.0.0.17_1.0.17_src_full/uclibc-crosstools-gcc-4.2.3-3-16-feb-2013/ /opt/toolchains/uclibc-crosstools-gcc-4.2.3-3

You should end up with something like this

/opt └── toolchains └── uclibc-crosstools-gcc-4.2.3-3 -> /home/xxxx/Downloads/DGND3700_V1.0.0.17_1.0.17_src_full/uclibc-crosstools-gcc-4.2.3-3-16-feb-2013/

Go! (Build it)
Once this has been created, simple run go.sh from terminal (in this example from /home/xxxx/Downloads/DGND3700_V1.0.0.17_1.0.17_src_full/go.sh), and all being well it should build in about 20 minutes (on my old Core2Duo).


 * If you are using Ubuntu you need to relink /bin/sh to /bin/bash, not /bin/dash [Update, using Ubuntu 13.10 amdx64 this wasn't necessary ?]

Post build structure
This structure should be created extra when go.sh has been ran.

'DGND3700/targets/DGND3700/fs' is the final output staging area

'DGND3700/images' sub folder contains the created .chk firmware.

/home/xxxx/Downloads/DGND3700_V1.0.0.17_1.0.17_src_full └── DGND3700 ├── bcmdrivers ├── data-model ├── hostTools ├── images ├── kernel ├── make.common ├── make.deprules ├── Makefile ├── make.voice ├── README ├── shared ├── targets ├── userspace └── version.make

=Further info=

This is a bit more info about my .tar.gz provided to build, i.e. Additions, Patches and go.sh.

go.sh
This is the main build script, (I call it 'go' because that historically is what I always use for my own scripts, so I can tell them apart from everything else!)


 * Deletes existing build if present, extracts original source
 * Extract the new/replacement source files
 * Copies the 'Additions' (binary files or files not worth doing as patches)
 * Patch lots of source files

Additions
For information about all the additional files (everything not in patches)

DGND3700 V1 Transmission Firmware Additions

Patches
Source file patches

DGND3700 V1 Transmission Firmware Patches

Rebuild
Ignore this, this is to create archive above fro my sources.

tar cvzf DGND3700_XXXXXXXX_A_D.BUILD.tar.gz --exclude="*~" --exclude="*/deprecated/*" go.sh additions patches

=Comments=

=See Also=