Build for WNDR3700v1/v2 / WNDR3800


#1

I have built a rather minimalistic build for WNDR3700v1/v2 & WNDR3800 focusing just on the features I need. This is pretty much the basic IPv6 enabled router setup matching the WNDR3700v1/v2 & WNDR3800 hardware without too much additional fancy stuff.

The build is based on the master branch and the new stable 18.06 branch.

Current versions:

Branch Version
master master-r8684-f6e9f23771-20181210
openwrt-18.06 owrt1806-r7407-1cd945ea22-20181209

WNDR3700 firmware downloads are available in Dropbox:
Download site: https://www.dropbox.com/sh/t52c02rm20y8x9p/AABwMXTuLX6BGqC8-PDj-F7oa?dl=0

I only upload the versions after successfully flashing my own router, so the build has at least that much quality assurance process.

Full configuration and source code diffs included, in case somebody wants to utilize info in own builds.
See the patch files included in each build's download directory.

Good ipv6 support is now standard in Openwrt/LEDE, so I am dropping the IPv6 from the title. Documentation for the ipv6 configuration can be found at http://wiki.openwrt.org/doc/uci/network6

Features included:

  • LuCI with HTTPS SSL support
  • USB storage automounting
  • Support for various file systems to enable most drives: ext2/3/4, FAT, HFS+, CIFS/SMB, (NTFS read-only)
  • WiFi button works to toggle Wifi on or off
  • WPS button works to enable automatic Wifi-authentication with WPS-enabled devices
  • Reset button works
  • IPv6: tunnel support for 6in4, 6to4 and 6rd included in the build.
  • QoS for traffic control The 'sqm-scripts' package is included, but initially disabled, as max speed needs to be adjusted to WAN connection speed
  • DynDNS support, also in LuCI
  • VSFTPD FTP server package with TLS/SSL support (access initially disabled by "local_enable=NO" in vsftpd.conf)
  • Adblock package (initially disabled)
  • Wake-on-LAN (WOL) LuCI module
  • Nano text editor
  • EFI/GUID partitions supported
  • ccrypt package included for file encryption
  • r35964: added script helping to reinstall add-on packages after sysupgrade.
    See /etc/reinstall-packages.sh
  • r36467: iptables-mod-ipsec (and kmod-ipt-ipsec) included
  • r39183: WPS pin code set to the original value given by Netgear in the label at the router's bottom
  • r42673: miniupnpd settings: leave upnp off by default in /etc/config/upnp
  • r48730: Add support for 'adblock' with LuCI interface (adblock is initially disabled)
  • r49379 Change Luci to use Openssl instead of Polarssl
  • lede-r1297: adjust to sha256sums instead of md5sums in build scripts
  • lede-r1298: show also sha256 checksum for sysupgrade in Luci

Note: these packages are NOT in v1, but only in v2 and 3800 in the master build:

  • vsftpd-tls tree fs-hfsplus fs-ntfs wake-on-lan upnp Material-theme

Note: As I build with standard kernel options, the release and snapshot modules should be compatible with my builds, in case somebody wishes to add modules to my build.

Note: A special version of my firmware that has the mtd write-protection removed from u-boot, u-bootenv and art partitions is available in subdirectory art_partition_binary_contents / firmware_with_no_write_protection. That enables you to edit/overwrite u-boot and art. That is highly dangerous and can permanently brick the router. But it might still be needed at some recovery operation...

---- Instructions for re-creating my build environment are in the next message ----


WNDR3700 or WNDR3800 or ? - what did I just buy?
LEDE as L2TP VPN client
Build for Netgear R7800
After installing 17.01.4 on my wndr3700 I get ip address of 64.121.xxx.x
Bricked, due to "Error relocating /bin/ubus: uloop_run: symbol not found"
WNDR3700v1 wifi radios not detected
Time limit for editing old messages is two months?
Page Faults in DMESG? (simple-adblock, dnsmasq, 17.01.0, WNDR3800)
I need WNDR3700v2 u-boot
#2

Instructions how to re-create my build environment in Ubuntu x64.

  • Updated at r48035 to support only git as the main repository and feeds.

Since r34827 my firmware release contains also a script to re-create my full build environment in a few minutes.

The creation script handles trunk and branches (like C15.05) separately and only builds the environment for one of them. The creation script runs pretty automatically. The needed few steps are:

  • Create the base directory (I use /Openwrt) and make it writable by your normal user account (non-root)
  • Download from my newest firmware the newBuildroot.sh file and the four *.patch files to /Openwrt
  • Run newBuildroot.sh. It creates the complete build environment
  • Build firmware with hnscripts/updateNmake.sh

Detailed explanation of the steps in the build environment creation process :

  1. Create the base directory (like e.g. /Openwrt) to your buildhost. chown/chmod that directory to be writable by your normal user account (chmod 755). Buildroot will be created in in that directory, e.g. /Openwrt/lede or /Openwrt/chaos

  2. Download the "newBuildroot.sh" file from my newest firmware build package to /Openwrt and chmod "newBuildroot.sh" to be executable

  3. Download the firmware's four patch files: -main.patch, -packages.patch, -luci.patch and -routing.patch to /Openwrt. Note that the trunk build environment needs the trunk patches, and correspondingly the Chaos Calmer environment needs the Chaos Calmer patches.

  4. Verify that "newBuildroot.sh" references the correct patches: Check that the FILESTAMP variable definition matches the timestamp in actual patch names.

  5. Run "newBuildroot.sh". It installs the needed prerequisite packages to Ubuntu, creates trunk or chaos git repository and downloads the feeds' sources, patches them and also adds the new files to version control as well as chmods the known script files to be executable.

  • If patch names are correctly set in"newBuildroot.sh", all sources will get patched by the script. Main source needs to be patched first, as that patch possibly contains changes to feeds.conf.defaults. Then it updates the feeds (packages, luci, routing), patches the feed files and finally installs the packages from feeds with "scripts/feeds install -a".
  • Check the attributes of the possible script files added by the patches and chmod them executable, if needed. e.g. /etc/reinstall-packages.sh and other scripts in /etc
    Note: Since the new button hotplug procd functionality also the button scripts in /etc/rc.button need to be executable. (E.g. files/etc/rc.button/BTN_2)
  • Verify that the build script files located in /hnscripts are executable and have been added to version control.
  • Verify that the new files have been added to git tracking. The script has commands for the "files" directory & ".config.init", but you should check if there are other unknown files added by the patches. The script tries to automatically include the noticed new files created by the patches.
  1. Copy possibly needed additional files and prepare the build system:
  • Copy extra custom files to /files . E.g. your personal settings to be the included in the firmware.
  • Copy build keys to if you want to maintain the same build key in the new environment
  • Possibly also create a file share for transferring files. For example, I need /media/windows-share to easily move files from Virtualbox to PC.
  • Additionally, I need to set git options (username etc.) and to set minor OS options like gedit not producing backup files etc.

Steps 1-5 should be done automatically by the script, but verify the results :wink:

After this you should have an identical build environment as I have. I have actually recreated my current build environment several times with this process.

Note: The -main.patch also contains the device profile recipe ".config.init" with all the needed package selections and all build scripts used in my build environment.

Steps in the actual firmware build process in /Openwrt/trunk:

  1. Copy .config.init as the new .config to initialize the build profile: cp .config.init .config
    ("make defconfig" will expand the recipe to a full .config . You can run that command also manually.)
  2. Do the actual make: hnscripts/updateNmake.sh
  3. transfer files from bin/ar71xx to wherever you need them. I use a script: hnscripts/mountNcopy.sh

Explanation of the scripts in /hnscripts:

  • updateNmake.sh is the main build script that updates sources and builds the firmware
  • mountNcopy.sh is the script that I use to copy firmware files to my PC
  • newBuildroot.sh is the build environment creation script
  • Other scripts (timestampVersion, parallelcompile, singlecompile, kernelcompile, copypackages2tmp) are just helpers. createbuildinfo.sh creates the firmware release package with docs & patches and is automatically called at the end of a build. (Usually there is no need to call that manually.)

New category - something like "Community Builds & Packages"
Build for Netgear R7800
Build scripts that document changes and enable easy re-creation of build environment
Build for WRT3200ACM (Discontinued)
#3

@hnyman, could I pick your brain on your builds? You include extra packages in your images compared to the stock builds, how do you maintain compatibility with LEDE/OpenWrt's package repos?

I have noticed myself that e.g. when I build with package set for router A and another for router B, even though they're both ar71xx, I cannot have router B pull from router A's repo. So I'm considering running stock builds for all the hardware and then repackaging with the Image Generator, so all the images can use the same repository; just wondering if there's a better way to go at it.

Thanks!


#4

I keep separate build environments for LEDE, DD trunk and CC15.05 builds. And I compile only those packages that I include in the firmware image, so I don't try to download packages later from my own package repo. I build with standard kernel options, so I can download userspace packages from the respective snapshot repos, if needed.

I always build the firmware from scratch (after "make clean") starting from a short .config recipe that gets expanded to a full .config (which practice takes care of any possible changes in dependencies and in global defaults included in .config)

What do you mean that you can't "have router B pull from router A's repo" ? A signing checksum error? Some other error? I think that in principle you should be able to pull from any repo as long as the key used to sign the package list there is included in the firmware. So, you should make sure that you use the same key in both builds. (I have actually copied the same "key-build" and "key-build.pub" files for all my three builds.)


#5

Thanks. Yeah, they're signing checksum errors. I use a single build environment (with ./scripts/env for different configs), I'm only building LEDE trunk myself. I haven't generated any keys, I thought those were auto-generated?

Edit: well nevermind me... It seems the errors were due to stale mips_34kc entries in opkg.conf :flushed:


#6

[quote="Borromini, post:5, topic:64"]
I haven't generated any keys, I thought those were auto-generated?
[/quote]Yes, if there are no keys, the build system generates them on the first use. But you can copy the keys to/from another build system if you want to ensure that both use the same keys.

Good to hear that you got it solved.


#7

Now that you are moving to a new router .. will you keep on updating this build? Been running your builds for as long as I can remember .. and never had any issue's with them :+1: :clap:


#8

Likely yes, but with less intensity. I currently run R7800 as the main router and have a WNDR3700 running as a second unit to check this build. (R7800 has more powerful wifi, so I do not have an actual need for the second router any more)

Regarding WNDR3700, I will likely build LEDE rather often as there is continuous development, but will decrease the activity on Openwrt trunk and CC15.05 versions, as there is not much development happening.


#9

Hello. I really appreciate your hard work on these builds. I was wondering where i can find - LEDE master: lede-r2438-a245772-20161205 as stated in the post. It doesn't appear to be on the dropbox location.


#10

Hello. I really appreciate your hard work on these builds. I was wondering where i can find - LEDE master: lede-r2438-a245772-20161205 as stated in the post. It doesn't appear to be on the dropbox location.

clone the git repository (available at
https://github.com/lede-project/source.git among other places) and look for
commit a245772

David Lang


#11

I removed that newest version from the download server after I noticed a problem with the new ddns package version. But I was lazy and did not edit the forum message. Christian has prepared a bugfix for ddns and that is already in the packages repo, so I will likely compile today the next version.

EDIT:
Now there is lede-r2438-a245772-20161206 that contains the fixed DDNS package.


#12

Just noticed the update. Thanks again for doing all the build work.


#13

Apparently discourse prevents editing messages that are at least two months old. So at the moment I can't edit the first message any more.

EDIT: editing old message was enabled again. Great.


#14

Newest version lede-r2752-2a72a916ab-20170104-musl1116 has been compiled with musl clib 1.1.16 that is not yet the default in buildbot, so no add-on packages can be installed at the moment.


#15

there is some very weird problem going on. I don't know why but stunnel doesn't work on this builds
I have even compiled latest LEDE Reboot SNAPSHOT r3061 and it has the same issue

root@lede:/etc/stunnel# stunnel
Error relocating /usr/bin/stunnel: COMP_zlib: symbol not found
root@lede:/etc/stunnel#

/etc/init.d/stunnel starts doesn't work either.

I managed to complain on IRC :slight_smile: but everybody assured me that its working for them diizzy even compiled his one and said it is working. hmm.


#16

My build does not have stunnel, so this is offtopic. And I do not want to make this thread to a general help thread :frowning:

But despite that preword, some hints for you:

  • installing snapshot packages to private builds is always uncertain, as package, toolchain & tools options change sometimes sneakily breaking compatibility. It is better to build everything by yourself. Does it not work for you when you compile the build that has stunnel included by yourself?
  • When you build something and it fails to compile or work, re-compile it again after "make dirclean". Normal "make clean" (that you should run before each build) does not clear tools & toolchain. Dirclean clears them also. Last week has seen so many rather major changes on tools, toolchain, Makefile etc., thatdoing a full "make dirclean" is a necessity.

Pure guess, but I think that your problem may have been introduced by recent changes that have breaked package compatibility but without flagging the incompatibility (https://git.lede-project.org/?p=source.git;a=commit;h=da5d060ac9171029cfde61ee45aa417696e45da0
and https://git.lede-project.org/?p=source.git;a=history;f=include/package-ipkg.mk;hb=f784b3e195cf5932347f0c2297b8604da93d12e3 ).

A fix a few hours ago may have fixed it: https://git.lede-project.org/?p=source.git;a=commitdiff;h=f784b3e195cf5932347f0c2297b8604da93d12e3;hp=d9b1a55239dea616515426a705c00961dd7d0dd1


#17

LEDE 17.01: lede1701-r3043-31b0640906-20170130

LEDE 17.01.0-rc1 is being currently compiled by the buildbot. This build should match it rather closely.


#18

lede1701-r3141-02515f0187-20170210
I backported LuCI support for 802.11r and 802.11w wireless config to my 17.01 build.

In case somebody is interested to implement that for their own 17.01 builds, the needed commits are available in https://github.com/openwrt/luci/pull/998


#19

LEDE 17.01: lede1701-r3205-59508e309e-20170221 (match to 17.01.0 release)

The 17.01 build r3205-59508e309e matches the 17.01.0 release that is being compiled by the buildbot and should be formally released in the next few days.


#20

I can not find the commit the builds are based on anymore?

GitHub reports We couldn’t find any commits matching 'eb09d79c16'