OpenWrt Forum Archive

Topic: Can't get into OnNetworks N150 router

The content of this topic has been archived between 18 Apr 2018 and 27 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Looking at the dmesg log -

[    0.770000] 4 cmdlinepart partitions found on MTD device spi0.0
[    0.770000] Creating 4 MTD partitions on "spi0.0":
[    0.780000] 0x000000000000-0x000000040000 : "u-boot"
[    0.780000] 0x000000040000-0x000000050000 : "u-boot-env"
[    0.790000] 0x000000050000-0x0000003f0000 : "firmware"
[    0.800000] 2 netgear-fw partitions found on MTD device firmware
[    0.800000] 0x000000050000-0x000000172440 : "kernel"
[    0.810000] 0x000000172440-0x0000003f0000 : "rootfs"
[    0.820000] mtd: device 4 (rootfs) set to be root filesystem
[    0.820000] 1 squashfs-split partitions found on MTD device rootfs
[    0.830000] 0x0000003b0000-0x0000003f0000 : "rootfs_data"
[    0.840000] 0x0000003f0000-0x000000400000 : "art"

am I reading it correctly that OpenWrt uses the existing partition scheme layed down by the original firmware? How does the firmware decide the "rootfs_data" should be at 3b000h to 3f0000h? Just wondering if some kind of re-partitioning can be done to create a larger "rootfs_data" filesystem? Or will this cause major problems?

Yes, original layout, at least for the devices I know. The partition table is given by cmdline to the kernel by the bootloader, see cat /proc/cmdline and fw_printenv. Allocating the storage differently is possible though the sysupgrade script / hooks might not expect it. If you know to flash over serial you can give it a try. Make backups of your partitions before you start!

tango wrote:

am I reading it correctly that OpenWrt uses the existing partition scheme layed down by the original firmware? How does the firmware decide the "rootfs_data" should be at 3b000h to 3f0000h? Just wondering if some kind of re-partitioning can be done to create a larger "rootfs_data" filesystem? Or will this cause major problems?

OpenWRT does not exactly stick to the original partition scheme, but certain things need to remain the same to avoid bricking the router. 

An explanation of the flash layout can be found at https://wiki.openwrt.org/doc/techref/flash.layout.

Essentially, I wouldn't recommend changing u-boot, u-boot-env, or art unless you have a backup and know how to restore them.  These partitions contain things that aren't part of OpenWRT.  Changing these partitions may brick your router, destroy the bootloader's TFTP firmware recovery mode, or erase information needed by your router's hardware.

You should be able to change things in the "firmware" partition from 0x050000 to 0x3f0000 with relatively less risk (though I'm not providing any warranties or guarantees with this advice; you do this at your own risk).  This partition includes 3 sub-partitions:

  • the linux kernel

  • the squashfs filesystem (rootfs, that holds the default root partition for OpenWRT)

  • and the remaining rootfs_data, which is intended to hold changes to the root partition

The kernel and rootfs partitions are about as small as they can be given the data they hold, so unless you find a way to make the linux kernel smaller, or reduce the size of everything in the squashfs filesystem (e.g., by removing packages), you don't really have much wiggle room to repartition things. 

This response is a bit rushed for me, but I wanted to get it up ASAP to warn you before you do something that may brick your router beyond your means to repair it.

So, if I understand this correctly, if the rootfs_data partition is 256k or less (On Network's router case), OpenWrt will not be able to permanently store configuration data? Instead it reverts to creating a ram drive to store configuration data, which is lost when the router is turned off.

Can a different type of filesystem be used instead of jffs2 for the rootfs_data partition?

How useful is router that does not store configuration data permanently? Just wondering how you guys plan on using your router. I have my router and cable modem on a small UPS battery backup, so I'm safe most of time. Now, the other day, my cat got behind area where the UPS and router are and  accidentally stepped on the power button and off went the cable modem and router! Bad cat. I've since put a piece of styrofoam over the power button to prevent future power outages.

Still wondering if you can flash the NetGear firmware if OpenWrt was flashed and is the current running firmware on the router?

@jchau - Don't worry about me bricking the router. I got both of mine flashed to the NetGear firmware, so I think I'll stick with that. We'll  leave re-partitioning and fixing the firmware to the experts like you.

(Last edited by tango on 3 May 2016, 05:41)

jffs2 image is deprecated, sqashfs is used by default this days.

Personally I suggest you create your own image without luci but zram and bake the required configuration into the image. This should leave you with considerably more space and a working router out of the box.

On the other hand if the stock firmware does the job for you, you might as well stick to that.

tango wrote:

So, if I understand this correctly, if the rootfs_data partition is 256k or less (On Network's router case), OpenWrt will not be able to permanently store configuration data? Instead it reverts to creating a ram drive to store configuration data, which is lost when the router is turned off.

Correct.

tango wrote:

Can a different type of filesystem be used instead of jffs2 for the rootfs_data partition?

Perhaps.  We'll have to take a look at what filesystems are supported by OpenWRT/Linux.  But filesystems like squashfs and jffs2 are especially suitable for the raw flash storage on these routers, so it might be best to stick to jffs2; I'm not sure yet.

tango wrote:

How useful is router that does not store configuration data permanently? Just wondering how you guys plan on using your router.

Not very.  I currently live with roommates and manage sharing our Internet connection at home.  I was hoping to setup this On Networks N150R as a cheap but good replacement for them when I move out.  They would need the LuCI (web) interface, so I'm trying to find ways to free up some space while keeping LuCI.

tango wrote:

@jchau - Don't worry about me bricking the router. I got both of mine flashed to the NetGear firmware, so I think I'll stick with that. We'll  leave re-partitioning and fixing the firmware to the experts like you.

Thanks for the compliment.  I'm more of an advanced user than an expert at this point though, and I don't want to discourage you from experimenting with your router, I just wanted to warn against specific things like erasing the bootloader or the art partition.  Still, I'll let you all know if I make progress in shrinking the OpenWRT image.

I continued my experimentation by stepping back to 15.05. I flashed the N150R using the 15.05 sysupdate.bin through LuCi. Lo and behold, the configuration changes are kept and saved!

So based on jchau's suspicion that the filesystem is running out of room to store the configuration changes, the step from 15.05 to 15.05.1 was enough to surpass the filesystem limit.

I wonder how close to the limit that it is? I am using this router to tinker with OpenWRT to educate myself. It was a cheap router at Newegg. It only cost me $5.00. The cost along with the serial interface makes this a great board to tinker with.

For now, I'm going to leave it at 15.05 unless the group manages to develop a usable 15.05.1 image. I appreciate all of the knowledge that is shared here. Thank you guys for helping to educate the router hobbyist.

I have historically used dd-wrt in my routers, but I am really liking the OpenWRT infrastructure.

On-Networks N150R Router Serial Console Configuration

Terminal Settings:
Opening serial device (Your COM Port)
Configuring baud rate 115200
Configuring 8 data bits
Configuring 1 data bits
Configuring no parity
Configuring no flow control

On-Board Pinouts (JPA1)
4 - Ground (Pin is Closest to the Center of Board)
3 - RX
2 - TX
1 - Vcc +3.3V (NOT USED!, Identify by Square Solder Pad and White Dot on Board)

PL2303TA USB TTL to RS-232 Converter Serial Cable Used. Bought on eBay for $4.50 (US Seller). The PL2303TA Chip supports Win 8 and Win 10, older PL2303 chips do not.

I can confirm that downgrading to version 15.05 from 15.05.1 will allow the router to save configuration settings. Thanks bengal571!

df returns:

Filesystem           1K-blocks      Used Available Use% Mounted on
rootfs                     384       216       168  56% /
/dev/root                 2304      2304         0 100% /rom
tmpfs                    14368       488     13880   3% /tmp
tmpfs                    14368        44     14324   0% /tmp/root
tmpfs                      512         0       512   0% /dev
/dev/mtdblock5             384       216       168  56% /overlay
overlayfs:/overlay         384       216       168  56% /

dmesg returns:

[    0.000000] Linux version 3.18.20 (buildbot@builder1) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r46450) ) #1 Fri Sep 4 21:55:57 CEST 2015
[    0.000000] MyLoader: sysp=5a255faa, boardp=ffcd7faf, parts=5a355fba
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Atheros AR7240 rev 2
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x01ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x01ffffff]
[    0.000000] Initmem setup node 0 [mem 0x00000000-0x01ffffff]
[    0.000000] On node 0 totalpages: 8192
[    0.000000] free_area_init_node: node 0, pgdat 8034e2b0, node_mem_map 81000000
[    0.000000]   Normal zone: 64 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 8192 pages, LIFO batch:0
[    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: 8128
[    0.000000] Kernel command line:  board=WNR612V2 console=ttyS0,115200 mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,3712k(firmware),64k(art)ro rootfstype=squashfs,jffs2 noinitrd
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 28516K/32768K available (2621K kernel code, 129K rwdata, 344K rodata, 224K init, 194K bss, 4252K reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.000000] Clocks: CPU:400.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:5.000MHz
[    0.000000] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[    0.080000] pid_max: default: 32768 minimum: 301
[    0.080000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.100000] NET: Registered protocol family 16
[    0.100000] MIPS: machine is NETGEAR WNR612 V2
[    0.550000] registering PCI controller with io_map_base unset
[    0.560000] PCI host bridge to bus 0000:00
[    0.570000] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    0.570000] pci_bus 0000:00: root bus resource [io  0x0000]
[    0.580000] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.580000] pci 0000:00:00.0: [168c:002b] type 00 class 0x028000
[    0.580000] pci 0000:00:00.0: fixup device configuration
[    0.590000] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x0000ffff 64bit]
[    0.590000] pci 0000:00:00.0: supports D1
[    0.590000] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.590000] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    0.590000] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1000ffff 64bit]
[    0.590000] pci 0000:00:00.0: using irq 40 for pin 1
[    0.600000] Switched to clocksource MIPS
[    0.600000] NET: Registered protocol family 2
[    0.610000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.610000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.620000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.630000] TCP: reno registered
[    0.630000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.630000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.640000] NET: Registered protocol family 1
[    0.650000] PCI: CLS 0 bytes, default 32
[    0.650000] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.660000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.670000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.680000] msgmni has been set to 55
[    0.680000] io scheduler noop registered
[    0.690000] io scheduler deadline registered (default)
[    0.690000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.700000] console [ttyS0] disabled
[    0.730000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 12500000) is a 16550A
[    0.740000] console [ttyS0] enabled
[    0.740000] bootconsole [early0] disabled
[    0.750000] m25p80 spi0.0: found mx25l3205d, expected m25p80
[    0.760000] m25p80 spi0.0: mx25l3205d (4096 Kbytes)
[    0.760000] 4 cmdlinepart partitions found on MTD device spi0.0
[    0.770000] Creating 4 MTD partitions on "spi0.0":
[    0.770000] 0x000000000000-0x000000040000 : "u-boot"
[    0.780000] 0x000000040000-0x000000050000 : "u-boot-env"
[    0.790000] 0x000000050000-0x0000003f0000 : "firmware"
[    0.800000] 2 netgear-fw partitions found on MTD device firmware
[    0.800000] 0x000000050000-0x00000015e440 : "kernel"
[    0.810000] 0x00000015e440-0x0000003f0000 : "rootfs"
[    0.820000] mtd: device 4 (rootfs) set to be root filesystem
[    0.820000] 1 squashfs-split partitions found on MTD device rootfs
[    0.830000] 0x000000390000-0x0000003f0000 : "rootfs_data"
[    0.830000] 0x0000003f0000-0x000000400000 : "art"
[    0.880000] libphy: ag71xx_mdio: probed
[    1.480000] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:04 [uid=004dd041, driver=Generic PHY]
[    1.490000] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:MII
[    2.080000] ag71xx-mdio.0: Found an AR7240/AR9330 built-in switch
[    2.120000] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
[    2.130000] TCP: cubic registered
[    2.130000] NET: Registered protocol family 17
[    2.130000] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    2.150000] Bridge firewalling registered
[    2.150000] 8021q: 802.1Q VLAN Support v1.8
[    2.160000] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[    2.170000] Freeing unused kernel memory: 224K (80368000 - 803a0000)
[    3.470000] init: Console is alive
[    3.470000] init: - watchdog -
[    5.090000] usbcore: registered new interface driver usbfs
[    5.090000] usbcore: registered new interface driver hub
[    5.100000] usbcore: registered new device driver usb
[    5.110000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    5.120000] ehci-platform: EHCI generic platform driver
[    5.120000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    5.130000] ohci-platform: OHCI generic platform driver
[    5.580000] init: - preinit -
[    6.320000] random: procd urandom read with 10 bits of entropy available
[    8.380000] eth1: link up (1000Mbps/Full duplex)
[    9.680000] mount_root: no usable overlay filesystem found, using tmpfs overlay
[    9.730000] eth1: link down
[    9.740000] procd: - early -
[    9.750000] procd: - watchdog -
[   10.420000] procd: - ubus -
[   11.440000] procd: - init -
[   12.400000] NET: Registered protocol family 10
[   12.420000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   12.440000] Loading modules backported from Linux version master-2015-03-09-0-g141f155
[   12.450000] Backport generated by backports.git backports-20150129-0-gdd4a670
[   12.460000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   12.470000] nf_conntrack version 0.5.0 (449 buckets, 1796 max)
[   12.520000] xt_time: kernel timezone is -0000
[   12.550000] cfg80211: Calling CRDA to update world regulatory domain
[   12.580000] cfg80211: World regulatory domain updated:
[   12.580000] cfg80211:  DFS Master region: unset
[   12.590000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[   12.600000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   12.600000] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   12.610000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[   12.620000] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[   12.630000] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[   12.640000] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[   12.650000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[   12.650000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[   12.740000] PPP generic driver version 2.4.2
[   12.740000] NET: Registered protocol family 24
[   12.800000] PCI: Enabling device 0000:00:00.0 (0000 -> 0002)
[   12.810000] ath: phy0: Enable LNA combining
[   12.810000] ath: phy0: eeprom contains invalid mac address: ff:ff:ff:ff:ff:ff
[   12.820000] ath: phy0: random mac address will be used: e2:85:ac:fd:27:66
[   12.830000] ath: EEPROM regdomain: 0x0
[   12.830000] ath: EEPROM indicates default country code should be used
[   12.830000] ath: doing EEPROM country->regdmn map search
[   12.830000] ath: country maps to regdmn code: 0x3a
[   12.830000] ath: Country alpha2 being used: US
[   12.830000] ath: Regpair used: 0x3a
[   12.840000] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   12.850000] ieee80211 phy0: Atheros AR9285 Rev:2 mem=0xb0000000, irq=40
[   12.860000] cfg80211: Calling CRDA for country: US
[   12.860000] cfg80211: Regulatory domain changed to country: US
[   12.870000] cfg80211:  DFS Master region: FCC
[   12.870000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[   12.880000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 3000 mBm), (N/A)
[   12.890000] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 1700 mBm), (N/A)
[   12.900000] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2300 mBm), (0 s)
[   12.910000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 3000 mBm), (N/A)
[   12.920000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 4000 mBm), (N/A)
[   23.290000] jffs2: notice: (965) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[   26.300000] device eth1 entered promiscuous mode
[   26.340000] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   26.420000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   28.400000] eth1: link up (1000Mbps/Full duplex)
[   28.400000] br-lan: port 1(eth1) entered forwarding state
[   28.410000] br-lan: port 1(eth1) entered forwarding state
[   28.430000] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   30.410000] br-lan: port 1(eth1) entered forwarding state
[   71.750000] random: nonblocking pool is initialized

and 164K left for configuration!

http://i.imgur.com/90db0IF.jpg

(Last edited by tango on 3 Jun 2016, 20:53)

Okay, I have the step one 14.x image for tftp flashing, the instructions, and know to upgrade it to 15.05 instead of 15.05.1.

Where do I get the original on networks image in case i ever want to flash this thing back to original?

You can download my firmware builds (and the config.diff) from my Google Drive: https://drive.google.com/folderview?id= … sp=sharing
as always, use the sysupgrade.bin image if upgrading using an existing OpenWRT install or the factory.img image if upgrading using TFTP or the original firmware. 

Details:

I've rebuilt OpenWRT from the source at

git clone git://git.openwrt.org/15.05/openwrt.git

which is the source for Chaos Calmer (15.05.1).  (I used commit c0c7345214443ef906d6f96715972427147944cb, which is a few commits newer than the version used to build the flash image on the download page.)

I changed the config a bit to reduce the flash image's size by eliminating some features.  The main changes are:

  • disabled CONFIG_KERNEL_SWAP (we don't have space on the flash to hold a swap partition anyway)

  • disabled CONFIG_KERNEL_MAGIC_SYSRQ, which is only useful when a keyboard is attached

  • disabled CONFIG_KERNEL_DEBUG_INFO, CONFIG_KERNEL_DEBUG_KERNEL, CONFIG_KERNEL_KALLSYMS, and CONFIG_COLLECT_KERNEL_DEBUG, which are used to debug the kernel.  If the kernel does need to be debugged, you'll want to rebuild the firmware image with debugging enabled.

  • enabled CONFIG_LUCI_SRCDIET, which "Minify Lua sources"

I also enabled a few security features because I wanted them: CONFIG_KERNEL_CC_STACKPROTECTOR_REGULAR, CONFIG_PKG_CHECK_FORMAT_SECURITY, CONFIG_PKG_FORTIFY_SOURCE_1, CONFIG_PKG_RELRO_PARTIAL. 

Aside from these changes, my firmware images should be identical to the official ones at https://downloads.openwrt.org/chaos_cal … /generic/. 
I've saved the output of ./scripts/diffconfig.sh as config.diff; you can compare it to the official config.diff from https://downloads.openwrt.org/chaos_cal … onfig.diff.

You can download my firmware builds (and the config.diff) from my Google Drive: https://drive.google.com/folderview?id= … sp=sharing
as always, use the sysupgrade.bin image if upgrading using an existing OpenWRT install or the factory.img image if upgrading using TFTP or the original firmware. 

I've tested my openwrt-15.05.1-ar71xx-generic-n150r-squashfs-sysupgrade.bin on my own On Networks N150R, and here is the flash layout (as shown by the kernel log):

[    0.780000] Creating 4 MTD partitions on "spi0.0":
[    0.790000] 0x000000000000-0x000000040000 : "u-boot"
[    0.790000] 0x000000040000-0x000000050000 : "u-boot-env"
[    0.800000] 0x000000050000-0x0000003f0000 : "firmware"
[    0.810000] 2 netgear-fw partitions found on MTD device firmware
[    0.810000] 0x000000050000-0x00000014f440 : "kernel"
[    0.820000] 0x00000014f440-0x0000003f0000 : "rootfs"
[    0.830000] mtd: device 4 (rootfs) set to be root filesystem
[    0.830000] 1 squashfs-split partitions found on MTD device rootfs
[    0.840000] 0x000000380000-0x0000003f0000 : "rootfs_data"
[    0.840000] 0x0000003f0000-0x000000400000 : "art"

which provides a couple hundred kB of free space in rootfs_data to store configurations or maybe even install a package (e.g., I was able to install luci-ssl).

Here are the checksums.
MD5:

d1e2a47de3c80acc09bd175fa54429c7 *openwrt-15.05.1-ar71xx-generic-n150r-squashfs-factory.img
7208a560d354e876991150f9b759f81d *openwrt-15.05.1-ar71xx-generic-n150r-squashfs-sysupgrade.bin

SHA256:

SHA256(openwrt-15.05.1-ar71xx-generic-n150r-squashfs-factory.img)= b1fc60493cd4d30156ea9b2eef3b87e68dc019296e14ab8b56fba10c083723d6
SHA256(openwrt-15.05.1-ar71xx-generic-n150r-squashfs-sysupgrade.bin)= 36a98b8b81d0eae00aab412d437e1ab5dd68ab155ded36344f0617e450ffb640

I'm distributing these firmware images under the terms of the GPL v2.  You can ask me for a copy of the source, but it's unchanged and available at git://git.openwrt.org/15.05/openwrt.git.

(Last edited by jchau on 8 Sep 2016, 04:09)

jchau wrote:

You can download my firmware builds from my Google Drive: https://drive.google.com/folderview?id= … sp=sharing
as always, use the sysupgrade.bin image if upgrading using an existing OpenWRT install or the factory.img image if upgrading using TFTP or the original firmware. 
....snip.....
I've saved the output of ./scripts/diffconfig.sh as config.diff; you can compare it to the official config.diff from https://downloads.openwrt.org/chaos_cal … onfig.diff.

You can download my firmware builds from my Google Drive: https://drive.google.com/folderview?id= … sp=sharing
as always, use the sysupgrade.bin image if upgrading using an existing OpenWRT install or the factory.img image if upgrading using TFTP or the original firmware. 
......

Thanks for posting this it was very helpful! For anyone else looking for jchau's config.diff file, he has it posted at his google drive link. I mention this only because it took me a minute to figure out where it was.

I appreciate the effort you took in figuring what settings to change to get openwrt working on the N150 as I just picked one up for free after rebate. Thanks to you I have it running the master git branch of Chaos Calmer which is currently 15.05.1 r49403

I used your config.diff file as a baseline. I imported your changes with defconfig after renaming it to .config in the buildroot directory. Then I just updated the feeds and installed the luci feed, double checked menuconfig to make sure everything was setup the way I wanted (including luci) and built it. After compiling i flashed the openwrt-15.05.1-ar71xx-generic-n150r-squashfs-sysupgrade.bin from the bin directory from an already working barrier breaker version of openwrt and had no issues (I did not try a direct upgrade from factory firmware).
I can confirm settings are saving between reboots and everything appears to be working well.

The only thing I changed compared to your .diff file is that I had
CONFIG_LUCI_LANG_en=y instead of CONFIG_LUCI_SRCDIET=y
and then two extra lines from the _en language localization.
I mainly just wanted to compile it myself because I'm slightly more paranoid than is probably necessary big_smile

Thanks so much jchau!

If you or anyone else is interested my config.diff file was

CONFIG_TARGET_ar71xx=y
CONFIG_TARGET_ar71xx_generic=y
CONFIG_TARGET_ar71xx_generic_WNR612V2=y
CONFIG_IMAGEOPT=y
# CONFIG_KERNEL_CC_STACKPROTECTOR_NONE is not set
CONFIG_KERNEL_CC_STACKPROTECTOR_REGULAR=y
# CONFIG_KERNEL_DEBUG_INFO is not set
# CONFIG_KERNEL_DEBUG_KERNEL is not set
# CONFIG_KERNEL_KALLSYMS is not set
# CONFIG_KERNEL_MAGIC_SYSRQ is not set
# CONFIG_KERNEL_SWAP is not set
CONFIG_LUCI_LANG_en=y
CONFIG_PACKAGE_libiwinfo-lua=y
CONFIG_PACKAGE_liblua=y
CONFIG_PACKAGE_libubus-lua=y
CONFIG_PACKAGE_libuci-lua=y
CONFIG_PACKAGE_lua=y
CONFIG_PACKAGE_luci=y
CONFIG_PACKAGE_luci-app-firewall=y
CONFIG_PACKAGE_luci-base=y
CONFIG_PACKAGE_luci-i18n-base-en=y
CONFIG_PACKAGE_luci-i18n-firewall-en=y
CONFIG_PACKAGE_luci-lib-ip=y
CONFIG_PACKAGE_luci-lib-nixio=y
CONFIG_PACKAGE_luci-mod-admin-full=y
CONFIG_PACKAGE_luci-proto-ipv6=y
CONFIG_PACKAGE_luci-proto-ppp=y
CONFIG_PACKAGE_luci-theme-bootstrap=y
CONFIG_PACKAGE_rpcd=y
CONFIG_PACKAGE_uhttpd=y
CONFIG_PACKAGE_uhttpd-mod-ubus=y
# CONFIG_PER_FEED_REPO_ADD_COMMENTED is not set
CONFIG_PKG_CHECK_FORMAT_SECURITY=y
CONFIG_PKG_FORTIFY_SOURCE_1=y
# CONFIG_PKG_FORTIFY_SOURCE_NONE is not set
# CONFIG_PKG_RELRO_NONE is not set
CONFIG_PKG_RELRO_PARTIAL=y
CONFIG_VERSIONOPT=y
CONFIG_VERSION_DIST="OpenWrt"
CONFIG_VERSION_FILENAMES=y
CONFIG_VERSION_HWREV=""
CONFIG_VERSION_MANUFACTURER=""
CONFIG_VERSION_NICK="Chaos Calmer"
CONFIG_VERSION_NUMBER="15.05.1"
CONFIG_VERSION_PRODUCT=""
CONFIG_VERSION_REPO="http://downloads.openwrt.org/%n/%v/%S/packages"

(Last edited by HypervisorX on 5 Aug 2016, 13:35)

Thanks Jchau!

I just got my on networks N150 today to use as a repeater. If the theory that the space issues cause bricking with standard 15.05 then your custom build should be flash-able through the web interface.

I'm not too risk averse, I'll give it a try to confirm.

Thank you for your feedback, HypervisorX.  I added "...(and the config.diff) from my Google Drive..." to make it more obvious where I kept the config.diff.  And I do understand the paranoia; I would feel the same way about a binary firmware image from a relatively new and anonymous user.  But I'm glad I was able to help anyway. 

And giblesnot, I think it should work, though I haven't had the chance to try it from the stock firmware.  Thanks for testing it, and please do let us know whether it works. 


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

In the future, if/when I release firmware images here, I'll sign the firmware checksums so you can be (more) certain that it's from me.  (And this way, I'll be less anonymous.)

My public key fingerprint is: C1D6 D706 C141 2B4E 24D1  4B52 8107 B59D 76B6 863D.

SHA256(openwrt-15.05.1-ar71xx-generic-n150r-squashfs-factory.img)= b1fc60493cd4d30156ea9b2eef3b87e68dc019296e14ab8b56fba10c083723d6
SHA256(openwrt-15.05.1-ar71xx-generic-n150r-squashfs-sysupgrade.bin)= 36a98b8b81d0eae00aab412d437e1ab5dd68ab155ded36344f0617e450ffb640

- -Jimmy Chau
(jchau on forum.openwrt.org)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJX0OoFAAoJEFwE/iVKjEotyuIP/3AsP0EPgrQlMKEEjefTPdRJ
j+M6e2d3xR+ByltgVCDIoM6C3MYykmGaO35OwTIXeWM18VCVjYaMeH2FwPDLci9y
3bDMwiz4bwMnK77FIYuT9YQAhkn7d8+jcDpkvg9OfQeF3Ph9EAuNGFq/nSy52qjI
s8aTLdStqoNqmIEpetlf9sXI6/H5QmX+rvVqFPYIiEgdkIMyi4+U9ffziHgpZ+Lc
98FVf83HU9gRGr9RjFiBSIi7dNishbADR6gpOVl+/4fXmwfYDYQf+chjL7cFVLEm
NkPjk/eY+1NxlOqbXjvN6ZX1NDckUmET8CZe7PbEPf4LNY5TPKD+u96uocFdtN3L
RGEAR75RJPeqCDRc1yvOVsNQbFTcoqblEeHdwrSHdAjf1vOOdR7e0rCIL0693cNe
7h1cvogDOOccHdNJj/39W65IrH5CZRpwwpx75CkNQP5JR9xvfxU1VeOqGCXVcA6d
ZQ45HI/OvowmUelSClsfnaOqEU99dO7PqTqwnh7Q80Iz6ny0T9EdQRGnprvIslud
m+0tpUASs1tzg7o8tO5xFi9P+wVgLFjI5g8yUK2wXnxTigCcknixPCL5D9Hxpku7
+uKM3AFty3kh5+UKIADYYJMigUZOShVYtD2UShweQwTGurvVwOSCoRYx/fbLYWg/
4A9QYUtepx8Eps/fMnU+
=ShVC
-----END PGP SIGNATURE-----

Worked great flashing the .IMG right from the web interface of the stock firmware. Thanks again!

Just got my "Free after rebate" N150 from Newegg. Powered up, loaded factory.img via firmware update. Rebooted and working great. Config is saving. Thanks !!!!

Excellent!  Glad to hear it's working well.

@jchau


I would have preferred to PM so as not to hijack the thread but either I'm missing it or it's disabled.  Have you looked at Gargoyle at all which is based on Openwrt?  I wondered if it might provide a more user friendly frontend for newbies..it's based on openwrt.

They are  @gargoyle-router.com


[I'm not allowed to post urls as I'm to new]

*update*  I stand corrected.  There IS a gargoyle image under latest build for the wnr612v2 under AR71XX folder.

(Last edited by famewolf on 22 Sep 2016, 01:36)

Hey jchau!

Thank you for your work on this router.

I screwed up my router settings when I was configuring a wireless bridge. I managed to put the router in tftp recovery mode (indicated by a ~ 1-2 Hz green blinking power light and a steady green lan1 light). I tried two tftp binaries with no success -
windows native: tftp -i 192.168.1.1 PUT openwrt-ar71xx-generic-n150r-squashfs-factory.img
tftp from winagent.com: tftp -i -v -t2 -r60 192.168.1.1 PUT openwrt-ar71xx-generic-n150r-squashfs-factory.img

windows native timeout after sometime, winagent tftp keep retrying. One observation that I made is the blinking power light occasionally goes out for around 15 seconds when I try to use tftp. But it comes back blinking eventually.

I have set a static ip of 192.168.1.2, netmask 255.255.255.0 and gateway 192.168.1.1

I will boot up a live xubuntu on a laptop and try to tftp from there...

UPDATE:
I connected the router to another windows machine and had winagent tftp automatically retry every 2 seconds to upload the image, it succeed. If anyone is having similar issue you should just try a different machine.

(Last edited by kyzhk on 6 Oct 2016, 19:51)

I custom compiled a 15.05.1 release image for n150r with sqm-scripts but got rid of ipv6, luci, ppp and usb packages. The final image size is roughly 2.8mb in size. If there are any interests please let me know and I will write a small tutorial on this with a download link to the binary.

WIth sqm enabled I consistently tested A+ / A on bufferbloat test on dslreports.com

(Last edited by kyzhk on 10 Oct 2016, 05:08)

Hi jchau,

I'm trying to figure out how to setup VLAN tagging on the WAN. Are there any changes you made when getting the image to fit that might have removed that capability? maybe "•enabled CONFIG_LUCI_SRCDIET, which "Minify Lua sources". (Admittedly, I don't know if this router supports VLAN tagging on the WAN.)

Here is what I put on a separate post. "I have On Networks N150R with OpenWrt openwrt-15.05.1-ar71xx-generic-n150r-squashfs-factory.img from jchau’s Google drive (referenced this forum thread) installed – and apparently working. For use with CenturyLink GPON (fiber optic) Internet for the WAN I need VLAN autodetect, tagged, ID 201. Can I do this? I’m not finding it in the web-based setup interface. (I did find the PPOE login setting in the setup interface)."

Thanks.

(Last edited by donparda on 23 Oct 2016, 07:21)

A quick shout of thanks to @jchau and others that have contributed to this invaluable thread! Yesterday at this time I had never worked with OpenWrt. In a few hours after dinner, I now have 15.05 CC running on my N150R, which had been sitting on a shelf, never used, literally for a year or more.

Everything I've been through has been exactly as described in this thread. I bricked the device with 15.05.1, unbricked it with 14.07 via tftp, experienced the issue with settings not being saved, then backed off to 15.05 and all is well.

I'll run the device with 15.05 for a bit to try it out and get the feel of OpenWrt, then I may try @jchau's image or maybe (!) try to compile my own.

Thanks again, this forum is excellent and the OpenWrt web site is generally very good as well!

(Last edited by jchristensen on 14 Nov 2016, 15:35)

The discussion might have continued from here.