OpenWrt Forum Archive

Topic: Build for WNDR3700/WNDR3800

The content of this topic has been archived between 9 Jul 2013 and 6 May 2018. Unfortunately there are posts – most likely complete pages – missing.

Ah - so the wiki is only suggesting initial settings then. (http://wiki.openwrt.org/doc/uci/network6)

It shows ula_prefix==auto as the appropriate setting for native ipv6, and omits it for all other configurations. I guess it's safe to assume this can be ignored, unless I decide to actually use private addressing.

Noticed an odd difference between my 3700v1 and 3700v2 after installing r34586 on both. The initial LuCI "status" page is fine on the 3700v1, but on the 3700v2, the local time, uptime, load average and all 4 memory values are empty and simply display "-". Any ideas?

tt wrote:

Noticed an odd difference between my 3700v1 and 3700v2 after installing r34586 on both. The initial LuCI "status" page is fine on the 3700v1, but on the 3700v2, the local time, uptime, load average and all 4 memory values are empty and simply display "-". Any ideas?

Browser cache? Ctrl-F5 to clear it or whatever is correct for your browser. I noticed something similar about 7-10 days ago. Probably related to jow's changes to Luci .js files at that time.

Right you are, a different machine displays it properly. Cleared the firefox cache and it's back to normal on both. Thanks.

<question moved as suggested>

(Last edited by tt on 10 Dec 2012, 19:49)

tt wrote:

I've discovered that for my 6to4 interface, the ula_prefix setting needs to be removed from /etc/config/network6. Otherwise (at least with default settings) the ula_prefix private address is advertised as Global, and nodes on the network send via it.

Is this my configuration error, or a bug?

You should maybe ask that in the thread dedicated for the support for the new ipv6-support module...
https://forum.openwrt.org/viewtopic.php?id=40853

It is a brand new module, so the author (CyrusFF) needs more real-life feedback on the various functionalities and defaults.

(Last edited by hnyman on 10 Dec 2012, 19:48)

Hello hnyman,
Does your build supports ftp access? I tried unsuccessfully.

Manani wrote:

Hello hnyman,
Does your build supports ftp access? I tried unsuccessfully.

Yes, it has a FTP server (vsftpd), but as a security precaution I have disabled using local accounts by default.

--- trunk/feeds/packages/net/vsftpd/files/vsftpd.conf    (revision 34650)
+++ trunk/feeds/packages/net/vsftpd/files/vsftpd.conf    (working copy)
@@ -1,7 +1,7 @@
 background=YES
 listen=YES
 anonymous_enable=NO
-local_enable=YES
+local_enable=NO
 write_enable=YES
 local_umask=022
 check_shell=NO

Revert that option in your system's vsftpd config file, and the ftp server should accept root login credentials. Change that back to "local_enable=YES".

(Last edited by hnyman on 13 Dec 2012, 21:58)

Thank you. It's ok now.

I was able to get WDS mode to run ok with the new ipv6-support modules. The basic advice in wiki is still valid: http://wiki.openwrt.org/doc/recipes/atheroswds

In router1, the WDS master:
/etc/config/wireless:  mode is normal ap', set option 'wds' '1' for the existing wifi-iface section (I used the 5Ghz radio1)

In router2, the WDS slave:
/etc/config/dhcp: disable dhcp server (dnsmasq) by adding ignore 1 for LAN interface
/etc/config/network: change router's LAN IP for ipv4, make sure that there is option accept_ra '1', delete all ipv6 tunnel interface definitions
/etc/config/wireless: set option 'wds' '1' to the existing wifi-iface section, set mode to 'sta' (instead of 'ap')
/etc/config/network6: comment out everything with #, no functionality needed in this router

Those were the only changes needed. My PC was connected to router2 and got ipv4 & ipv6 addresses ok and the automatic routing through router1 to internet worked ok both for ipv4 & ipv6.

diff output about the key differences in router2 (excluding the deleted tunnel interfaces and commented network6):

--- /mnt/trunk/etc/config/wireless
+++ /etc/config/wireless
@@ -39,8 +39,9 @@
 config 'wifi-iface'
        option 'device' 'radio1'
        option 'network' 'lan'
-       option 'mode' 'ap'
+       option 'mode' 'sta'
        option 'ssid' 'WLANID'
        option 'encryption' 'psk2'
        option 'key' 'something'
        option 'wps_pushbutton' '1'
+        option 'wds' '1'
--- /mnt/trunk/etc/config/network
+++ /etc/config/network
@@ -9,7 +9,7 @@
        option 'ifname' 'eth0.1'
        option 'type' 'bridge'
        option 'proto' 'static'
-       option 'ipaddr' '192.168.1.1'
+       option 'ipaddr' '192.168.1.2'
        option 'netmask' '255.255.255.0'
        option accept_ra '1'

--- /mnt/trunk/etc/config/dhcp
+++ /etc/config/dhcp
@@ -19,6 +19,7 @@
        option 'limit' '150'
        option 'leasetime' '12h'
        option 'force' '1'
+       option 'ignore' '1'

 config 'dhcp' 'wan'
        option 'interface' 'wan'

EDIT: After ipv6.support configuration options changed in February 2013, the required syntax in /etc/config/network changed a bit, as accept_ra does not work any more. One needs to define a dhcpv6 interface for lan to make it work:

config interface 'lan'
        option ifname 'eth0.1'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.2'
        option netmask '255.255.255.0'
        option gateway '192.168.1.1'
        option dns '192.168.1.1'

config interface lan6
        option proto dhcpv6
        option ifname @lan
        option reqprefix no

(Last edited by hnyman on 3 May 2013, 10:44)

Hello Hnyman,

I'm stuck with conntrack-rtsp (package kmod-ipt-nathelper-rtsp). There's a dependency error on the kernel, and forcing its installation doesn't make it work.

I would need to build this pakage against your build (used to do that with arokh's build), but... here I reach my limits (dunno how to use the buildscripts and *.patch).

I read through the files and I *assume* I would need to run the buildscript against the proper source revision, but what should be the file structure?

I would gladly take any piece of advice smile

Etique wrote:

I would need to build this pakage against your build (used to do that with arokh's build), but... here I reach my limits (dunno how to use the buildscripts and *.patch).

I read through the files and I *assume* I would need to run the buildscript against the proper source revision, but what should be the file structure?

If you really want that module, I suggest that you build the whole firmware by yourself and modify my config to include that module. It is probably the easiest way.

If you check the buildscripts.txt file in my firmware archive, it contain all the scripts I use, including a script for re-creating the whole environment in Ubuntu 12.04 x64 environment.

Check the file: http://koti.welho.com/hnyman1/Openwrt/t … cripts.txt
It is a text file containing several shell scripts, which are pretty well identified: copyPackages2tmp.sh, createbuildinfo.sh, kernelcompile.sh, mountNcopy.sh, newOpenwrtBuildroot.sh, singlecompile.sh, updateNmake.sh, versionT.sh

Open that file with a text editor and save the script files.

Of those scripts, updateNmake.sh and createbuildinfo.sh are used in the actual build process.

newOpenwrtBuildroot.sh will create the new environment, and it contains the needed patch commands at the end (commented out in the archive, as the patch files' names will change along the version).

First manually create /Openwrt directory and make sure it is writable by your normal user account. Then run newOpenwrtBuildroot.sh. If needed, edit the patch commands in the end to use the correct version patches. The scripts generated both trunk and Attitude Adjustment envirnoments, as well as a local Luci repository, so it matches my full setup for creating both firmware versions (trunk & Attitude).

After running that you go into /Openwrt/trunk and copy the file .config.init to .config to create the recipe for my config. After that you just run updateNmake.sh, which will do the actual make process.

newOpenwrtBuildroot.sh:

#!/bin/sh
#
# newOpenwrtBuildroot.sh
#
# Creates Openwrt build environment, with /Openwrt as the root. Create /Openwrt first manually
# subdirs trunk, attitude branch, local luci sources and dl for downloads
# sets up the svn repositories for trunk, attitude and luci
 
### Prerequisites installed for buildroot and buildscripts (lsdiff needs patchutils)
sudo apt-get install build-essential subversion libncurses5-dev zlib1g-dev gawk gcc-multilib flex git-core gettext
sudo apt-get install patchutils

### download directory
mkdir /Openwrt/dl

### trunk
mkdir /Openwrt/trunk
cd /Openwrt/trunk
ln -s ../dl dl
svn co svn://svn.openwrt.org/openwrt/trunk/ .

### attitude
mkdir /Openwrt/attitude
cd /Openwrt/attitude
ln -s ../dl dl
svn co svn://svn.openwrt.org/openwrt/branches/attitude_adjustment/ .

### luci local source repository
mkdir /Openwrt/luci
cd /Openwrt/luci
svn co http://svn.luci.subsignal.org/luci/ . --depth empty
svn up --set-depth infinity trunk 
svn up --set-depth empty branches
svn up --set-depth infinity branches/luci-0.11

### patch sources (main Openwrt, packages feed, local Luci)
### patch main Openwrt first to set feeds correctly, then update packages feed and patch it
cd /Openwrt
patch -p0 -i WNDR3700-trunk-r34636-2012-12-11-1937-openwrt.patch
/Openwrt/trunk/scripts/feeds update -a
patch -p0 -i WNDR3700-trunk-r34636-2012-12-11-1937-packages.patch
patch -p0 -i WNDR3700-trunk-r34636-2012-12-11-1937-luci-trunk.patch

EDIT: alternatively, if you only want that module and you already have a build environment ready, you could try just taking my .config.init, copy it to .config, run make menuconfig to blow it out and add that one kmod you want to the config. Then a normal make should create a firmware (that you do not need) and the packages directory with the kmod you could then install. There should be no strange kernel config options and the build scripts do nothing strange for the actual make process.

(Last edited by hnyman on 15 Dec 2012, 11:14)

I was going to compile an add-on  .ipk for you, but looks like the changes between 34677-34685 have broken compilation for me :-(    (I have got errors related to ppp etc.)

EDIT:
https://dev.openwrt.org/ticket/12620
Fixed by r34715.

(Last edited by hnyman on 16 Dec 2012, 12:14)

I notice that some luci settings are not included in the file /etc/config/upnpd.
This is perhaps why the miniupnpd is disabled after each sysupgrade.

Manani wrote:

I notice that some luci settings are not included in the file /etc/config/upnpd.
This is perhaps why the miniupnpd is disabled after each sysupgrade.

I have not modified that package. It is just included in the original form. If you have identified something wrong with it, please report the details so that it can be fixed in the repository.

EDIT:
Read also this: https://forum.openwrt.org/viewtopic.php … 22#p169922
Based on jow's reply, the behaviour is intentional.

(Last edited by hnyman on 15 Dec 2012, 13:44)

Etique wrote:

I'm stuck with conntrack-rtsp (package kmod-ipt-nathelper-rtsp). There's a dependency error on the kernel, and forcing its installation doesn't make it work.

I compiled that extra package along r34676. Install the firmware, and then download and install the extra package.
http://koti.welho.com/hnyman1/Openwrt/t … 012-12-15/

(Last edited by hnyman on 15 Dec 2012, 14:07)

I read this on the miniupnp site: The daemon is now also available for linux 2.4.x and 2.6.x using netfilter. It is possible to make it run on router devices running OpenWRT.

hnyman wrote:

IPv6 functionality seems to be broken for me with r34739. Worked ok with yesterday's r34715.
Details at: https://forum.openwrt.org/viewtopic.php … 96#p186296

Fixed by r34746 (bug in libubox library), so r34769 build is again ok.

Looks like the trunk build r34807 from yesterday contained a buggy version of the sysupgrade script that fails to upgrade to the next firwmare version. Router gets left in half-disabled state needing a reboot. That bug has been fixed in today's version r34815.

If you have already installed the r34807 version, read the explanations below and manually edit the file /lib/upgrade/common.sh in the live Openwrt system. The fix is about renaming a function and the call to it.

Error caused by 34794: https://dev.openwrt.org/changeset/34794
Fix in 34815: https://dev.openwrt.org/changeset/34815
Ticket about the bug: https://dev.openwrt.org/ticket/12652

(Last edited by hnyman on 21 Dec 2012, 14:42)

I bumped my buildhost to Ubuntu 12.10 and utilized that change as an opportunity to polish the scripts to re-create my Openwrt build environment. The current script enables me to do that in a few minutes.

As a part of the firmware creation/documentation process, my buildscripts also generate a self-extracting archive script file of all the other scripts. Downloading and running that script generates the other scripts, one of which can recreate the whole buildroot svn structure etc. After that one has just to apply the patches included in the firmware directory and the buildroot is ready.

I edited the second message in this thread to contain step-by-step advice on this:
https://forum.openwrt.org/viewtopic.php … 11#p127011

hnyman wrote:

Looks like the trunk build r34807 from yesterday contained a buggy version of the sysupgrade script that fails to upgrade to the next firwmare version. Router gets left in half-disabled state needing a reboot. That bug has been fixed in today's version r34815.

If you have already installed the r34807 version, read the explanations below and manually edit the file /lib/upgrade/common.sh in the live Openwrt system. The fix is about renaming a function and the call to it.

Error caused by 34794: https://dev.openwrt.org/changeset/34794
Fix in 34815: https://dev.openwrt.org/changeset/34815
Ticket about the bug: https://dev.openwrt.org/ticket/12652

Thanks, upgrade ok for me.

hnyman wrote:

I bumped my buildhost to Ubuntu 12.10 and utilized that change as an opportunity to polish the scripts to
<snip>
I edited the second message in this thread to contain step-by-step advice on this:
https://forum.openwrt.org/viewtopic.php … 11#p127011

AWESOME!  Thank you!  I was starting to do this out on my own, but appreciate the recipe.

Question:  When I run updateNmake.sh the first time, I get a grey screen asking me to select the make and model (I will get screen shots and specifics if you want, but I suspect you know what I mean), which I answer (guestimate).  Is that question screen normal?  I am worried I did something wrong.

Someone earlier asked about build timing.  My results were much faster.  I added "time (" to the fourth line and ")" to the last line of updateNmake.sh.  The results were as follows on a first clean build as instructed by hnyman.
real    36m54.731s
user    83m5.696s
sys     8m17.903s

johnthomas00 wrote:

Question:  When I run updateNmake.sh the first time, I get a grey screen asking me to select the make and model ...  Is that question screen normal?

No, but it will happen if there is no existing .config.

To get everything right, it is probably easiest to just enter make menuconfig after updating & installing the feeds first time. That should initialize the various config things. Save the config even though you are not even doing any changes.

After that, copy the ".config.init" to ".config". That file contains all my package/option selections. Either "make menuconfig" or "make defconfig" will then explode it to the full size by filling in all the defaults & non-selected package lines. That .config can then be modified normally with make menuconfig, if I want to test something.

updateNmake.sh includes a call to "make defconfig" to straighten up the possible new dependencies after the source update.

I usually use the same .config for a week and then  initialize .config from the permanent .config.init to cleanup a bit. That will help to remove unneeded modules (e.g. due to removed dependencies).

----
Regarding build times, in a Windows 7 x64 running Virtualbox Ubuntu 12.04 x64 (with 2 CPU cores allocated to Ubuntu), the complete rebuild after a make dirclean (building tools, toolchain and firmware) takes maybe slightly over an hour. Building tools takes maybe 10 minutes, toolchain takes maybe 30-40 minutes and the firmware maybe 25 mins.

(Last edited by hnyman on 22 Dec 2012, 09:18)

i'm having an issue with the usb on my wndr3700v2 and the attidude builts.
Whenever i connect a USB drive the system reboots and doesn't seem to come up completely. The router then refuses all network access and the power led starts blinking.
Wired clients still get an ip adress, but no access to the network or router interface; wireless clients can see SSID's but get no This happens with a 1 Tb Buffalo usb drive that has 3 partitions: a 256Mb ext4 fs primary, a 256  Mb linux swap and the rest being a ext4 fs partition.
It also happens when i plug in a 16 Gb adata pen drive with ext2 fs or fat32
Is there something wrong in the usb config maybe?