DGND3700 V1 Transmission Firmware Build

From richud.com
Jump to navigation Jump to search


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

Patches / Additions / go.sh Bundle DGND3700_xxxxxx.BUILD.tar.gz

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
│   │ <SNIP>
│   └── watch.sh
├── DGND3700_build_instructions.txt
├── DGND3700_src.tar
├── go.sh
├── patches
│   ├── busybox_mdev.c.patch
│   ├── curl_Makefile.in.patch
│   │ <SNIP>
│   ├── userspace_gpl_apps_Makefile.patch
│   └── userspace_project_gpl_Makefile.patch
├── sources
│   ├── avahi-0.6.31.tar.gz
│   ├── busybox-1.21.0.tar.bz2
│   │ <SNIP>
│   ├── 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
#!/bin/bash
start=$(date)
build=$(date +%Y-%m-%d_%H:%M)

###########
#Base paths
###########
ROOT="$(pwd)"

sources="$ROOT/sources"
additions="$ROOT/additions"
patches="$ROOT/patches"
backup="$ROOT/backup"

apgpl="$ROOT/DGND3700/userspace/ap/gpl"
gplapps="$ROOT/DGND3700/userspace/gpl/apps"

fssrc="$ROOT/DGND3700/targets/fs.src"
fsinstall="$ROOT/DGND3700/targets/DGND3700/fs.install"

######
#Clean
######
[[ -d  "$ROOT/DGND3700" ]] && { echo "Deleting existing build";rm -rf "$ROOT/DGND3700"; }


#####################
#Extract GPLd Source
#####################
echo "Extracting original firmware source"
tar xf "$ROOT/DGND3700_src.tar" --exclude="*/minidlna/*" --exclude="*/samba-3.0.13/*" --exclude="*/openssl/*" --exclude="*/busybox/*"

########
#Cleanup
########
echo "Cleaning obsolete remnants from unclean target"
rm -f "$fsinstall/bin/automount" \
"$fsinstall/bin/pppd" \
"$fsinstall/usr/sbin/ddnsd" \
"$fsinstall/usr/sbin/telnetenabled" \
"$fsinstall/usr/sbin/udhcpd" \
"$fsinstall/usr/sbin/udhcpc" \
"$fsinstall/usr/sbin/timesync" \
"$fsinstall/sbin/ntpclient" \
"$fsinstall/usr/bin/mtools"

#################
# Extract Sources
#################
echo "Making new directories"
mkdir -p "$apgpl/mdlna" "$fsinstall/www/"

echo "Extracting new sources"
tar -zxf "$sources/arp-scan-1.9.tar.gz" -C "$apgpl"
tar -zxf "$sources/Automatic-0.8.3.tar.gz" -C "$apgpl"
	pushd "$apgpl/Automatic-0.8.3" ; ./autogen.sh > /dev/null ; popd
tar -zxf "$sources/avahi-147cdce.tar.gz" -C "$apgpl"
	mv "$apgpl/avahi-147cdce" "$apgpl/avahi-0.6.32"
	pushd "$apgpl/avahi-0.6.32" ; NOCONFIGURE=1 ./autogen.sh >/dev/null; popd
tar -zxf "$sources/bbe-0.2.2.tar.gz" -C "$apgpl"
tar -jxf "$sources/busybox-1.22.1.tar.bz2" -C "$gplapps"
tar -jxf "$sources/curl-7.35.0.tar.bz2" -C "$apgpl"
tar -zxf "$sources/dhcpdump-1.8.tar.gz" -C "$apgpl"
tar -Jxf "$sources/dnsmasq-2.72.tar.xz" -C "$apgpl"
#tar -jxf "$sources/dropbear-2014.65.tar.bz2" -C "$apgpl"
unzip -q "$sources/dropbear-master.zip" -d "$apgpl"
	mv "$apgpl/dropbear-master" "$apgpl/dropbear-2014.66"
	pushd "$apgpl/dropbear-2014.66" ; autoconf; autoheader > /dev/null ; popd
tar -zxf "$sources/e2fsprogs-1.42.9.tar.gz" -C "$apgpl"
tar -zxf "$sources/expat-2.1.0.tar.gz" -C "$apgpl"
#tar -jxf "$sources/ffmpeg-2.2.3.tar.bz2" -C "$apgpl/mdlna"
tar -jxf "$sources/ffmpeg-2.0.4.tar.bz2" -C "$apgpl/mdlna"
tar -Jxf "$sources/flac-1.3.0.tar.xz" -C "$apgpl/mdlna"
tar -zxf "$sources/fuse-2.7.6.tar.gz" -C "$apgpl"
tar -zxf "$sources/igmpproxy-0.1.tar.gz" -C "$apgpl"
tar -zxf "$sources/inadyn-mt.v.02.24.43.tar.gz" -C "$apgpl"
tar -zxf "$sources/jpegsrc.v9.tar.gz" -C "$apgpl/mdlna"
tar -zxf "$sources/libdaemon-0.14.tar.gz" -C "$apgpl"
tar -zxf "$sources/libevent-2.0.21-stable.tar.gz" -C "$apgpl"
tar -jxf "$sources/libexif-0.6.21.tar.bz2" -C "$apgpl/mdlna"
tar -zxf "$sources/libid3tag-0.15.1b.tar.gz" -C "$apgpl/mdlna"
tar -zxf "$sources/libnfsidmap-0.25.tar.gz" -C "$apgpl"
tar -Jxf "$sources/libogg-1.3.1.tar.xz" -C "$apgpl/mdlna"
tar -zxf "$sources/libpcap-1.5.3.tar.gz" -C "$apgpl"
tar -Jxf "$sources/libvorbis-1.3.4.tar.xz" -C "$apgpl/mdlna"
tar -zxf "$sources/libxml2-git-snapshot.tar.gz" -C "$apgpl"
tar -zxf "$sources/minidlna-1.1.4.tar.gz" -C "$apgpl/mdlna"
#unzip -q "$sources/minidlna-git-75a697a6711debbfc9b101a7ea95440a3faead90.zip" -d "$apgpl/mdlna"
#	mv "$apgpl/mdlna/minidlna-git-75a697a6711debbfc9b101a7ea95440a3faead90" "$apgpl/mdlna/minidlna-1.1.4"
#	pushd "$apgpl/mdlna/minidlna-1.1.4" ; ./autogen.sh > /dev/null ; popd
tar -zxf "$sources/mini_snmpd-1.2b.tar.gz" -C "$apgpl"
tar -jxf "$sources/nfs-utils-1.3.0.tar.bz2" -C "$apgpl"
tar -zxf "$sources/ntfs-3g_ntfsprogs-2014.2.15.tgz" -C "$apgpl"
tar -zxf "$sources/openssh-6.6p1.tar.gz" -C "$apgpl"
tar -zxf "$sources/openssl-1.0.2-beta3.tar.gz" -C "$apgpl"
	mv "$apgpl/openssl-1.0.2-beta3" "$apgpl/openssl-1.0.2"
	pushd "$apgpl/openssl-1.0.2" ; ./Configure shared zlib-dynamic linux-mips32 >/dev/null ; popd
tar -Jxf "$sources/openvpn-2.3.4.tar.xz" -C "$apgpl"
tar -jxf "$sources/p910nd-0.95.tar.bz2" -C "$apgpl"
tar -zxf "$sources/pcre-8.33.tar.gz" -C "$apgpl"
tar -zxf "$sources/portmap_6.0.orig.tar.gz" -C "$apgpl"
tar -zxf "$sources/samba-3.6.24.tar.gz" -C "$apgpl"
tar -zxf "$sources/sqlite-autoconf-3080600.tar.gz" -C "$apgpl/mdlna"
tar -Jxf "$sources/strace-4.7.tar.xz" -C "$apgpl"
tar -zxf "$sources/tcpdump-4.5.1.tar.gz" -C "$apgpl"
tar -Jxf "$sources/transmission-2.84.tar.xz" -C "$apgpl"
tar -zxf "$sources/watchdog-5.13.tar.gz" -C "$apgpl"
tar -zxf "$sources/wol-0.7.1.tar.gz" -C "$apgpl"
tar -Jxf "$sources/zlib-1.2.8.tar.xz" -C "$apgpl/mdlna"

###########
##Additions
###########
echo "Copying stuff not practicable to patch or new"
cp "$additions/adsl_phy_A2pv6C035m.bin" "$ROOT/DGND3700/bcmdrivers/broadcom/char/adsl/impl1/adsl_phyDGND3700.bin_save" #ADSL binary blob from beta 0.20 firmware
cp "$additions/busybox.config" "$gplapps/busybox-1.22.1/.config" #busybox config
cp "$additions/mdlna.Makefile" "$apgpl/mdlna/Makefile" #new minidlna Makefile 
tar -zxf "$additions/nat5.tar.gz" -C "$apgpl" #special acos lib manipulator
cp -R "$additions/etc" "$fssrc" #etc and etc/init.d scripts
cp -R "$additions/pxe" "$fsinstall/usr" #pxe boot files
cp "$additions/DEV_device.htm" "$fsinstall/www/" #modified attached devices page

###############
#BINARY PATCHES
###############
echo 'Patch /sbin/acos_service to change resolver file name, repurpose deprecated udhcpc hostname -H option via corresponding nvram var system_name. Stop pointless dsldiagd starting'
#heartbeat calls 'acos_service stop_wan' , something happens in middle of process ; read resolve.auto, output to resolv.tmp, delete resolve.auto, mv resolve.tmp resolve.auto. 
#This ends with chopped or deleted resolve.auto and breaks it forevermore. removing resolv.tmp stops stops it being tried.
bbe \
-e 's#/tmp/resolv.tmp#\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0#' \
-e 's#resolv.conf#resolv.auto#' \
-e 's#-H#\0\0#' \
-e 's#dsldiagd &#\0\0\0\0\0\0\0\0\0\0#' \
-o "$fsinstall/sbin/acos_service" "$additions/acos_service.20"

echo 'Patch /sbin/bd to stop killing syslogd, dnsmasq, udhcpd, smbd, nmbd and nuking whole of /var/run/*.pid, change killing of dnsmasq and udhcpd into dnsmasq restart'
bbe \
-e 's#rm -rf /tmp/var/run/*.pid#\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0#' \
-e 's#rm -rf /var/run/*#\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0#' \
-e 's#killall udhcpd\0\0killall dnsmasq\0/tmp/resolv.conf#/etc/init.d/dnsmasq.sh restart\0\0/tmp/resolv.auto#' \
-e 's#killall smbd#\0\0\0\0\0\0\0\0\0\0\0\0#' \
-e 's#killall nmbd#\0\0\0\0\0\0\0\0\0\0\0\0#' \
-e 's#killall syslogd#\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0#' \
-o "$fsinstall/sbin/bd_" "$fsinstall/sbin/bd"
mv "$fsinstall/sbin/bd_" "$fsinstall/sbin/bd"

echo 'Patch /usr/sbin/httpd for RIP - repurpose deprecated <%40%> and build date insertion'
bbe \
-e 's#nvram_get("dlna_auto_scan_content")\;#nvram_get("rip_dir")\;\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0#' \
-e "s#V1.0.0.17\0#$(date -I)#" \
-e "s#/tmp/minidlna.conf#/tmp/change_config#" \
-o "$fsinstall/usr/sbin/httpd_" "$fsinstall/usr/sbin/httpd"
mv "$fsinstall/usr/sbin/httpd_" "$fsinstall/usr/sbin/httpd"

echo 'Patch to disable subnet check for openVPN so can access from 10.8.0.1 , offset 0xF1A0'
printf '\x10\x00' | dd of="$fsinstall/usr/sbin/httpd" bs=1 seek=$((0xF1A0)) count=2 conv=notrunc

echo 'Patch /lib/libacos_shared.so to generate arp data table, called from httpd'
bbe \
-e "s#cat /proc/net/delatta#/etc/arp_tab.sh\0\0\0\0\0\0#" \
-o "$fsinstall/lib/libacos_shared.so_" "$fsinstall/lib/libacos_shared.so"
mv "$fsinstall/lib/libacos_shared.so_" "$fsinstall/lib/libacos_shared.so"


echo 'Patch /usr/sbin/heartbeat for wan-up action'
bbe \
-e 's#cp /proc/net/dev /tmp/wan_dev#/tmp/wan-up.sh &\0\0\0\0\0\0\0\0\0\0\0\0\0#' \
-o "$fsinstall/usr/sbin/heartbeat_" "$fsinstall/usr/sbin/heartbeat"
mv "$fsinstall/usr/sbin/heartbeat_" "$fsinstall/usr/sbin/heartbeat"

echo 'Patching /bin/lld2d to stop it randomly breaking the LAN Device Name , aka nvram var friendly_name'
bbe \
-e 's#802.11 Broadcom Reference#DGND3700\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0#' \
-e "s#V1.0.0.17\0#$(date -I)#" \
-o "$fsinstall/bin/lld2d_" "$fsinstall/bin/lld2d"
mv "$fsinstall/bin/lld2d_" "$fsinstall/bin/lld2d"

echo "Creating verstamped logo" #WWW logo need ImageMagick
convert "$additions/settings_dgn2200.JPG" -gravity SouthWest -pointsize 8 -annotate +5+5 "DGND3700_A_D ${build}" "$fsinstall/www/settings_dgn2200.JPG" 
convert "$additions/settings_dgn2200.JPG" -gravity SouthWest -pointsize 8 -annotate +5+5 "DGND3700_A_D ${build}" -resize 640x480 -gravity north -background black -extent 640x480 "$fsinstall/usr/pxe/background.jpg"

#####
#LIBS
#####
echo "Copying toolchain core libs"
cp -a /opt/toolchains/uclibc-crosstools-gcc-4.2.3-3/lib/*.so* "$fsinstall/lib"
cp -a /opt/toolchains/uclibc-crosstools-gcc-4.2.3-3/usr/mips-linux-uclibc/lib/lib[sg][sc]*.so* "$fsinstall/lib"

############
#Permissions
############
echo "Set all modified binaries and shell scripts executable"
find "$fssrc/etc/" -name "*.sh" -exec chmod 755 {} \;
chmod -R 755 "$fsinstall/bin" "$fsinstall/sbin" "$fsinstall/usr/sbin"

########
#PATCHES
########
echo "Applying patches"
for i in $(ls "$patches/"*\.patch)
do
	echo ">>> PATCHING $i >>>"
	patch --binary -E -N -p0 < "$i"
	[[ $? -eq 0 ]] && echo "<<< OK PATCHED $i <<<" || { echo "*** FAILED *** Patching $i";exit 1; }
done

echo "Applying tytso ext4 backports"
patch --binary -E -N -p1 --directory="$ROOT/DGND3700/kernel/linux" < "$patches/tytso-ext4/2.6.21-ext4-1"


echo "Applying 3rd party patches wl500-oleg/kernel"
for i in $(ls "$patches/wl500-oleg/"*\.patch)
do
	echo ">>> PATCHING $i >>>"
	patch --binary -E -N -p1 -l --directory="$ROOT/DGND3700/kernel/linux" < "$i"
	[[ $? -eq 0 ]] && echo "<<< OK PATCHED $i <<<" || { echo "***FAILED*** Patching $i";exit 1; }
done

echo "Applying 3rd party patches wl500-oleg/igmpproxy"
for i in $(ls "$patches/wl500-oleg/igmpproxy/"*\.patch)
do
	echo ">>> PATCHING $i >>>"
	patch --binary -E -N -p1 -l --directory="$ROOT/DGND3700/userspace/ap/gpl/igmpproxy-0.1" < "$i"
	[[ $? -eq 0 ]] && echo "<<< OK PATCHED $i <<<" || { echo "***FAILED*** Patching $i";exit 1; }
done

# ** needs further investigation due to LED/gpio breakage
#echo "Applying 3rd party patches wl500-oleg MIPS"
#for i in $(ls "$patches/wl500-oleg/linux-mips/"*\.patch)
#do
#	echo ">>> PATCHING $i >>>"
#	patch --binary -E -N -p1 -l --directory="$ROOT/DGND3700/kernel/linux" < "$i"
#	[[ $? -eq 0 ]] && echo "<<< OK PATCHED $i <<<" || { echo "***FAILED*** Patching $i";exit 1; }
#done

######
#BUILD
######
cd "$ROOT/DGND3700"
export PATH=${PATH}:/opt/toolchains/uclibc-crosstools-gcc-4.2.3-3/usr/bin
make PROFILE=DGND3700

echo "Started:" $start
echo "Finished:" $(date)

#######
#BACKUP
#######
cd "$ROOT"
[[ -d  "$backup" ]] || mkdir -p "$backup"
tar zcf "$backup/DGND3700_$build.BUILD.tar.gz" -C "$ROOT" "additions" "patches/"*.patch "patches/wl500-oleg/"*.patch "patches/wl500-oleg/igmpproxy/"*.patch "patches/wl500-oleg/linux-mips/"*.patch "go.sh"
cp "$ROOT/DGND3700/images/"DGND3700_* "$backup/"

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

blog comments powered by Disqus


See Also