Re: Openwrt build for WNDR3700/WNDR3800
Two recent changes in my build & testing process:
1) I have bought also WNDR3700v2 with 16 MB flash, as long as they are on the market (before the Broadcom-based v3 will retire v2). I am switching that to be my main router, so in future I am daily running the v2 firmware builds myself, not the traditional v1 ones. I will keep also the v1 as a secondary router, possibly with WDS activated, so also the v1 firmware will get regular usage. (There is no practical difference in the firmwares, as the build process just makes both versions from identical kernel etc.)
2) I figured out an easy and secure way to attach my own configuration to the flashable firmware. I have been using a USB stick to store the needed files for both Backfire and Trunk, but I wanted to simplify the process, as I have been regularly switching between trunk & Backfire.
In practice I only need a couple of config files, as all other defaults are tailored to my needs already in the built firmware openly available in my FTP directory. The list of my config files is short: /etc/config/dhcp, firewall, luci_statistics, qos, wireless and radvd, /etc/dropbear/authorized_keys for having SSH key-based authentication and /etc/vsftpd.conf for FTP server.
I package those files with tar, separately for v1 & v2 and backfire & trunk, 4 filesets in total, each has size less than 4 kB.
That tar.gz file is then encrypted with ccrypt and included in the firmware (e.g. /etc/v1trunk.cpt and v2trunk.cpt in the trunk build.)
I am including the needed ccrypt package in the build.
Additionally, there is a short shell script for easy unpacking the settings file to /etc
This adds a few kilobytes to the firmware size, but not much. In practice, the size of the flashed firmware remained the same.
The unpacking script /etc/hnsettings.sh :
#!/bin/sh cp -f $1 /tmp/HNsettings.cpt if [ "$?" -eq 0 ] ; then ccdecrypt -vf /tmp/HNsettings.cpt if [ "$?" -eq 0 ] ; then tar -xzv -f /tmp/HNsettings -C /etc fi fi
Screenshot of a script run:
root@OpenWrt:~# cd /etc/ root@OpenWrt:/etc# ./hnsettings.sh v2trunk.cpt Enter decryption key: Decrypting /tmp/HNsettings.cpt config/ config/radvd config/network config/firewall config/luci_statistics config/qos config/wireless config/dhcp dropbear/ dropbear/authorized_keys vsftpd.conf root@OpenWrt:/etc#
This enables me to pretty easily restore all settings after a flash. Of course, should I change some settings permanently, I need to rebuild those encrypted settings archives.