OpenWrt Forum Archive

Topic: WNDRv4 fit for openwrt - english

The content of this topic has been archived between 8 Feb 2018 and 2 May 2018. Unfortunately there are posts – most likely complete pages – missing.

Could you please tell whether that patch is also useable for Attitude Adjustment, or only for trunk / Barrier Breaker?

rpsoft wrote:

To build your own version of WNDR3700v4 image you can apply my patch to get a separate configuration for this device.
After this you can choose the device directly by name in the "make menuconfig".
--
Ralph

After applying the patch should I see WNDR3000v4 on 'Target profile'?
I have applied it, activated 'Advance configuration options for developers' and selected 'Show broken platforms / packages', selected 'Target system Atheros AR7xxx/AR9xxx' and 'Subtarget (Generic devices with NAND flash)', but the only option I have on 'Target Profile' is NETGEAR WNDR4300

@IcyK: The provided patch is only for the trunk. Other branches are not tested.
@scc: Perhaps you have to clean the "tmp" folder and re-run "make clean; make menuconfig". Hereafter the device should be visible.

--
Ralph

rpsoft wrote:

To build your own version of WNDR3700v4 image you can apply my patch to get a separate configuration for this device.
After this you can choose the device directly by name in the "make menuconfig".
--
Ralph

Hi Ralph, thanks for your work!
I put your patch file into target/linux/ar71xx/patches-3.10/, but I only get WNDR4300, no sign of 3700 v4, and while I try to make kernel_menuconfig, it reports a lots of errors, like this:
--------------------------------------------------------------------------------------------------------------------------
he text leading up to this was:
--------------------------
|--- a/target/linux/ar71xx/image/Makefile
|+++ b/target/linux/ar71xx/image/Makefile
--------------------------
No file to patch.  Skipping patch.
2 out of 2 hunks ignored
patching file target/linux/ar71xx/image/ubinize-wndr3700v4.ini
can't find file to patch at input line 93
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- a/target/linux/ar71xx/nand/profiles/netgear.mk
|+++ b/target/linux/ar71xx/nand/profiles/netgear.mk
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
patching file target/linux/ar71xx/patches-3.10/705-MIPS-ath79-WNDR3700V4-support.patch
patching file target/linux/ar71xx/files/arch/mips/ath79/mach-wndr3700-v4.c
Patch platform/030-main_wndr3700v4.patch does not apply (enforce with -f)
make[2]: *** [/wrt/trunk/build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_nand/linux-3.10.28/.quilt_checked] Error 1
make[2]: Leaving directory `/wrt/trunk/target/linux/ar71xx'
make[1]: *** [menuconfig] Error 2
make[1]: Leaving directory `/wrt/trunk/target/linux'
make: *** [kernel_menuconfig] Error 2

--------------------------------------------------------------------------------------------------------------------------

Did I put it into wrong place? Or is there anything else I should do?

Hello Folks!

May I ask for an OpenWRT Image for a WNDR4300? I'm not very comfortable with this development / compiling stuff.
I only need basic functionality.

Thank you!

checksum wrote:

I put your patch file into target/linux/ar71xx/patches-3.10

Sorry, but this is the wrong path. Put the patch in "/openwrt/patches" and apply it with quilt.

--
Ralph

rpsoft wrote:

@IcyK: The provided patch is only for the trunk. Other branches are not tested.
@scc: Perhaps you have to clean the "tmp" folder and re-run "make clean; make menuconfig". Hereafter the device should be visible.

--
Ralph

Hi friend.

I met the same problem.
I found that: openwrt/target/linux/ar71xx/nand/target.mk is marked broken currently.
I have to remove broken.

I applied rpsoft's patch against rev 39649 and loaded it via the netgear web interface on my wndr3700v4.  Things generally seem okay with the exception that the wireless support isn't working.  Here's an excerpt from dmesg.  Any idea why it's having trouble loading the eeprom files?

[   10.100000] cfg80211: Calling CRDA to update world regulatory domain
[   10.100000] cfg80211: World regulatory domain updated:
[   10.110000] cfg80211:  DFS Master region: unset
[   10.110000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_ga
in, max_eirp)
[   10.120000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2
000 mBm)
[   10.130000] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (300 mBi, 2
000 mBm)
[   10.140000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2
000 mBm)
[   10.140000] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (300 mBi, 2
000 mBm)
[   10.150000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (300 mBi, 2
000 mBm)
[   10.160000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0
mBm)
[   10.310000] PPP generic driver version 2.4.2
[   10.320000] NET: Registered protocol family 24
[   70.560000] ath: phy0: Unable to load EEPROM file soc_wmac.eeprom
[   70.560000] ath9k ar934x_wmac: failed to initialize device
[   70.570000] ath9k: probe of ar934x_wmac failed with error -22
[   70.570000] PCI: Enabling device 0000:00:00.0 (0000 -> 0002)
[  130.720000] ath: phy1: Unable to load EEPROM file pci_wmac0.eeprom
[  130.720000] ath9k 0000:00:00.0: Failed to initialize device
[  130.730000] ath9k: probe of 0000:00:00.0 failed with error -22

In order to get wireless working in rpsoft's patch from post 101 you need to make a couple small edits to target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom...

The two instances of
case $board in
wndr4300)

need to change to
case $board in
wndr4300 | wndr3700-v4)

This git patch applies to rev 39770.  What needs to happen for these changes to start making it upstream?

Hi, rpsoft, I am a new one on openwrt, would you please show me some details for how to apply your patch? thanks a lot.

Using the patches found in this thread I was able to build a working image.

Configuration is lost every time I reboot the device. Isn't supposed to be that way, is it?


[strike]wlan1 just doesn't seem to come up. Did I miss something?[/strike]
Wireless settings are a bit flaky. Can't reproduce it right now, but for some reason both adapters started working after "some time" (playing around with the settings, etc). I guess it might have something to do with channel auto mode which definitely doesn't work.


I know my way around Linux pretty well, so I can provide details and testing.


[    0.000000] Linux version 3.10.32 (alex@mailuefterl) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.01 r39930) ) #1 Sat Mar 15 12:21:31 CET 2014
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 0001974c (MIPS 74Kc)
[    0.000000] SoC: Atheros AR9344 rev 2
[    0.000000] Clocks: CPU:560.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:40.000MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x07ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x07ffffff]
[    0.000000] On node 0 totalpages: 32768
[    0.000000] free_area_init_node: node 0, pgdat 8030e9b0, node_mem_map 81000000
[    0.000000]   Normal zone: 256 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line:  board=WNDR4300 console=ttyS0,115200 mtdparts=ar934x-nfc:256k(u-boot)ro,256k(u-boot-env)ro,256k(caldata),512k(pot),2048k(language),512k(config),3072k(traffic_meter),2048k(kernel),23552k(ubiroot),25600k@0x6c0000(firmware),256k(caldata_backup),-(reserved) ubi.mtd=ubiroot rootfstype=squashfs noinitrd
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 126252k/131072k available (2242k kernel code, 4820k reserved, 590k data, 236k init, 0k highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.060000] Calibrating delay loop... 278.93 BogoMIPS (lpj=1394688)
[    0.070000] pid_max: default: 32768 minimum: 301
[    0.070000] Mount-cache hash table entries: 512
[    0.080000] NET: Registered protocol family 16
[    0.080000] MIPS: machine is NETGEAR WNDR4300
[    0.090000] ar71xx: using random MAC address for eth0
[    0.290000] registering PCI controller with io_map_base unset
[    0.300000] bio: create slab <bio-0> at 0
[    0.310000] PCI host bridge to bus 0000:00
[    0.310000] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    0.320000] pci_bus 0000:00: root bus resource [io  0x0000]
[    0.320000] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.330000] pci 0000:00:00.0: [168c:0033] type 00 class 0x028000
[    0.330000] pci 0000:00:00.0: invalid calibration data
[    0.330000] pci 0000:00:00.0: reg 10: [mem 0x00000000-0x0001ffff 64bit]
[    0.330000] pci 0000:00:00.0: reg 30: [mem 0x00000000-0x0000ffff pref]
[    0.330000] pci 0000:00:00.0: supports D1
[    0.330000] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.330000] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    0.330000] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1001ffff 64bit]
[    0.340000] pci 0000:00:00.0: BAR 6: assigned [mem 0x10020000-0x1002ffff pref]
[    0.340000] pci 0000:00:00.0: using irq 40 for pin 1
[    0.350000] Switching to clocksource MIPS
[    0.350000] NET: Registered protocol family 2
[    0.360000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    0.360000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.370000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.370000] TCP: reno registered
[    0.370000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.380000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.390000] NET: Registered protocol family 1
[    0.390000] PCI: CLS 0 bytes, default 32
[    0.410000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.410000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.420000] msgmni has been set to 246
[    0.430000] io scheduler noop registered
[    0.430000] io scheduler deadline registered (default)
[    0.440000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.460000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
[    0.470000] console [ttyS0] enabled, bootconsole disabled
[    0.480000] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xf1 (Micron NAND 128MiB 3,3V 8-bit), 128MiB, page size: 2048, OOB size: 64
[    0.500000] Scanning device for bad blocks
[    0.580000] 12 cmdlinepart partitions found on MTD device ar934x-nfc
[    0.590000] Creating 12 MTD partitions on "ar934x-nfc":
[    0.600000] 0x000000000000-0x000000040000 : "u-boot"
[    0.600000] 0x000000040000-0x000000080000 : "u-boot-env"
[    0.610000] 0x000000080000-0x0000000c0000 : "caldata"
[    0.620000] 0x0000000c0000-0x000000140000 : "pot"
[    0.620000] 0x000000140000-0x000000340000 : "language"
[    0.630000] 0x000000340000-0x0000003c0000 : "config"
[    0.640000] 0x0000003c0000-0x0000006c0000 : "traffic_meter"
[    0.640000] 0x0000006c0000-0x0000008c0000 : "kernel"
[    0.650000] 0x0000008c0000-0x000001fc0000 : "ubiroot"
[    0.660000] 0x0000006c0000-0x000001fc0000 : "firmware"
[    0.900000] 0x000001fc0000-0x000002000000 : "caldata_backup"
[    0.910000] 0x000002000000-0x000008000000 : "reserved"
[    0.940000] switch0: Atheros AR8327 rev. 4 switch registered on ag71xx-mdio.0
[    2.140000] libphy: ag71xx_mdio: probed
[    2.700000] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd034, driver=Atheros AR8216/AR8236/AR8316]
[    2.710000] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    2.720000] TCP: cubic registered
[    2.720000] NET: Registered protocol family 17
[    2.720000] 8021q: 802.1Q VLAN Support v1.8
[    2.730000] UBI: attaching mtd8 to ubi0
[    3.020000] UBI: scanning is finished
[    3.040000] UBI: attached mtd8 (name "ubiroot", size 23 MiB) to ubi0
[    3.040000] UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    3.050000] UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    3.060000] UBI: VID header offset: 2048 (aligned 2048), data offset: 4096
[    3.060000] UBI: good PEBs: 184, bad PEBs: 0, corrupted PEBs: 0
[    3.070000] UBI: user volume: 2, internal volumes: 1, max. volumes count: 128
[    3.080000] UBI: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 2110035630
[    3.080000] UBI: available PEBs: 0, total reserved PEBs: 184, PEBs reserved for bad PEB handling: 20
[    3.090000] UBI: background thread "ubi_bgt0d" started, PID 267
[    3.100000] mtd: device 12 (rootfs) set to be root filesystem
[    3.120000] VFS: Mounted root (squashfs filesystem) readonly on device 31:12.
[    3.120000] Freeing unused kernel memory: 236K (80325000 - 80360000)
[    5.600000] usbcore: registered new interface driver usbfs
[    5.610000] usbcore: registered new interface driver hub
[    5.620000] usbcore: registered new device driver usb
[    5.630000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    5.630000] ehci-platform: EHCI generic platform driver
[    5.640000] ehci-platform ehci-platform: EHCI Host Controller
[    5.640000] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[    5.660000] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[    5.680000] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[    5.680000] hub 1-0:1.0: USB hub found
[    5.690000] hub 1-0:1.0: 1 port detected
[    5.700000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    6.700000] eth0: link up (1000Mbps/Full duplex)
[    7.410000] eth0: link down
[    9.700000] NET: Registered protocol family 10
[    9.710000] tun: Universal TUN/TAP device driver, 1.6
[    9.720000] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[    9.730000] nf_conntrack version 0.5.0 (1976 buckets, 7904 max)
[    9.740000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    9.770000] Loading modules backported from Linux version master-2014-01-23-0-g62c147d
[    9.770000] Backport generated by backports.git backports-20140124-0-g1256d3e
[    9.780000] ip_tables: (C) 2000-2006 Netfilter Core Team
[    9.810000] Netfilter messages via NETLINK v0.30.
[    9.830000] xt_time: kernel timezone is -0000
[    9.860000] cfg80211: Calling CRDA to update world regulatory domain
[    9.860000] cfg80211: World regulatory domain updated:
[    9.870000] cfg80211:  DFS Master region: unset
[    9.870000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[    9.880000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    9.890000] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    9.900000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[    9.900000] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (300 mBi, 2000 mBm)
[    9.910000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (300 mBi, 2000 mBm)
[    9.920000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm)
[    9.960000] ctnetlink v0.93: registering with nfnetlink.
[    9.980000] PPP generic driver version 2.4.2
[    9.990000] NET: Registered protocol family 24
[   10.210000] ath: EEPROM regdomain: 0x0
[   10.210000] ath: EEPROM indicates default country code should be used
[   10.210000] ath: doing EEPROM country->regdmn map search
[   10.210000] ath: country maps to regdmn code: 0x3a
[   10.210000] ath: Country alpha2 being used: US
[   10.210000] ath: Regpair used: 0x3a
[   10.220000] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   10.240000] cfg80211: Calling CRDA for country: US
[   10.250000] cfg80211: Regulatory domain changed to country: US
[   10.250000] cfg80211:  DFS Master region: FCC
[   10.260000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   10.260000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[   10.270000] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (300 mBi, 1700 mBm)
[   10.280000] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz), (300 mBi, 2400 mBm)
[   10.290000] cfg80211:   (5490000 KHz - 5600000 KHz @ 80000 KHz), (300 mBi, 2400 mBm)
[   10.300000] cfg80211:   (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2400 mBm)
[   10.300000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (300 mBi, 3000 mBm)
[   10.310000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 4000 mBm)
[   10.330000] ieee80211 phy0: Atheros AR9340 Rev:0 mem=0xb8100000, irq=47
[   10.330000] PCI: Enabling device 0000:00:00.0 (0000 -> 0002)
[   10.570000] ath: EEPROM regdomain: 0x0
[   10.570000] ath: EEPROM indicates default country code should be used
[   10.570000] ath: doing EEPROM country->regdmn map search
[   10.570000] ath: country maps to regdmn code: 0x3a
[   10.570000] ath: Country alpha2 being used: US
[   10.570000] ath: Regpair used: 0x3a
[   10.580000] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[   10.590000] ieee80211 phy1: Atheros AR9300 Rev:4 mem=0xb0000000, irq=40
[   20.180000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   20.180000] IPv6: ADDRCONF(NETDEV_UP): eth0.1: link is not ready
[   20.200000] device eth0.1 entered promiscuous mode
[   20.200000] device eth0 entered promiscuous mode
[   20.240000] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   20.280000] IPv6: ADDRCONF(NETDEV_UP): eth0.2: link is not ready
[   21.970000] eth0: link up (1000Mbps/Full duplex)
[   22.000000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   22.000000] br-lan: port 1(eth0.1) entered forwarding state
[   22.010000] br-lan: port 1(eth0.1) entered forwarding state
[   22.020000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.1: link becomes ready
[   22.020000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.2: link becomes ready
[   22.070000] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   24.010000] br-lan: port 1(eth0.1) entered forwarding state
[   32.030000] jffs2: write-buffering enabled buffer (2048) erasesize (126976)
[   32.090000] jffs2: notice: (1298) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (0 unchecked, 0 orphan) and 22 of xref (0 dead, 7 orphan) found.
[  137.100000] br-lan: port 1(eth0.1) entered disabled state
[  137.140000] device eth0.1 left promiscuous mode
[  137.140000] br-lan: port 1(eth0.1) entered disabled state
[  137.180000] device eth0.1 entered promiscuous mode
[  137.210000] br-lan: port 1(eth0.1) entered forwarding state
[  137.210000] br-lan: port 1(eth0.1) entered forwarding state
[  138.110000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.1: link becomes ready
[  139.210000] br-lan: port 1(eth0.1) entered forwarding state
[  190.500000] jffs2: warning: (1662) jffs2_sum_write_data: Not enough space for summary, padsize = -1142
[  191.300000] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[  191.300000] device wlan0 entered promiscuous mode
[  191.320000] br-lan: port 2(wlan0) entered forwarding state
[  191.330000] br-lan: port 2(wlan0) entered forwarding state
[  191.330000] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[  192.260000] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
[  192.280000] device wlan1 entered promiscuous mode
[  192.280000] br-lan: port 3(wlan1) entered forwarding state
[  192.290000] br-lan: port 3(wlan1) entered forwarding state
[  192.300000] br-lan: port 3(wlan1) entered disabled state
[  192.310000] br-lan: port 3(wlan1) entered forwarding state
[  192.310000] br-lan: port 3(wlan1) entered forwarding state
[  192.320000] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
[  193.330000] br-lan: port 2(wlan0) entered forwarding state
[  194.310000] br-lan: port 3(wlan1) entered forwarding state
[  238.400000] device wlan0 left promiscuous mode
[  238.400000] br-lan: port 2(wlan0) entered disabled state
[  239.240000] cfg80211: Calling CRDA for country: AT
[  239.270000] cfg80211: Regulatory domain changed to country: AT
[  239.270000] cfg80211:  DFS Master region: ETSI
[  239.280000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[  239.290000] cfg80211:   (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[  239.290000] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2000 mBm)
[  239.300000] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz), (N/A, 2000 mBm)
[  239.310000] cfg80211:   (5490000 KHz - 5710000 KHz @ 80000 KHz), (N/A, 2700 mBm)
[  239.320000] cfg80211:   (57240000 KHz - 65880000 KHz @ 2160000 KHz), (N/A, 4000 mBm)
[  240.900000] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[  240.930000] device wlan0 entered promiscuous mode
[  241.980000] br-lan: port 2(wlan0) entered forwarding state
[  241.990000] br-lan: port 2(wlan0) entered forwarding state
[  242.000000] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[  243.990000] br-lan: port 2(wlan0) entered forwarding state
[  276.030000] device wlan1 left promiscuous mode
[  276.040000] br-lan: port 3(wlan1) entered disabled state
[  281.510000] device wlan0 left promiscuous mode
[  281.520000] br-lan: port 2(wlan0) entered disabled state
[  282.580000] br-lan: port 1(eth0.1) entered disabled state
[  282.590000] device eth0.1 left promiscuous mode
[  282.590000] br-lan: port 1(eth0.1) entered disabled state
[  282.610000] eth0: link down
[  282.630000] device eth0 left promiscuous mode
[  282.630000] IPv6: ADDRCONF(NETDEV_UP): eth0.1: link is not ready
[  282.640000] device eth0 entered promiscuous mode
[  282.650000] IPv6: ADDRCONF(NETDEV_UP): eth0.2: link is not ready
[  282.650000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[  282.660000] device eth0.1 entered promiscuous mode
[  282.690000] br-lan: port 1(eth0.1) entered forwarding state
[  282.690000] br-lan: port 1(eth0.1) entered forwarding state
[  283.580000] br-lan: port 1(eth0.1) entered disabled state
[  284.020000] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[  284.020000] device wlan0 entered promiscuous mode
[  284.030000] br-lan: port 2(wlan0) entered forwarding state
[  284.030000] br-lan: port 2(wlan0) entered forwarding state
[  284.130000] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
[  284.130000] device wlan1 entered promiscuous mode
[  284.140000] br-lan: port 3(wlan1) entered forwarding state
[  284.140000] br-lan: port 3(wlan1) entered forwarding state
[  284.460000] eth0: link up (1000Mbps/Full duplex)
[  284.500000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[  284.530000] br-lan: port 1(eth0.1) entered forwarding state
[  284.530000] br-lan: port 1(eth0.1) entered forwarding state
[  284.540000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.1: link becomes ready
[  284.540000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.2: link becomes ready
[  284.610000] br-lan: port 2(wlan0) entered disabled state
[  284.680000] br-lan: port 3(wlan1) entered disabled state
[  286.050000] br-lan: port 3(wlan1) entered forwarding state
[  286.060000] br-lan: port 3(wlan1) entered forwarding state
[  286.060000] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
[  286.120000] br-lan: port 2(wlan0) entered forwarding state
[  286.120000] br-lan: port 2(wlan0) entered forwarding state
[  286.130000] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[  286.530000] br-lan: port 1(eth0.1) entered forwarding state
[  288.060000] br-lan: port 3(wlan1) entered forwarding state
[  288.120000] br-lan: port 2(wlan0) entered forwarding state
[  290.290000] device wlan1 left promiscuous mode
[  290.300000] br-lan: port 3(wlan1) entered disabled state
[  291.640000] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
[  291.640000] device wlan1 entered promiscuous mode
[  291.650000] br-lan: port 3(wlan1) entered forwarding state
[  291.650000] br-lan: port 3(wlan1) entered forwarding state
[  291.660000] br-lan: port 3(wlan1) entered disabled state
[  291.680000] device wlan1 left promiscuous mode
[  291.690000] br-lan: port 3(wlan1) entered disabled state
[  302.460000] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
[  302.470000] device wlan1 entered promiscuous mode
[  302.470000] device wlan1 left promiscuous mode
[  302.480000] br-lan: port 3(wlan1) entered disabled state
[  885.570000] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready

(Last edited by alexhofbauer on 15 Mar 2014, 18:05)

Is there any OpenWRT-Firmware at this point, which I easily can upgrade my WNDR4300 with via the original Netgear-Webinterface, and in result having a fully supported router and OpenWRT? Any hints/guides appreciated.

I´m new to OpenWRT and just a "normal" user.

walaw wrote:

Is there any OpenWRT-Firmware at this point, which I easily can upgrade my WNDR4300 with via the original Netgear-Webinterface...

Sort of. The factory images built by the current code-base (with patches from this thread applied) can in fact be uploaded via the web-interface of stock firmwares.


walaw wrote:

...and in result having a fully supported router and OpenWRT?

If you're comfortable with a Linux CLI then I'd say yes, they're fully functional, from a hardware point of view. I somehow managed to build an image that doesn't want to persist settings - apart from the credentials everything is factory-reset after a reboot. Also, LuCI kills WLAN if you happen to select the wrong setting, because hostapd understandably refuses to initialize interfaces with garbage configuration.


walaw wrote:

I´m new to OpenWRT and just a "normal" user.

Then I'd strongly recommend against flashing OpenWRT onto your WNDRv4 at all, unless you are prepared to go back to stock firmware via TFTP. And deal with some quirks on the way there.

As a daily Linux user (and part-time sysadmin) I know my way around and how to configure and debug services on the command line, but that's really nothing I'd recommend for a "normal user".

I built a sorta working image as well, it seems to work fine, but as you, alex, I have the same issue with persisting configuration.

I looked into it a bit and found that if you create a new file, it persists but if you update an existing file (it should then be written to jffs2) it SEEMS to to be written but upon reset it's lost.

#touch /etc/stefan
#ls -l /etc/stefan /overlay/etc/stefan
<file exists>
#passwd
<set new root password>
#grep root /rom/etc/passwd /etc/passwd /overlay/etc/passwd
<shows the one in rom is unchanged (which is correct) and the one in /etc and /overlay/etc are both updated, or so it seems!>
<reboot>
#grep root /rom/etc/passwd /etc/passwd /overlay/etc/passwd
<all files are the same as in /rom>

So the question is why overlay isn't being updated - and does that mean the in-memory caches are the only ones keeping state at this point? IF we start running out of free memory, does it THEN flush blocks? Does it lose them?

Another question that hopefully someone can answer :

Why is the 96MB area unused? Some technical reason?

Or could I just use it for my own?

I'm compiling up r40016 (I think it is) currently, I'll do some testing with that and if all else fails I'll use extroot on it instead for now.

It's a 3700v4 btw.

// Stefan

Hello everyone. I built the firmware for WNDR4300 from git master branch and the flashed the firmware successfully to the WNDR4300 router. But I got a strange problem:
1) the router has the jffs2 filesystem mount to /overlay, if I create a new file on /overlay it is persist even after a reboot.
2) but any changes to the files exist as default setting files after flash, such as /etc/config/system, /etc/config/network, the changes will disappear after reboot, those files will return to default. As I understand /etc/config/system is actually /overlay/etc/config/system, so I don't understand why the change is not persisted.

Here is the mtd and mount info, any help is greatly appreciated, thanks.

root@OpenWrt:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00040000 00020000 "u-boot"
mtd1: 00040000 00020000 "u-boot-env"
mtd2: 00040000 00020000 "caldata"
mtd3: 00080000 00020000 "pot"
mtd4: 00200000 00020000 "language"
mtd5: 00080000 00020000 "config"
mtd6: 00300000 00020000 "traffic_meter"
mtd7: 00200000 00020000 "kernel"
mtd8: 01700000 00020000 "ubiroot"
mtd9: 01900000 00020000 "firmware"
mtd10: 00040000 00020000 "caldata_backup"
mtd11: 06000000 00020000 "reserved"
mtd12: 001d1000 0001f000 "rootfs"
mtd13: 0118f000 0001f000 "rootfs_data"
root@OpenWrt:~# mount
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
tmpfs on /tmp/root type tmpfs (rw,noatime,mode=755)
tmpfs on /dev type tmpfs (rw,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
/dev/mtdblock13 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlayfs (rw,noatime,lowerdir=/,upperdir=/overlay)

for example:
if I cp /etc/config/system /etc/config/system.a, then /etc/config/system.a will still be there after reboot, but if I edit /etc/config/system, after reboot the changes will disappear.

I also am getting the same problem with (EDIT) a WNDR4300.
At first I thought it was just an image size thing so cut it down to 7.2MB total.  However that does not seem to have resolved the problem.

root@OpenWrt:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00040000 00020000 "u-boot"
mtd1: 00040000 00020000 "u-boot-env"
mtd2: 00040000 00020000 "caldata"
mtd3: 00080000 00020000 "pot"
mtd4: 00200000 00020000 "language"
mtd5: 00080000 00020000 "config"
mtd6: 00300000 00020000 "traffic_meter"
mtd7: 00200000 00020000 "kernel"
mtd8: 01700000 00020000 "ubiroot"
mtd9: 01900000 00020000 "firmware"
mtd10: 00040000 00020000 "caldata_backup"
mtd11: 06000000 00020000 "reserved"
mtd12: 0041e000 0001f000 "rootfs"
mtd13: 00f42000 0001f000 "rootfs_data"
root@OpenWrt:~#


root@OpenWrt:~# mount
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
tmpfs on /tmp/root type tmpfs (rw,noatime,mode=755)
tmpfs on /dev type tmpfs (rw,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
/dev/mtdblock13 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlayfs (rw,noatime,lowerdir=/,upperdir=/overlay)
root@OpenWrt:~#

Using Barrier Breaker trunk r40015

Is there a setting or package I am missing?  The nand driver packages (2 of them) are installed.

Here's the dmesg output as well to see if we can't narrow this down.  It's so close to working perfectly!  Everything compiles fine and the router does work with OpenWRT very well, but ALL settings are lost, except interestingly for the root password that's set in LuCI at the very start of things.

[    0.410000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.410000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.420000] msgmni has been set to 246
[    0.430000] io scheduler noop registered
[    0.430000] io scheduler deadline registered (default)
[    0.440000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.460000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
[    0.470000] console [ttyS0] enabled, bootconsole disabled
[    0.480000] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xf1 (Micron NAND 128MiB 3,3V 8-bit), 128MiB, page size: 2048, OOB size: 64
[    0.490000] Scanning device for bad blocks
[    0.580000] 12 cmdlinepart partitions found on MTD device ar934x-nfc
[    0.590000] Creating 12 MTD partitions on "ar934x-nfc":
[    0.600000] 0x000000000000-0x000000040000 : "u-boot"
[    0.600000] 0x000000040000-0x000000080000 : "u-boot-env"
[    0.610000] 0x000000080000-0x0000000c0000 : "caldata"
[    0.620000] 0x0000000c0000-0x000000140000 : "pot"
[    0.620000] 0x000000140000-0x000000340000 : "language"
[    0.630000] 0x000000340000-0x0000003c0000 : "config"
[    0.630000] 0x0000003c0000-0x0000006c0000 : "traffic_meter"
[    0.640000] 0x0000006c0000-0x0000008c0000 : "kernel"
[    0.650000] 0x0000008c0000-0x000001fc0000 : "ubiroot"
[    0.650000] 0x0000006c0000-0x000001fc0000 : "firmware"
[    0.900000] 0x000001fc0000-0x000002000000 : "caldata_backup"
[    0.910000] 0x000002000000-0x000008000000 : "reserved"
[    0.940000] switch0: Atheros AR8327 rev. 4 switch registered on ag71xx-mdio.0
[    2.140000] libphy: ag71xx_mdio: probed
[    2.700000] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd034, driver=Atheros AR8216/AR8236/AR8316]
[    2.710000] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    2.720000] TCP: cubic registered
[    2.720000] NET: Registered protocol family 17
[    2.720000] 8021q: 802.1Q VLAN Support v1.8
[    2.730000] UBI: attaching mtd8 to ubi0
[    3.010000] UBI: scanning is finished
[    3.030000] UBI: attached mtd8 (name "ubiroot", size 23 MiB) to ubi0
[    3.040000] UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    3.050000] UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    3.050000] UBI: VID header offset: 2048 (aligned 2048), data offset: 4096
[    3.060000] UBI: good PEBs: 184, bad PEBs: 0, corrupted PEBs: 0
[    3.070000] UBI: user volume: 2, internal volumes: 1, max. volumes count: 128
[    3.070000] UBI: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 72299646
[    3.080000] UBI: available PEBs: 0, total reserved PEBs: 184, PEBs reserved for bad PEB handling: 20
[    3.090000] UBI: background thread "ubi_bgt0d" started, PID 267
[    3.100000] mtd: device 12 (rootfs) set to be root filesystem
[    3.110000] VFS: Mounted root (squashfs filesystem) readonly on device 31:12.
[    3.120000] Freeing unused kernel memory: 220K (80329000 - 80360000)

(Last edited by AdamK on 25 Mar 2014, 09:29)

tones111 wrote:

I applied rpsoft's patch against rev 39649 and loaded it via the netgear web interface on my wndr3700v4.  Things generally seem okay with the exception that the wireless support isn't working.

One thing I did notice on the WNDR4300 is that if I factory flash a fresh OpenWRT image on the device after already having OpenWRT on there, the 5GHz wifi does not come up.

To get it back again in OpenWRT, you first need to flash the stock Netgear firmware via TFTP, then via the Netgear firmware web UI flash your factory image of OpenWRT.  Otherwise it does not detect the 5GHz radio for some reason.

DEVS:  I am happy to flash any test images for you, the router is useless to me with the stock firmware and DD-WRT doesn't support IPv6 native dual stack so it is probably a situation of OpenWRT or nothing at all.

Also with regards to the persistent settings after reboot, as I said in my last post these are lost after a reboot for my builds as well however just a few weeks ago someone was smart enough to get an image where the settings DO remain after a reboot. I am going to post in there and ask what they did to get the settings to stick.

https://forum.openwrt.org/viewtopic.php … 03#p226903

AdamK wrote:

One thing I did notice on the WNDR4300 is that if I factory flash a fresh OpenWRT image on the device after already having OpenWRT on there, the 5GHz wifi does not come up.

To get it back again in OpenWRT, you first need to flash the stock Netgear firmware via TFTP, then via the Netgear firmware web UI flash your factory image of OpenWRT.  Otherwise it does not detect the 5GHz radio for some reason.

Actually it's far easier than that... I came across this earlier when testing. The trick is after you flash your OpenWRT image, you must POWER OFF the router. Not reboot, but physically power off. I'm not 100% sure of the technical reason, but there is some conflict between having PCI enabled and the bootloader writing to the NAND, so when you flash the bootstap code makes sure PCI is disabled on initial boot. As I said a reboot does not fix it, you must remove power and then re-apply. Took me a while to figure that out so hopefully saves everyone from the same headaches.
(I believe this is a hardware issue, as I experienced this originally even flashing custom builds of the Netgear GPL... where once you did the TFTP upload, the serial console would show the device got stuck in a booting loop. Once you removed power and re-applied, it always came up just fine)

As for the config not persisting, that's pretty strange. I've got my own builds working with 0 issues. From your logs it looks like the rootfs is mounted properly using overlayfs. The only thing I can suggest is to try:
1) Boot up normally
2) Create a new file somewhere
3) Edit an existing file and save it
4) Reboot and go into safe mode
5) Manually mount the overlay/jffs partition and see if your files were actually written there.

It sounds like maybe there's a bug or issue with the overlayfs recently, since I built from rev.38896 with 0 issues...

Thanks for that, you were spot on with the 5G wifi issue, if I power off the router totally it comes back up.  Saves me a stack of extra mucking around!

I've just compiled a fresh image from trunk (r40022) so will have a tinker with this and see if the settings persist after a reboot.

jolouis wrote:

As for the config not persisting, that's pretty strange. I've got my own builds working with 0 issues. From your logs it looks like the rootfs is mounted properly using overlayfs. The only thing I can suggest is to try:
1) Boot up normally
2) Create a new file somewhere
3) Edit an existing file and save it
4) Reboot and go into safe mode
5) Manually mount the overlay/jffs partition and see if your files were actually written there.

It sounds like maybe there's a bug or issue with the overlayfs recently, since I built from rev.38896 with 0 issues...

And I think I MIGHT have found part of the problem.

I went into /etc/config and used vi to modify the dhcp file.  I then saved this file, plus created a new file called dhcp.bak.
I then rebooted, the dhcp.bak file remained there no problem.  The original dhcp file got reset back to defaults.
So it seems to keep the file if you create it from scratch.  Not quite.  I then deleted the dhcp file and then created it brand new by copying the previously made .bak file.  I then rebooted, it was again back to defaults.  I repeated this process as well in /overlay/etc/config too (my dhcp.bak file was already there from earlier)

What put me onto trying that method was the fact that the shadow file is renamed/moved to shadow- when you set the root password, and a new shadow file is created.  This file seems to persist when the router is rebooted.  However other config files like dhcp, wireless, system which live in /etc/config are NOT retained.

Here's the kernel log from my latest build:

[    0.000000] Linux version 3.10.32 (adamk@jupiter) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.01 r40022) ) #1 Thu Mar 27 01:11:04 EST 2014
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 0001974c (MIPS 74Kc)
[    0.000000] SoC: Atheros AR9344 rev 2
[    0.000000] Clocks: CPU:560.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:40.000MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x07ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x07ffffff]
[    0.000000] On node 0 totalpages: 32768
[    0.000000] free_area_init_node: node 0, pgdat 80324a80, node_mem_map 81000000
[    0.000000]   Normal zone: 256 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line:  board=WNDR4300 console=ttyS0,115200 mtdparts=ar934x-nfc:256k(u-boot)ro,256k(u-boot-env)ro,256k(caldata),512k(pot),2048k(language),512k(config),3072k(traffic_meter),2048k(kernel),23552k(ubiroot),25600k@0x6c0000(firmware),256k(caldata_backup),-(reserved) ubi.mtd=ubiroot rootfstype=squashfs noinitrd
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 126188k/131072k available (2325k kernel code, 4884k reserved, 598k data, 212k init, 0k highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.060000] Calibrating delay loop... 278.93 BogoMIPS (lpj=1394688)
[    0.070000] pid_max: default: 32768 minimum: 301
[    0.070000] Mount-cache hash table entries: 512
[    0.080000] NET: Registered protocol family 16
[    0.080000] MIPS: machine is NETGEAR WNDR4300
[    0.090000] ar71xx: using random MAC address for eth0
[    0.290000] registering PCI controller with io_map_base unset
[    0.300000] bio: create slab <bio-0> at 0
[    0.310000] PCI host bridge to bus 0000:00
[    0.310000] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    0.320000] pci_bus 0000:00: root bus resource [io  0x0000]
[    0.320000] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.330000] pci 0000:00:00.0: [168c:0033] type 00 class 0x028000
[    0.330000] pci 0000:00:00.0: invalid calibration data
[    0.330000] pci 0000:00:00.0: reg 10: [mem 0x00000000-0x0001ffff 64bit]
[    0.330000] pci 0000:00:00.0: reg 30: [mem 0x00000000-0x0000ffff pref]
[    0.330000] pci 0000:00:00.0: supports D1
[    0.330000] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.330000] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    0.330000] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1001ffff 64bit]
[    0.340000] pci 0000:00:00.0: BAR 6: assigned [mem 0x10020000-0x1002ffff pref]
[    0.340000] pci 0000:00:00.0: using irq 40 for pin 1
[    0.350000] Switching to clocksource MIPS
[    0.350000] NET: Registered protocol family 2
[    0.360000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    0.360000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.370000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.370000] TCP: reno registered
[    0.380000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.380000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.390000] NET: Registered protocol family 1
[    0.390000] PCI: CLS 0 bytes, default 32
[    0.410000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.410000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.420000] msgmni has been set to 246
[    0.430000] io scheduler noop registered
[    0.430000] io scheduler deadline registered (default)
[    0.440000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.460000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
[    0.470000] console [ttyS0] enabled, bootconsole disabled
[    0.480000] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xf1 (Micron NAND 128MiB 3,3V 8-bit), 128MiB, page size: 2048, OOB size: 64
[    0.500000] Scanning device for bad blocks
[    0.580000] 12 cmdlinepart partitions found on MTD device ar934x-nfc
[    0.590000] Creating 12 MTD partitions on "ar934x-nfc":
[    0.600000] 0x000000000000-0x000000040000 : "u-boot"
[    0.600000] 0x000000040000-0x000000080000 : "u-boot-env"
[    0.610000] 0x000000080000-0x0000000c0000 : "caldata"
[    0.620000] 0x0000000c0000-0x000000140000 : "pot"
[    0.620000] 0x000000140000-0x000000340000 : "language"
[    0.630000] 0x000000340000-0x0000003c0000 : "config"
[    0.640000] 0x0000003c0000-0x0000006c0000 : "traffic_meter"
[    0.640000] 0x0000006c0000-0x0000008c0000 : "kernel"
[    0.650000] 0x0000008c0000-0x000001fc0000 : "ubiroot"
[    0.660000] 0x0000006c0000-0x000001fc0000 : "firmware"
[    0.900000] 0x000001fc0000-0x000002000000 : "caldata_backup"
[    0.910000] 0x000002000000-0x000008000000 : "reserved"
[    0.940000] switch0: Atheros AR8327 rev. 4 switch registered on ag71xx-mdio.0
[    2.140000] libphy: ag71xx_mdio: probed
[    2.700000] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd034, driver=Atheros AR8216/AR8236/AR8316]
[    2.710000] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    2.720000] TCP: cubic registered
[    2.720000] NET: Registered protocol family 17
[    2.720000] 8021q: 802.1Q VLAN Support v1.8
[    2.730000] UBI: attaching mtd8 to ubi0
[    3.000000] UBI: scanning is finished
[    3.020000] UBI: attached mtd8 (name "ubiroot", size 23 MiB) to ubi0
[    3.030000] UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    3.040000] UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    3.050000] UBI: VID header offset: 2048 (aligned 2048), data offset: 4096
[    3.050000] UBI: good PEBs: 184, bad PEBs: 0, corrupted PEBs: 0
[    3.060000] UBI: user volume: 2, internal volumes: 1, max. volumes count: 128
[    3.070000] UBI: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 650844478
[    3.070000] UBI: available PEBs: 0, total reserved PEBs: 184, PEBs reserved for bad PEB handling: 20
[    3.080000] UBI: background thread "ubi_bgt0d" started, PID 266
[    3.090000] mtd: device 12 (rootfs) set to be root filesystem
[    3.100000] VFS: Mounted root (squashfs filesystem) readonly on device 31:12.
[    3.110000] Freeing unused kernel memory: 212K (8033b000 - 80370000)
[    6.300000] usbcore: registered new interface driver usbfs
[    6.300000] usbcore: registered new interface driver hub
[    6.310000] usbcore: registered new device driver usb
[    6.330000] SCSI subsystem initialized
[    6.340000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    6.350000] ehci-platform: EHCI generic platform driver
[    6.350000] ehci-platform ehci-platform: EHCI Host Controller
[    6.360000] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[    6.370000] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[    6.390000] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[    6.390000] hub 1-0:1.0: USB hub found
[    6.400000] hub 1-0:1.0: 1 port detected
[    6.410000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    6.430000] usbcore: registered new interface driver usb-storage
[    6.700000] eth0: link up (1000Mbps/Full duplex)
[    8.360000] eth0: link down
[   13.110000] NET: Registered protocol family 10
[   13.120000] NTFS driver 2.1.30 [Flags: R/O MODULE].
[   13.140000] Initializing XFRM netlink socket
[   13.150000] NET: Registered protocol family 15
[   13.160000] tun: Universal TUN/TAP device driver, 1.6
[   13.160000] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[   13.200000] ipip: IPv4 over IPv4 tunneling driver
[   13.230000] sit: IPv6 over IPv4 tunneling driver
[   13.270000] nf_conntrack version 0.5.0 (1975 buckets, 7900 max)
[   13.280000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   13.390000] u32 classifier
[   13.390000]     input device check on
[   13.400000]     Actions configured
[   13.420000] Mirror/redirect action on
[   13.440000] Failed to load ipt action
[   13.490000] arp_tables: (C) 2002 David S. Miller
[   13.510000] usbcore: registered new interface driver cdc_wdm
[   13.530000] Loading modules backported from Linux version master-2014-01-23-0-g62c147d
[   13.530000] Backport generated by backports.git backports-20140124-0-g1256d3e
[   13.550000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   13.600000] Netfilter messages via NETLINK v0.30.
[   13.620000] usbcore: registered new interface driver ums-alauda
[   13.640000] usbcore: registered new interface driver ums-cypress
[   13.660000] usbcore: registered new interface driver ums-datafab
[   13.680000] usbcore: registered new interface driver ums-freecom
[   13.700000] usbcore: registered new interface driver ums-isd200
[   13.700000] usbcore: registered new interface driver ums-jumpshot
[   13.740000] usbcore: registered new interface driver ums-karma
[   13.760000] usbcore: registered new interface driver ums-sddr09
[   13.760000] usbcore: registered new interface driver ums-sddr55
[   13.770000] usbcore: registered new interface driver ums-usbat
[   13.800000] usbcore: registered new interface driver usblp
[   13.840000] usbcore: registered new interface driver usbserial
[   13.840000] usbcore: registered new interface driver usbserial_generic
[   13.860000] usbserial: USB Serial support registered for generic
[   13.940000] xt_time: kernel timezone is -0000
[   14.030000] cfg80211: Calling CRDA to update world regulatory domain
[   14.050000] cfg80211: World regulatory domain updated:
[   14.050000] cfg80211:  DFS Master region: unset
[   14.050000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   14.060000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   14.070000] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   14.080000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   14.090000] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (300 mBi, 2000 mBm)
[   14.090000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (300 mBi, 2000 mBm)
[   14.100000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm)
[   14.130000] ctnetlink v0.93: registering with nfnetlink.
[   14.150000] PPP generic driver version 2.4.2
[   14.170000] PPP MPPE Compression module registered
[   14.170000] NET: Registered protocol family 24
[   14.190000] usbcore: registered new interface driver sierra
[   14.210000] usbserial: USB Serial support registered for Sierra USB modem
[   14.220000] usbcore: registered new interface driver sierra_net
[   14.300000] usbcore: registered new interface driver option
[   14.320000] usbserial: USB Serial support registered for GSM modem (1-port)
[   14.340000] usbcore: registered new interface driver qcserial
[   14.340000] usbserial: USB Serial support registered for Qualcomm USB modem
[   14.620000] ath: EEPROM regdomain: 0x0
[   14.620000] ath: EEPROM indicates default country code should be used
[   14.620000] ath: doing EEPROM country->regdmn map search
[   14.620000] ath: country maps to regdmn code: 0x3a
[   14.620000] ath: Country alpha2 being used: US
[   14.620000] ath: Regpair used: 0x3a
[   14.630000] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   14.640000] cfg80211: Calling CRDA for country: US
[   14.640000] cfg80211: Regulatory domain changed to country: US
[   14.650000] cfg80211:  DFS Master region: FCC
[   14.650000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   14.660000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[   14.670000] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (300 mBi, 1700 mBm)
[   14.680000] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz), (300 mBi, 2400 mBm)
[   14.690000] cfg80211:   (5490000 KHz - 5600000 KHz @ 80000 KHz), (300 mBi, 2400 mBm)
[   14.690000] cfg80211:   (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2400 mBm)
[   14.700000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (300 mBi, 3000 mBm)
[   14.710000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 4000 mBm)
[   14.720000] ieee80211 phy0: Atheros AR9340 Rev:0 mem=0xb8100000, irq=47
[   14.730000] PCI: Enabling device 0000:00:00.0 (0000 -> 0002)
[   14.970000] ath: EEPROM regdomain: 0x0
[   14.970000] ath: EEPROM indicates default country code should be used
[   14.970000] ath: doing EEPROM country->regdmn map search
[   14.970000] ath: country maps to regdmn code: 0x3a
[   14.970000] ath: Country alpha2 being used: US
[   14.970000] ath: Regpair used: 0x3a
[   14.980000] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[   14.990000] ieee80211 phy1: Atheros AR9300 Rev:4 mem=0xb0000000, irq=40
[   28.170000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   28.170000] IPv6: ADDRCONF(NETDEV_UP): eth0.1: link is not ready
[   28.210000] device eth0.1 entered promiscuous mode
[   28.210000] device eth0 entered promiscuous mode
[   28.250000] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   28.280000] IPv6: ADDRCONF(NETDEV_UP): eth0.2: link is not ready
[   29.360000] eth0: link up (1000Mbps/Full duplex)
[   29.390000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   29.390000] br-lan: port 1(eth0.1) entered forwarding state
[   29.400000] br-lan: port 1(eth0.1) entered forwarding state
[   29.410000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.1: link becomes ready
[   29.410000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.2: link becomes ready
[   29.460000] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   31.400000] br-lan: port 1(eth0.1) entered forwarding state
[   41.100000] jffs2: write-buffering enabled buffer (2048) erasesize (126976)
[   41.670000] jffs2: notice: (2340) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (0 unchecked, 0 orphan) and 46 of xref (0 dead, 23 orphan) found.

Other handy stuffs:

root@OpenWrt:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
rootfs                   13392       668     12724   5% /
/dev/root                 6656      6656         0 100% /rom
tmpfs                    63200       860     62340   1% /tmp
tmpfs                    63200        76     63124   0% /tmp/root
tmpfs                      512         0       512   0% /dev
/dev/mtdblock13          13392       668     12724   5% /overlay
overlayfs:/overlay       13392       668     12724   5% /


root@OpenWrt:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00040000 00020000 "u-boot"
mtd1: 00040000 00020000 "u-boot-env"
mtd2: 00040000 00020000 "caldata"
mtd3: 00080000 00020000 "pot"
mtd4: 00200000 00020000 "language"
mtd5: 00080000 00020000 "config"
mtd6: 00300000 00020000 "traffic_meter"
mtd7: 00200000 00020000 "kernel"
mtd8: 01700000 00020000 "ubiroot"
mtd9: 01900000 00020000 "firmware"
mtd10: 00040000 00020000 "caldata_backup"
mtd11: 06000000 00020000 "reserved"
mtd12: 0064c000 0001f000 "rootfs"
mtd13: 00d14000 0001f000 "rootfs_data"


root@OpenWrt:~# mount
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
tmpfs on /tmp/root type tmpfs (rw,noatime,mode=755)
tmpfs on /dev type tmpfs (rw,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
/dev/mtdblock13 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlayfs (rw,noatime,lowerdir=/,upperdir=/overlay)

Let me know if you need any more info guys.  I've just checked out r39000 from trunk and will compile this, let's see what happens with retaining settings on reboot with that version of the trunk.

(Last edited by AdamK on 26 Mar 2014, 23:01)

Quick update

Compiled against r39000 of the trunk and all settings are retained after a reboot.
So it seems that something has gone awry between 39000 and current trunk versions.

Will compile against say, r39500 of the trunk when I get a spare minute and see if the issue arises or not.

I confirmed that r39130 is OK. I happened to have another WNDR4300 running on this revision and all settings are retained.

And as for your earlier post, I'm having exactly the same symptoms as you are. Newly created files will persist and files that are originally there like /etc/config/system will not persist and are reset to default after reboot. Quite strange. Since new files are retained, the filesystem on nand (ubifs I guess?) is actually working fine. I think either overlayfs is buggy or there is other process resetting the files to default on purpose. I confirmed that even say /etc/config/system got reset, its content is different than /rom/etc/config/system. This means the resetting of the files is not simply just copy the same file from the squashfs but on purposely processed and rewritten to the nand ubifs.

Hope somebody cound fix this. It's really a showstopper.

AdamK wrote:

Quick update

Compiled against r39000 of the trunk and all settings are retained after a reboot.
So it seems that something has gone awry between 39000 and current trunk versions.

Will compile against say, r39500 of the trunk when I get a spare minute and see if the issue arises or not.

I am compiling r39750 trunk now, as r39500 worked perfectly -- reboot till the cows come home but settings would stick.
The rest of the image works perfectly on a WNDR4300 so glad I tried rolling back 1000 revisions of the trunk source.
Just a pity I had several other commitments today, otherwise I would probably already be reporting on r39750 smile

Have compiled 39750 & 39800, in both cases the router settings stuck after rebooting.
Now trying 39900, after that I will call it a night, but that should give the devs plenty to work with and narrow down substantially which revision broke it smile