That would likely fail due to the two-step OpenWrt sysupgrade, like I said in my original message, linked in the first message of this thread.
Writing rootfs based on the currently running firmware's DTS partition table would likely overwrite the last part of kernel. (OpenWrt first writes kernel, and separately rootfs to the location specified by the currently running firmware)
I propose going via Linksys OEM firmware, or any other way to write a unified "factory" image instead of the two-part sysupgrade image.
(That's why ipq806x required flashing via OEM GUI or TFTP recovery flash)
Ps.
Sysupgrade force-flashing the OpenWrt factory image might also work, as you can return to OEM firmware via force, so the OpenWrt factory image should be similar as OEM images, and might work.
E.g. for my WRT3200ACM the factory image is 4 MB larger than the sysupgrade image, as the factory image contains lots of 00 padding upto 0x600000 (from the end of the actual kernel to end of the kernel area = the start of rootfs)
EDIT:
just to highlight the possible issue with "normal" sysupgrade, this is the structure of the wrt3200acm sysupgrade image: a TAR archive with separate kernel and rootfs files, which will be flashed separately according to the places specified by the currently running partition structure:
I have booted mamba with the 4MB patch.
I first tested force flashing a regular factory image.
It worked fine.
So then I force flashed a factory image with the resize patch.
Restored backup.
And everything seems to be working.
There is an mtdparts variable passed on the kernel command line with obviously wrong variables. Does OpenWrt make use of that? It shows (ignored) a line later.
The next thing would be sysupgrading with the modified sysupgrade image. As you are now running with the modified partition table, sysupgrade should work just fine.
Ps.
You might also look from the kernel log the mtd detection section. It shows you better the start and end of each partition.
@anomeome
I backed up.
I flashed the factory image from sysupgrade, force checked, keep settings unchecked.
Restored the backup.
I have no intent to ever run the outdated, insecure, proprietary firmware from LINKSYS.
My understanding is that flashing the factory image basically dd's the image into the kernel partition, which is 40MB and includes the root partition. That is why it has padding in it.
Normal sysupgrade flashes each partition separately like @hnyman mentioned which won't work because the currently loaded mtd region values are the old/wrong ones.
3381799 Feb 6 13:33 linksys_wrt1900ac-v1-kernel.bin
16252928 Feb 6 13:33 openwrt-mvebu-cortexa9-linksys_wrt1900ac-v1-squashfs-factory.img
14122142 Feb 6 13:33 openwrt-mvebu-cortexa9-linksys_wrt1900ac-v1-squashfs-sysupgrade.bin
but I think it would be prudent to try and get as close as possible to the limit.
Nice work. However Venom i thought had a 6mb kernel partition or at least 0x600000 / 6291456 (SI base 10) is what i thought it was with Hex to decimal SI base 10 being bytes which make 6MB.
However its awesome, however it then needs to be reviewed by the team surely for it to get merged. I Take it this also means you loose /root storage space over all and it doesn't over write the second partition.