I'm reasonably certain sysupgrade is broken on the Linksys WRT32X. I'd love to hear from another user to confirm/refute this.
Sysupgrade (do not preserve) via GUI or CLI
Symptoms:
Device reboots (way too quickly, i don't think much of the upgrade happens at all)
-- boot_part/bootcmd remains as it was before sysupgrade, so it comes back to same partition
-- /etc/banner is now blank (part of the overlay is being erased??). Can't find any other files which are broken but i haven't looked extensively
-- Config remains intact as far as i can tell
IF i interrupt boot with serial and bring the system up (run bootcmd), then run the sysupgrade, interrupt again and bring the system up (run bootcmd), everything works as you would expect.
Take serial out of the equation and it goes pear shaped.
Anyone able to point me in the right direction for debugging this? I've tried but i'm currently out of ideas. Because the problem manifests with serial disconnected, it makes life hard.
Also with serial, am i supposed to be able to invoke this at ANY time and access the console? I do not seem to get any output/input unless i interrupt the boot process first.
So the problem appears to be that the console variable is getting corrupted during boot.
When i bring it up via serial: Kernel command line: console=ttyS0,115200 root=/dev/mtdblock6
When i let the system come up on its own:
Malformed early option 'console'
Kernel command line: console= root=/dev/mtdblock6
Discussion on IRC confirms that a lack of console would definitely cause a sysupgrade failure, as the commands would not be able to be run by the minimal user session.
Thoughts and ideas on fixing this? The u-boot environment appears to be ok, the command is just being mangled. Don't think hardcoding the cmdline in the DTS would be a great method as that would negate the benefits of dual partition firmware.
hello lantis -
what build are you refering to?
sysupgraded the davidc502 5/18 build a few tumes on my wrt32x without issue.
this morning i used mtd write to place the 5/23 lede 18.06 snapshot factory.img on kernel1 and am running that now. tonight i can test whether sysupgrade works or not.
i honestly cant remember if there was banner on an ssh connection.
fyi; let me know how i can help
Any/all of them as far as I am aware.
When it sysupgraded, did you do this through the GUI? If so, are you sure it came up to a new system on the opposite partition?
If you let the system boot normally (no serial), and run cat /proc/cmdline you should see a blank console variable which is the root of the issue.
Fascinating.
Can you provide a link to this snapshot please. I’ll tske a look.
Perhaps it only my local environment that is borked.
Just to confirm, you flashed this by using the GUI, and did not issue any boot commands from the U-Boot? i.e. the device was just powered on and booted without intervention.
i flashed the davidc 5/18 verion from the factory gui.
that got the davidc build on kernel2
i then ssh'd into davidc build on boot_part2 and mtd-wrote the factory snapshot (from the directory below) to kernel1, and rebooted into kernel1 (boot_part1)
this afternoon, as you had asked, I sysupgraded from the gui on kernel1. this got me back onto kernel2 (boot_part2)
the above terminal session is from ssh after the last step.
i'm not sure if htis is how it's supposed to work, but it does seem to switch partitions with sysupgrade.
(i actually would have thought not)
I originally flashed the May 18 factory image via serial using run update_both_images.
Before upgrading I checked with fw_printenv boot_part. Current partition is 1.
I used Advanced Reboot to switch to partition 2. LuCI comes up as a blank slate.
I switched back to partition 1 with fw_setenv boot_part 1.
Using LuCI I upgrade firmware with May 24 sysupgrade image.
WRT32X reboots normally, but in partition 1 and on May 18 version.
You’re not stuck, the OEM partition is still available.
If you overwrote the OEM partition using “upgrade_both_images” then that implies you have serial access so you can get back as well.
I’m trying to come up with a solution, but I need time. I’ve come up with an idea I’ll be testing this weekend.
This thread was to ask for assistance from the big guns, but so far no dice. So you’re stuck with me.
Yes this is what I had thought. Will be making a similar patch to “append-console” instead.
If that works in principle, then cleaning it up for submission as a patch will go ahead.
Where were you the last 2 days while I have been pondering this lol? I had this epiphany while on lunch today.
You don't need an append-console, you can just override the cmdline completely via dts and use the patch as-us, all what matters at that point is the "rootfs=/dev/mtdblock[68]" setting (the rest is static) so the correct rootfs for the (already loaded/ running) kernel gets mounted (I saw your questions on IRC about 6h later, but you never returned).
Compiling image with similar patch now.
I'm not sure how CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE will interact with CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER. I don't think it will be favourable.