Build for WNDR3700v1/v2 / WNDR3800 (discontinued)

Thanks! I still have to fix my wifi. Perhaps I give the final a shot.

I am having trouble to sysupgrade from ar71xx-master-r11464-cabaaf06fe-20191109 to other builds.

Possibly something has broken for the ar71xx or specifically WNDR3700 sysupgrade in master.

Possibly this?
commit 11052900494ec8216b9b39ba0b24d5e036f4d323
Date: Wed Nov 6 10:43:14 2019 +0100
ar71xx: update uboot-envtools for Netgear WNR routers
Boards added: WNR1000v2, WNR2000v3, WNR2200, WNR612v2, WNDR4300.
Boards changed: WNDR3700 (u-boot env size is 2 sectors not 1).

Quite possibly. I noticed that uboot related commit yesterday, but had no time to triangulate the possible regression range with test builds.

Sounds like the sysupgrade might have been broken due to this:

recent changes had broken sysupgrade for ar71xx mikrotik rb-493g, traced the problem to missing /usr/share/libubox/jshn.sh after switching to tmpfs.

Possible fix in:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=b20b997c680e38f999e4608b158ef08718527ca0;hp=261c746631d2bf311a6b62a6d3bacce6fde90976

I will test during weekend.
(editing that one file manually should enable sysupgrading from the broken builds)

EDIT:
Yep. Manually doing that one-line edit of adding "/usr/share/libubox/jshn.sh" to /lib/upgrade/stage2 helped to sysupgrade away from ar71xx-master-r11464-cabaaf06fe-20191109

EDIT2:
Might be a wrong conclusion :frowning:

I managed to sysupgrade from r11464 to r11525, but sysupgrade from there to a 19.07 build failed at the first attempt (via LuCI), but a second attempt (via SSH console) succeeded.
Strange.

This looks like the fix:
commit fc44a8481cbf317febaf27a550e0c9fa49be68d5
Author: Adrian Schmutzler
Date: Thu Nov 14 17:26:44 2019 +0100

ath79: fix sysupgrade from ar71xx for WNDR3700 V2 and WNDR3800(CH)

ar71xx has just one board name "wndr3700" for WNDR3700 V1/V2,
WNDR3800 and WNDR3800CH, whereas ath79 provides separate images for
the boards. So, update SUPPORTED_DEVICES to store the correct
ar71xx board names.

Fixes: FS#2510

No. That has nothing to do with the bug I am intermittently seeing.

That fix only declares compatibility, making the usage of force unnecessary with a ar71xx--> ath79 sysupgrade.

My observation is about sysupgrade starting ok, but getting stopped before that actual flashing happens. I thought that the commit above that I referenced, was the fix, but that was likely only half of the fix.

I tried to update with the above fix but it did not work for me either. I am currently on ath79-master-r11447. My WNDR3700v2 is rebooting immediately without flashing at all although I have applied the fix above.

I think that there is something similar missing, like what b20b997c68 fixed: a missing script. Likely b20b997c68 fixed the bug just partially, and there is another currently needed script that may get lost.

But finding that will require attaching a serial cable for system console monitoring during the sysupgrade.

The interesting thing is that I have only seen the problem on ar71xx/ath79 WNDR3700 series, but not on ipq806x/R7800.

If you manually edit lib/upgrade/stage2 , you may succeed on some sysupgrade try.

I did edit this file, but my router just reboots before flashing.

how do you upgrade via ssh?

By downloading the firmware to /tmp and then using the sysupgrade script (which also LuCI used to actually do the sysupgrade).

For me it seems to be intermittent. First the flash fails, but the next attempt works.

I see this since more than half a year, that the first flash usually does not "hold"/succeed. The second one after the reboot coming from the unsuccessful flash so far always worked okay. Never bothered to dig deeper into this (would be great if the router could store an update log somewhere where it can be fund and read on next boot).

I noticed that maybe 1-2 months ago occasionally with WNDR3700, but so rarely that I did not look into it. Now it seems to be more frequent with the recent sysupgrade changes.

I perfectly managed to update today editing the file /lib/upgrade/stage2 replacing
"install_file /etc/resolv.conf /lib/.sh /lib/functions/.sh /lib/upgrade/.sh /lib/upgrade/do_stage2 $RAMFS_COPY_DATA"* with "install_file /etc/resolv.conf /lib/.sh /lib/functions/.sh /lib/upgrade/.sh /lib/upgrade/do_stage2 /usr/share/libubox/jshn.sh $RAMFS_COPY_DATA"*
and using the builds WNDR3700v2-master-r11558-3cee6f3f24-20191120-1926-sqfs-sysupgrade.bin (ath79-master) and WNDR3700-master-r11546-a74095c68c-20191119-1953-sqfs-sysupgrade.bin (ar71xx-master)

Thank you!

Hi hnyman,

I've tried to use your build scripts to do my own builds. But it seems that they are outdated. I managed to update the source files doing some fixes to paths in your scripts, but I've failed compiling them:

...make the firmware...
...create version info file...
hnscripts/timestampVersion.sh: line 8: files/etc/Compile_info.txt: No such file or directory
hnscripts/timestampVersion.sh: line 9: files/etc/Compile_info.txt: No such file or directory
fatal: not a git repository (or any of the parent directories): .git
hnscripts/timestampVersion.sh: line 10: files/etc/Compile_info.txt: No such file or directory
hnscripts/timestampVersion.sh: line 11: cd: feeds/luci: No such file or directory
hnscripts/timestampVersion.sh: line 11: files/etc/Compile_info.txt: No such file or directory
hnscripts/timestampVersion.sh: line 12: cd: feeds/packages: No such file or directory
hnscripts/timestampVersion.sh: line 12: files/etc/Compile_info.txt: No such file or directory
hnscripts/timestampVersion.sh: line 13: cd: feeds/routing: No such file or directory
hnscripts/timestampVersion.sh: line 13: files/etc/Compile_info.txt: No such file or directory
cat: files/etc/Compile_info.txt: No such file or directory
fatal: not a git repository (or any of the parent directories): .git
...make world...

I've called the updateNmake.sh from the parent folder as suggested in the readme. But it seems that the paths do not fit anymore. files/etc has moved to master/package/base-files/files/etc ? But from searching .../files/etc there seem to be some more options...

It would be great, if you could update the build scripts. Many thanks in advance!

BR. - nieroster

The current build scripts are included with each build I publish.

And nothing has moved to basefiles...

Sorry to bother you. There were a few misunderstandings. First I forgot the patch files, 2nd I used the general build scripts you have in your dropbox, not the ones for the specific build (ar71xx-master). I saw there is a hnscripts folder within master too. After changing to master and calling the build script from there everything worked like a charm!

Thank you again for your great work!

ar71xx-master-r11827-f8424b1b26-20191228

The recent ubus version upgrade two days ago caused a bug for system log, which bug has now been fixed. However, the change also caused some services not to start, e.g. collectd (= LuCI statistics) and nlbwmon. ldir figured out that those fail where the procd init file has a "nice" parameter definition:

I have implemented that workaround in my own build.
Hopefully the underlying bug (in ubus or procd) gets fixed, but until then the workaround is to have the nice definition before the command definition in the procd init file of a service. (Note that the bug may affect also other packages/services that define "nice", but those two are the main affected ones in my build.)

EDIT:
ath79-master-r11829-e3e939d8e6-20191228
The bug (that was in blobmsg handling in libubox) has been fixed.

One thing I've noticed with your latest ath79 builds: After the first hard reboot the WiFi LEDs seem to be messed up on my WNDR3700v2/WNDR3800. When deactivating the 5G network the green LED is off and vice versa. Can this be a settings issue?