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#821 - sysupgrade doesn't work on Linksys WRT3200ACM (mvebu) #5772
Comments
hnyman: I tested sysupgrading wrt3200acm from r4283 to r4291 and failed with similar symptoms as diizzyy. After a manual power-off the router rebooted to the old firmware, so no actual flashing had been done. But I sysupgraded ok from r4289 to r4291 with ipq806x R7800 that is also a NAND device, so sysupgrade still works for some targets. So, the bug may be related to just mvebu, not the general NAND sysupgrade. I noticed that the large sysupgrade patch set two days ago made target-specific changes to e.g. x86, sunxi and ramips, but did not touch mvebu. Maybe some target-specific change needs to be done also for mvebu. |
dedeckeh: lede-project/source@21f25bc is just about passing the firewall zone of the PPP master interface to the dynamic created DHCPv6 interface. This logic will only be triggered if you use a wan PPP interface; don't think this is the case in the described issue. |
hnyman: Yep, it is not related to that PPP commit. Like diizzyy says, the issue has been noticed already with r4263-c87aa0d and that PPP commit is much later. The problem is likely related to a large bunch of sysupgrade related commits just before r4263 (so far the earliest build found to fail). commit log leading to r4263: |
diizzyy: @ Hans: |
hnyman: I have narrowed down the regression range: r4249-393817df5d sysupgrade from this ok So, one of these commits makes mvebu wrt3200acm to fail in sysupgrade: 218af19 fstools: snapshot: handle jffs2 conversion using upgraded Of these, 30f61a3 looks most likely at the first glance. I reverted the changes done by 30f61a3 manually. So, it looks like the reason for the broken mvebu wrt3200acm sysupgrade is |
NeoRaider: Note that my sysupgrade patchset is not bisectable, either all or none of the patches should be applied for sysupgrade to work. I had intended to keep bisectability, but I didn't notice that the procd master was broken before I pushed my patches, so there was no nice way to achieve that... |
NeoRaider: In partiticular, reverting 30f61a3 will not lead to a working sysupgrade on NAND systems unless the procd upgrades are reverted as well. A serial console output with the following patch applied would be very interesting:
diff --git a/package/base-files/files/lib/upgrade/stage2 b/package/base-files/files/lib/upgrade/stage2
index cc8047d988..bf01ffd337 100755
--- a/package/base-files/files/lib/upgrade/stage2
+++ b/package/base-files/files/lib/upgrade/stage2
@@ -122,6 +122,9 @@ kill_remaining() { # [ [ ] ]
}
|
hnyman:
Too bad. So, my bisecting exercise was futile, right? Well, at least sysupgrading works until the middle of your patchset. |
NeoRaider: I have pushed a fix for an issue I found while reading the code to my staging tree at https://git.lede-project.org/?p=lede/neoraider/staging.git;a=summary . As I don't have a mvebu device, it's completely untested, but it might solve this problem... |
hnyman: Thanks, I will test it. One quick comment:
- [ -f /tmp/sysupgrade.tgz ] && {
- cp /tmp/sysupgrade.tgz /tmp/syscfg/sysupgrade.tgz
- }
I haven't checked, but is there now some other place where the settings are copied into /tmp/syscfg ? /tmp/syscfg is a flash partition mounted there and to my knowledge it is used for saving settings in sysupgrade. mvebu restores settings after syupgrade from there with /lib/preinit/81_linksys_syscfg: |
NeoRaider: Thanks for noticing, will fix. |
NeoRaider: New version pushed. I wonder though why /tmp/syscfg is mounted all the time, and not just shortly during boot and sysupgrade like it is done with the /boot partition on many targets. |
jow-: Yes and even if it is supposed to be persistently mounted, then /tmp/syscfg as mountpoint is an odd choice... Maybe its worth moving it to /var/lib/syscfg or something. |
NeoRaider: I don't think we have a /var symlink in the sysupgrade ramfs at the moment, so maybe /tmp/lib/syscfg. But I'll leave that change to someone who can actually test on mvebu :) |
hnyman:
Well, it is a large partition that offers some 30-70 MB storage space (depending on Linksys router model) that is accessible from both kernel1 and kernel2 partitions, so it can be used for various storage purposes for stuff that should be accessible from both alternative firmwares. (Originally it contains various stuff logs etc. for Linksys OEM firmware)
root@router2:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00200000 00020000 "u-boot"
mtd1: 00020000 00020000 "u_env"
mtd2: 00040000 00020000 "s_env"
mtd3: 00040000 00020000 "devinfo"
mtd4: 001e0000 00020000 "sysdiag"
mtd5: 05000000 00020000 "kernel1"
mtd6: 04a00000 00020000 "ubi"
mtd7: 05000000 00020000 "kernel2"
mtd8: 04a00000 00020000 "rootfs2"
mtd9: 05600000 00020000 "syscfg"
mtd10: 005c0000 00020000 "unused_area"
|
hnyman:
Looks good. I compiled r4293-7f9143168f plus your patch from https://git.lede-project.org/?p=lede/neoraider/staging.git;a=commitdiff;h=570e4c347bb60d17cca36df91fdd1eecadbd6de2;hp=7f9143168faef445effceead08d77ecc7c3e9dc6 I first flashed it from r4252 (with 30f61a3 reverted...) and then Flash went ok and also the settings got transferred ok. So, your patch looks ok to me. |
NeoRaider: Great, will push to master. |
diizzyy:
I haven't backtracked but r4263-c87aa0d and 21f25bc (buildbot snapshot) both have broken sysupgrade.
Unfortunately I don't have serial to my device but it kills all processes and just sits there, it does respond to ping so it doesn't hang but a hard reset is required. Once rebooted you're back on your old firmware again.
lede-project/source@c87aa0d
lede-project/source@21f25bc
The text was updated successfully, but these errors were encountered: