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#840 - AR71xx - Recent firmware won't flash (building without errors) #6226

Closed
openwrt-bot opened this issue Jun 12, 2017 · 15 comments
Closed
Labels

Comments

@openwrt-bot
Copy link

juanriccio:

Device: TP-Link TL-WR841N/ND v8

LEDE release: anything I tried after r4335

Steps to reproduce:

  • Build: make defconfig, make menuconfig, specify target = TL-WR841N/ND v8, exit (save), make defconfig, make. Everything OK.
  • Try to flash (I use LuCI). After the usual "don't turn me off" screen, the router page reappears and the firmware hasn't been updated. It's still the previous version.
@openwrt-bot
Copy link
Author

pepe2k:

Hi juanriccio,

I just tested sysupgrade (in LuCI) on TL-WR841Nv8: LEDE 17.01.0 -> LEDE 17.01.1 -> LEDE 17.01.2 -> LEDE trunk -> LEDE trunk. No problems on my side.

Please, try latest snapshot image and provide your config file used for build the image.

Cheers,
Piotr

@openwrt-bot
Copy link
Author

juanriccio:

Thanks for your reply, Piotr.

I just did the same, building r4588 from source. I am attaching diffconfig's output config.seed. The only option I changed from the defaults is to have the version number in the filename.

I confirm the result is as I said: the system appears to upgrade, but it comes back up too fast: and indeed the firmware version hasn't changed.

@openwrt-bot
Copy link
Author

juanriccio:

Tried upgrading again to r4610.

No way, it won't actually upgrade. This has started when I got r4335 in: it was a same-day build.

What's funny is that I have three TP-Link TL-WR841N/ND v8 routers (used as simple access points), and all three showed and show the exact same behavior. All of them upgraded nicely just up to, but not beyond, r4355.

I only tried upgrading via LuCi. How can I diagnose the situation and get some log or other information without bricking them?

@openwrt-bot
Copy link
Author

juanriccio:

I've been trying to flash a new firmware several times now. Several versions, all built without errors. The router won't even reboot after I flas via LuCi. Something must be amiss. How can I reset the router without bricking it, so I can try flashing from scratch?

@openwrt-bot
Copy link
Author

pepe2k:

Hi juanriccio,

Please, login to the router over SSH, download snapshot image to /tmp and try upgrade from command line, using "sysupgrade".

Please, provide whole log from your SSH session.

Cheers,
Piotr

@openwrt-bot
Copy link
Author

juanriccio:

Hello Piotr,
thanks for your kind offer of help. To avoid bricking the router, I just want to make sure:

  • 'download snapshot image'. You mean the binary made from the distribution, i.e., something like lede-snapshot-r5240-e0bd225-ar71xx-generic-tl-wr841-v8-squashfs-sysupgrade.bin ?

  • I will use curl to copy that file in /tmp, because the stripped down image running at the moment doesn't include ftp, tftp, etc. Is there anything I should know about moving binary files?

  • Last but not least, how do I save a log? Would the output from
    sysupgrade | tee
    be allright?

Thanks again,
-Juan

@openwrt-bot
Copy link
Author

pepe2k:

Hi juanriccio,

Yes, download sysupgrade image to /tmp, using wget/curl or whatever else works for you. You can also download it to your PC and transfer over SCP to the router.

Please use logging functionality in your ssh client, e.g. Putty can do it. You need to log the session on your PC, not on the router.

Cheers,
Piotr

@openwrt-bot
Copy link
Author

juanriccio:

Hello Piotr, thanks for the explanation. Here is the log of a PuTTY session where I try to flash both the default image supplied by LEDE and an image I compiled myself.

@openwrt-bot
Copy link
Author

mkresin:

According to your putty log, the issue is the currently installed LEDE version and not the image you're trying to update to:

killall: watchdog: no process killed
Commencing upgrade. All shell sessions will be closed now.
Command failed: Method not found

Something is clearly wrong with the currently installed image.

Please follow https://wiki.openwrt.org/toh/tp-link/tl-wr841nd#tftp_recovery_via_bootloader_for_v8_v9_v10_v11_v12 to upgrade to a recent snapshot via tftp recovery.

I'm quite sure the sysupgrade issue is already fixed in recent snapshots.

Please report any results here.

@openwrt-bot
Copy link
Author

juanriccio:

Hello Mathias, thanks for the suggestion.

I followed your link and tried the procedure, but when the router comes up after powering on with the Reset key pressed, apparently it doesn't take the IP addr mentioned in the procedure (192.168.0.86). Rather, it takes 192.168.1.1. The "lock" LED never gets lit - at least within a couple of minutes. And the router doesn't try to tftp any image, according to the server I installed on my PC (OpenTFTP v1.64). I kept an eye on OpenTFTP Server's window to see if there were any requests, and there weren't any. Of course, I assigned my PC an address in the 192.168.1.x subnet after finding out the router's default IP address.

You say "I'm quite sure the sysupgrade issue is already fixed in recent snapshots."
Do you mean there was a known issue with some releases that broke sysupgrade? My router is stuck on Lede r4335.

Any other suggestion will be most welcome.
Thanks again for your help!

@openwrt-bot
Copy link
Author

pepe2k:

Hi juanriccio,

If failsafe works on your system, you can try to upgrade with mtd utility, without sysupgrade use, e.g.:

mtd -e firmware -r write sysupgrade.bin firmware

Cheers,
Piotr

@openwrt-bot
Copy link
Author

juanriccio:

Thanks for the quick reply, Piotr!

Is it possible to tell if failsafe will work by looking at the manifest? I am pasting it below.

I'm asking because one thing I'm afraid of is bricking the router. I have no hardware skills, so if it can't be unbricked by software/ethernet connection, I'd just have to throw it away.

MANIFEST

base-files - 172-r4335-2cc61e6
busybox - 1.26.2-7
curl - 7.54.0-1
dnsmasq - 2.77-1
dropbear - 2017.75-1
firewall - 2017-05-27-a4d98aea-1
fstools - 2017-05-09-c43ae11e-2
fwtool - 1
hostapd-common - 2016-12-19-ad02e79d-3
ip6tables - 1.6.1-1
iptables - 1.6.1-1
iw - 4.9-1
iwinfo - 2016-09-21-fd9e17be-1
jshn - 2017-02-24-96305a3c-1
jsonfilter - 2016-07-02-dea067ad-1
kernel - 4.4.70-1-840efd08358a0a6439b5a102b854310b
kmod-ath - 4.4.70+2017-01-31-2
kmod-ath9k - 4.4.70+2017-01-31-2
kmod-ath9k-common - 4.4.70+2017-01-31-2
kmod-cfg80211 - 4.4.70+2017-01-31-2
kmod-gpio-button-hotplug - 4.4.70-2
kmod-ip6tables - 4.4.70-1
kmod-ipt-conntrack - 4.4.70-1
kmod-ipt-core - 4.4.70-1
kmod-ipt-nat - 4.4.70-1
kmod-lib-crc-ccitt - 4.4.70-1
kmod-mac80211 - 4.4.70+2017-01-31-2
kmod-nf-conntrack - 4.4.70-1
kmod-nf-conntrack6 - 4.4.70-1
kmod-nf-ipt - 4.4.70-1
kmod-nf-ipt6 - 4.4.70-1
kmod-nf-nat - 4.4.70-1
lede-keyring - 2017-01-20-a50b7529-1
libblobmsg-json - 2017-02-24-96305a3c-1
libc - 1.1.16-1
libcurl - 7.54.0-1
libgcc - 5.4.0-1
libip4tc - 1.6.1-1
libip6tc - 1.6.1-1
libiwinfo - 2016-09-21-fd9e17be-1
libiwinfo-lua - 2016-09-21-fd9e17be-1
libjson-c - 0.12.1-1
libjson-script - 2017-02-24-96305a3c-1
liblua - 5.1.5-1
libmbedtls - 2.4.2-1
libnl-tiny - 0.1-5
libpthread - 1.1.16-1
libubox - 2017-02-24-96305a3c-1
libubus - 2017-02-18-34c6e818-1
libubus-lua - 2017-02-18-34c6e818-1
libuci - 2016-07-04-e1bf4356-1
libuci-lua - 2016-07-04-e1bf4356-1
libuclient - 2016-12-09-52d955fd-1
libustream-mbedtls - 2016-07-02-ec80adaa-2
libxtables - 1.6.1-1
logd - 2017-03-03-21a4bd04-1
lua - 5.1.5-1
luci - git-17.152.82962-a9e8376-1
luci-app-firewall - git-17.152.82962-a9e8376-1
luci-base - git-17.152.82962-a9e8376-1
luci-lib-ip - git-17.152.82962-a9e8376-1
luci-lib-json - git-17.152.82962-a9e8376-1
luci-lib-jsonc - git-17.152.82962-a9e8376-1
luci-lib-nixio - git-17.152.82962-a9e8376-1
luci-mod-admin-full - git-17.152.82962-a9e8376-1
luci-proto-ipv6 - git-17.152.82962-a9e8376-1
luci-proto-ppp - git-17.152.82962-a9e8376-1
luci-ssl - git-17.152.82962-a9e8376-1
luci-theme-bootstrap - git-17.152.82962-a9e8376-1
mtd - 21
netifd - 2017-05-27-08f18752-1
odhcp6c - 2017-03-22-0463b057-1
odhcpd - 2017-05-15-93abe6f0-1
opkg - 2017-05-03-04e279eb-1
procd - 2017-03-05-8f218f56-1
px5g-mbedtls - 4
rpcd - 2016-12-03-0577cfc1-1
swconfig - 11
uboot-envtools - 2015.10-1
ubox - 2017-03-03-21a4bd04-1
ubus - 2017-02-18-34c6e818-1
ubusd - 2017-02-18-34c6e818-1
uci - 2016-07-04-e1bf4356-1
uclient-fetch - 2016-12-09-52d955fd-1
uhttpd - 2016-10-25-1628fa4b-2
uhttpd-mod-ubus - 2016-10-25-1628fa4b-2
usign - 2015-07-04-ef641914-1
wpad-mini - 2016-12-19-ad02e79d-3

@openwrt-bot
Copy link
Author

pepe2k:

Hi juanriccio,

Is it possible to tell if failsafe will work by looking at the manifest? I am attaching it.

No, have a look here:
https://lede-project.org/docs/user-guide/failsafe_and_factory_reset

@openwrt-bot
Copy link
Author

mkresin:

You say "I'm quite sure the sysupgrade issue is already fixed in recent snapshots."
Do you mean there was a known issue with some releases that broke sysupgrade? My router is stuck on Lede r4335.

Well, snapshot is our development version. From time to time stuff simply breaks. Todays snapshots are r5392. I wouldn't be surprised if one of the last 1000 commits fixed the issue you are seeing.

Not sure if your r4335 is a selfbuild image or an image from the LEDE download site. In case it is self build, you might have a miss-compiled image or missing some packages.

I'm asking because one thing I'm afraid of is bricking the router. I have no hardware skills, so if it can't be unbricked by software/ethernet connection, I'd just have to throw it away.

You don't have much options. Sysupgrade of your currently installed image is broken, so there is no easy/risk-free way to upgrade to a recent snapshot (since tftp doesn't seem to work).

@openwrt-bot
Copy link
Author

juanriccio:

Mathias Kresin and Piotr Dymacz, thanks a lot!

It took me some time to get around to it, but when I tried again, I followed your
advice, and the problem was solved.

As you suggested, it must have been the previous image that was missing some
crucial component for sysupgrade.

Here's my report of how I managed to fix the problem.

I followed the instructions here:
https://lede-project.org/docs/user-guide/failsafe_and_factory_reset
to get the router booted in failsafe on 192.168.1.1.
Then I SSH-ed into the router using PuTTY, downloaded a freshly compiled image
into /tmp, and flashed it using mtd.

I verified that the new image can indeed be sysupgraded via LuCi.

Note - My previous unupgradable image was self-built, indeed, but I only made a
few changes from default, and I took away only stuff like PPP/PPPoE. The
present, working image, is also self-built, from the very same config.seed.

Thanks again for your help. Without you, I'd never figured out the mtd part.

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