I have a very satisfactory dual wan set up on Netgear R6100 where one of the WAN is actually a Wireless client into neighbors Guest WiFi.
I have a spare WNDR4700 and I decided to install the latest OpenWRT 18.06.1 on it.
I first installed openwrt-18.06.1-apm821xx-nand-netgear_wndr4700-squashfs-factory.img using netgear firmware upgrade page.
Then I logged into Netgear4700/OPenWRT, changed password, assigned port 22 to lan for ssh and then using openwrt firware upgrade page, updated this to:
To my surprise they both report:
OpenWrt 18.06.1 r7258-5eb055306f / LuCI openwrt-18.06 branch (git-18.228.31946-f64b152)
For now it appears that everything looks normal but I have three issues:
When I connect the USB device like my phone to the USB3 port, the blue USB light on the router comes up and the phone starts to charge as well. Does that mean that no firmware package need to be installed for the USB ports to work?
On my software page, it reports only a fraction of NAND memory as ==>>>Free space: 99% ( 11.52 MB ). We know that this puppy has 128MB of flash. So what happened. Perhaps someone can point me in the right direction.
On the download page there is a file netgear_wndr4700-squashfs-kernel.dtb and I have no idea what use this is of. What are we supposed to use this for.
Many thanks for taking your valuable time in reading this note and I appreciate your volunteering to help.
I am not sure what you mean by /overlay
In my Netgear R6100 also there is 128MB of Flash and it shows Free space: 95% ( 94.59 MB )
This is when I go to SYSTEM >> SOFTWARE in the LUCI menu..
The output from cat /proc/mtd and from df -h and also from top is attached below:
The firmware in the USB3 chip can sometimes survive a reboot just fine. If you installed the image through the netgear's web-ui, then there's a good chance that it survived the following reboot. However, if you unplug the now-flashed router and turn it back on later and you don't have the usb3 firmware installed, it won't work anymore.
(and if you then manually install the firmware by placing the firmware file into /lib/firmware, you either have to reboot or reload the kernel driver module to get it working)
Yes, problem here is that the vendor firmware has placed important stuff after its "rootfs" partition, so if the partition is extended it will overwrite other partitions and this makes it difficult to return to the stock firmware easily.
But if you really want to use more of the provided flash and you are not afraid of making and maintaining your own images: you can just change the size (it's the second hexadecimal value in the reg pair) in the netgear-wndr4700.dts from 0x014e0000 to 0x7ac0000.
(It's a good idea to make a backup of partitions your are overwriting though and safe them on a PC or somewhere... - and also for the wifi_data partition!)
Note: it might also be possible to use the "ecos" partition (~96 MiB) as an extroot in the future. The partition is currently set to "read-only". But it was empty on my WNDR4700 and I have no idea what Netgear was planning there. If it turns out that this space can be safely used, then sure: let's do something with it.
It was used at some point in the past:
But it became redundant when the partitions had to be reorganized due to ever increasing kernel size:
I guess I'll axe it at some point... Unless someone else is "looking for an easy PR" and wants to do it?
I can put it back up, once someone from Renesas gives the go-ahead to send it to the firstname.lastname@example.org ML with a compatible license.
Ah the God has spoken! Thanks Christian, I appreciate your help:
Yes the USB 3 drivers are gone. I just fired up and it no longer charges or recognizes connected device.
Any idea where I can download the firmware and how do I manually place it in /lib/firmware? RCP/SCP/RSYNC??
I am not confident enough to change the size myself and or backup partitions on an embedded device. If it can't be changed by you or someone expert then I think I should consider using the exroot on a flash drive. I have used that recipe from Openwrt website in the past. But for that too I will need USB drivers.
I could use the SD Card slot to exroot the /overlay as I have many sd cards not in use and spare with me. But I wonder if that requires another set of drivers.
I can be a happy tester for you, if you'd like .... for wndr4700 and I can document my journey and put it into the forum for common cause.
The sdcard could be the better choice there. It is supported by the SoC's own usb 2.0 controller, so no firmware will be required. But it should also be possible to put the extroot on the HDD (provided you have one installed).
Further update: My SATA plans are in future but I decided to give a go to SDCARD. I put a ext4 formatted (mbr partition) into the slot and tried the 18.06.1 to recognize it. I tried the fdisk -l to see if there is any way to mount this partition. Then I loaded kmod ext4 and even then I wasn't able to see. So I decided to externally format this to fat32 and opkg added fs kmods as well. No luck still.
I used to have this puppy running fine on 17.01.4 and so decided to roll back the 18x to 17x using the LuCi firmware upgrade. There it refused to recognize and accept the openwrt image. After repeated try, I decided why not I restore to Netgear Factory condition using tftp and the netgear firmware from their site. Then just like the last time, I could move to 17.01.4 just like I did in the past. Picture of actual set up from that time is attached.
So my tftp to netgear factory went successful I left it on for 30 minutes to knock itself out updating and updating to its hearts delight....
NOW... This machine is partially functional. It boots and goes into first log in screen and displays netgear URL pointed to http://www.routerlogin.net/BRS_index.htm and then the ethernet connection disconnects. Moments later it comes up again and then it fails again. This it is doing in a perpetual do-loop.
Any advice? What I thought was an easy solution appears to have become obsession (wife thinks that) but we engineers don't give up. Do we?
Mike: I was clearing cache because I use private modes. Which clear cache as soon as I close browser.
However, using tftp, I have loaded the Netgear original WNDR4700_V184.108.40.206.img firmware.
However now the LAN ethernet is unstable. I have made thie tftp flash twice already and each time it said 19.2 seconds and loaded successfully but when it boots the the Netgear OEM, it goes into unstable perpetual connect disconnect of LAN connection. And this renders it useless.
Netgear went for an off-the-shelf GL827L SD/MMC/MS Flash Card Reader chip, which is soldered to the PCB and hardwired to the SoC's USB pins. The device should get announced during boot:
[ 8.862031] dwc2 4bff80000.usbotg: DWC OTG Controller
[ 8.867118] dwc2 4bff80000.usbotg: new USB bus registered, assigned bus number 1
[ 8.874527] dwc2 4bff80000.usbotg: irq 37, io mem 0x4bff80000
[ 8.880828] hub 1-0:1.0: USB hub found
[ 8.884761] hub 1-0:1.0: 1 port detected
[ 8.971348] usb 1-1: new high-speed USB device number 2 using dwc2
and once userspace is ready and loaded (kmod-) usb-storage, it should detect a device
Switching between 17.01.x and 18.06 is a pain because the NAND partition layout has changed because the kernel got too big. That's why the the patch:
included the recommendation to go with the tftp method.
Hm, is the LAN unstable in u-boot, the stock netgear firmware or just now in OpenWrt 18.06/-master?
the LAN and WAN ports are all handled by an AR8327N switch. The ethernet "eth0" doesn't directly receive any actual link information so it should never get into a DOWN state on its own, so a daemon or scripts needs to put it there.
I tried but none of my sd cards (tried both mbr and gpt) were accepted and I did not see them in /dev or fdisk .. I should have checked dmesg and I still will next time I start to monkey with it. Right now its on a mission critical role (serve internet at my home!).
To make it silent, I opened the box and unhooked the 3 pin fan connector and used a double sided 3M take to stick in a 2.5 in SSD drive inside it. The kmod-fs-ext4 was addded along with samba and now I have an additional 500MB swap file in it and a share directory for sharing files.
I would love to put a LAMP in it some day to run local drupal / wp off it but that I will do when I can comprehend how to enlarge the /overlay that may be leaving bunch of wasted flash. It does have 128MB and 256MB RAM.
Totally understood the 3.5 MB challenge. I think I will take a back up of config. Roll back to Netgear Factory and then go straight to 18x and then upload config bundle.
I wish I was technical enough to do that. I will upgrade to 18.x when you have lifted your proverbial axe! In the meanwhile I will clean up the recipe for dual wan set up that I want to share for this machine.
I will test the usb ports out in the next couple of days and report back and WILL leave a like there. Its a great help.
I have not done a detailed RCA but I am confident that the problem would have been one of my retractable Ethernet cable that I junked and did not see the problem since.
If you do, you should check if the sdcard "suddendly" pops up, if you reload the dwc2 or usb-storage kernel module. The sdcard media change detection is handled by a "virtual" button event BTN_1, is triggered if you insert/remove a sdcard from the slot.
The usb-storage module has no way of monitoring sdcard presence on its own. On full desktop linux distributions this isn't much of a problem for those cardreader chips, since daemons like udisks do the media polling there. But OpenWrt doesn't have the udisks daemon so the WNDR4700 currently has a "hack":
that does trigger the media change detection be unloading and reloading the dwc2 module (usb driver) based on virtual BTN_1 state.
The fan is software controllable. From what I remember (haven't touched the WNDR4700 in a long time), you should be able to control it through the /sys/class/hwmon inteface. Just note: There are two hwmon instances, one is the lm87-like temperature sensors, the other the tc654 fan controller.