Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#2510 - WNDR3700v2, WNDR3800 unable to update from ar71xx-generic to ath79 #8074

Closed
openwrt-bot opened this issue Sep 17, 2019 · 10 comments
Closed
Labels

Comments

@openwrt-bot
Copy link

openwrt-bot commented Sep 17, 2019

txt.file:

======device======

  • WNDR3700v2
  • WNDR3800

======Software version of OpenWrt release======

  • tested on master branch

======Steps to reproduce======

  • install openwrt-trunk ar71xx-generic image on device
  • copy openwrt-trunk ath79 image to device
  • sysupgrade from ar71xx-generic to ath79
  • get error message that device is not correct

======other======
Tried that a month ago. Will add further information as soon as I find time. I would really love to patch this but will need some help. I own both devices and can test.

@openwrt-bot
Copy link
Author

openwrt-bot commented Sep 21, 2019

hnyman:

You can use the "-F" or "--force" option in sysupgrade to jump between ath79 and ar71xx firmwares for WNDR3700v2 and WNDR3800. The configs are practically identical. (I do that frequently when testing my community build.)

@openwrt-bot
Copy link
Author

openwrt-bot commented Sep 21, 2019

ynezz:

get error message that device is not correct

Please provide the error message.

@openwrt-bot
Copy link
Author

openwrt-bot commented Sep 21, 2019

ynezz:

You can use the "-F" or "–force"

This switch is very dangerous and should be used as a last resort and only if the people know how to unbrick their router.

@openwrt-bot
Copy link
Author

openwrt-bot commented Sep 23, 2019

txt.file:

flashed https://downloads.openwrt.org/snapshots/targets/ar71xx/generic/openwrt-ar71xx-generic-wndr3700v2-squashfs-sysupgrade.bin (2019-06-17) onto a wndr3700v2

root@OpenWrt:/# cat /proc/cpuinfo
system type : Atheros AR7161 rev 2
machine : NETGEAR WNDR3700/WNDR3800/WNDRMAC
processor : 0
cpu model : MIPS 24Kc V7.4
BogoMIPS : 452.19
wait instruction : yes
microsecond timers : yes
tlb_entries : 16
extra interrupt vector : yes
hardware watchpoint : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa : mips1 mips2 mips32r1 mips32r2
ASEs implemented : mips16
Options implemented : tlb 4kex 4k_cache prefetch mcheck ejtag llsc dc_aliases perf_cntr_intr_bit nan_legacy nan_2008 perf
shadow register sets : 1
kscratch registers : 0
package : 0
core : 0
VCED exceptions : not available
VCEI exceptions : not available

root@OpenWrt:/# wget http://downloads.openwrt.org/snapshots/targets/ath79/generic/openwrt-ath79-generic-netgear_wndr3700v2-squashfs-sysupgrade.bin
Downloading 'http://downloads.openwrt.org/snapshots/targets/ath79/generic/openwrt-ath79-generic-netgear_wndr3700v2-squashfs-sysupgrade.bin'
Connecting to 2a01:4f8:150:6449::2:80
Writing to 'openwrt-ath79-generic-netgear_wndr3700v2-squashfs-sysupgrade.bin'
openwrt-ath79-generi 100% |*******************************| 4032k 0:00:00 ETA
Download completed (4129066 bytes)
root@OpenWrt:/tmp# sysupgrade -n openwrt-ath79-generic-netgear_wndr3700v2-squash
fs-sysupgrade.bin
Device wndr3700 not supported by this image
Supported devices: netgear,wndr3700v2 wndr3700v2
Image check 'fwtool_check_image' failed.
root@OpenWrt:/tmp#

I expect that the problem to be in "target/linux/ar71xx/image/generic.mk". The BOARDNAME is not set for wndr3700v2 / wndr3800.

@openwrt-bot
Copy link
Author

openwrt-bot commented Sep 24, 2019

hnyman:

To my knowledge, the one-time transition logic from ar71xx to ath79 is not complete for most ar71xx devices, as the DTS based device name detection in ath79 deviates from the old mach file based one in the old ar71xx. You practically need to force the sysupgrade, or use a tool like the Netgear TFTP recovery tool to flash the ath79 build.

For ar71xx the BOARDNAME is WNDR3700 for all three routers in the series (3700, 3700v2, 3800) and a separate NETGEAR_BOARD_ID separates them.

In ath79 the boardname (compatible string) is defined for each device in DTS with a different naming structure than in ar71xx.

For the ath79 sysupgrade to be compatible aith the sysupgrade logic in ar71xx, 3700v2 should declare compatibility with WNDR3700, which is not wanted.

You are talking about one-time transition logic from ar71xx to ath79 target for an ancient router. So the issue is not major, and likely nobody will create a fix unless you do it by creating logic for ar71xx to accept just the correct ath79 sysupgrade files while still maintaining the correct separation of router versions inside both ar71xx and ath79.

Ps. For WNDR3700, 3700v2 and 3800 the configs in ar71xx and ath79 are compatible. I have been constantly jumping between them as I have tested my community build for the 3700 series (which has been running since year 2011). Using the force flag in WNDR3700 sysupgrade for ar71xx --> ath79 --> ar71xx works quite ok, although Petr raised concern about mentioning it.

@openwrt-bot
Copy link
Author

openwrt-bot commented Sep 24, 2019

ynezz:

If I understand all this correctly following patch should fix it https://gitlab.com/ynezz/openwrt/commit/2d3a4b208f811b6ec3380feac527cbbe5968075c

@openwrt-bot
Copy link
Author

openwrt-bot commented Sep 25, 2019

txt.file:

compilation is running. I will runtime test it next Monday.

@openwrt-bot
Copy link
Author

openwrt-bot commented Sep 30, 2019

@openwrt-bot
Copy link
Author

openwrt-bot commented Sep 30, 2019

txt.file:

3800 also tested and works too. This time tested with "preserve config".

Thanks Petr.

@openwrt-bot
Copy link
Author

openwrt-bot commented Nov 14, 2019

adrianschmutzler:

ynezz and I agreed that we will address this differently:
We won't change the boardnames in ar71xx, but just add the shared boardname in ar71xx to the SUPPORTED_DEVICES in ath79.

Patch: https://git.openwrt.org/?p=openwrt/staging/adrian.git;a=commitdiff;h=3f12d2b1ab7f88cadfe6b089bf88b5ee98c82ae1

This will enable to upgrade to ath79 directly without flashing an intermediate version. (Though it will theoretically introduce the problem that someone can flash wndr3700v2 image on wndr3700v1 when upgrading from ar71xx.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant