Last active
January 15, 2018 02:26
-
-
Save brunomgalmeida/8e7e649204ca602be46288098dd19ace to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#http://www.dd-wrt.com/phpBB2/viewtopic.php?t=282831&start=435&sid=05c113416d737b2a58aa1a8708bb5e5b | |
#mount -o bind /mnt/sdb1 /jffs | |
#mount /dev/sda1 /jffs | |
mkdir -p /jffs/etc | |
mkdir -p /jffs/usr/local | |
mkdir -p /jffs/opt/bin/ | |
mkdir -p /jffs/tmp/ipkg/ | |
# Copy the contents of the current directories | |
cp -R /opt/* /jffs/opt/ | |
cp -R /usr/local/* /jffs/usr/local | |
cp -R /etc/* /jffs/etc/ | |
mount -o bind /jffs/opt /opt | |
mount -o bind /jffs/etc /etc | |
mount -o bind /jffs/usr/local /usr/local | |
# Removed mmc references | |
export PATH=/opt/sbin:/opt/bin:/opt/usr/sbin:/opt/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin | |
# Modify IPKG to remove passive | |
cp /bin/ipkg /opt/bin/ipkg | |
cd /opt/bin/ | |
sed -i 's|--passive-ftp ||g' ipkg | |
#echo $LD_LIBRARY_PATH | |
#unset LD_LIBRARY_PATH | |
# Removed mmc references | |
#export PATH=/opt/sbin:/opt/bin:/opt/usr/sbin:/opt/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin | |
# If we decide to not use mount --bind | |
# export PATH=/jffs/opt/sbin:/jffs/opt/bin:/jffs/sbin:/jffs/bin:/jffs/usr/sbin:/jffs/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/opt/sbin:/opt/bin:/opt/usr/sbin:/opt/usr/bin | |
cat /proc/cpuinfo | grep model | |
dmesg | grep -i bcm | |
#BROADCOM=https://downloads.openwrt.org/latest/bcm53xx/generic/packages/packages/ | |
#src bluering http://ipkg.nslu2-linux.org/feeds/optware/mbwe-bluering/cross/stable | |
#src openwrt http://ipkg.nslu2-linux.org/optware-ng/buildroot-armv5eabi-ng | |
#src ddwrt http://ipkg.nslu2-linux.org/optware-ng/buildroot-armeabi-ng/ | |
echo -e " | |
src entware http://pkg.entware.net/binaries/armv7/ | |
dest root /jffs | |
dest mmc /mmc | |
dest smbfs /tmp/smbshare | |
dest ram /tmp | |
export PATH=/opt/sbin:/opt/bin:/opt/usr/sbin:/opt/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin | |
" | tee /etc/ipkg.conf | |
ipkg update | |
ipkg install libcurl iperf mutt | |
# Configure mutt for gmail | |
# Create mount on startup script and store it in the USB | |
# in case the usb doesnt mount for some reason, the router won't behave wierd | |
echo " | |
mount -o bind /jffs/opt /opt | |
mount -o bind /jffs/etc /etc | |
mount -o bind /jffs/usr/local /usr/local | |
" | tee /jffs/mountme | |
chmod +x /jffs/mountme | |
nvram get rc_startup > /tmp/start_command | |
echo "sh /jffs/mountme" >> /tmp/start_command | |
nvram set rc_startup="`cat /tmp/start_command`" | |
nvram get rc_startup | |
# If happy with the commands, type | |
#nvram commit | |
# for v in `grep -o '$[A-Z_-]*' ipkgo | sort | uniq`; do echo "echo \"\\$v = $v"\"; done | |
# Thanks to isrkar | |
# http://www.dd-wrt.com/forum/viewtopic.php?t=282831&postdays=0&postorder=asc&start=435 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment