Hi,
OK, a bit of an update - was able to crawl (two-step ) my way back, wanted to capture it here for others, hopefully it helps. Thanks @bobafetthotmail for the pointers above! It took a bit to sink in (issue on the receiver end ... LOL!), but once it did, it hit me how to make this work.
A couple key things that play into this - by all means yell if I have any of this wrong!
a) Partition sizes are set when the kernel boots, and the sizes / alignment are taken from the dts values built into the kernel (i.e. from source)
b) sysupgrade doesn't care about or work with sizes, it just "raw" writes to the partitions that exist (and are determined when the kernel boots, from a) above)
c) Dual partition flash is part of how to create (and fix) this issue ... as the non-active sizes can be set "incorrectly" => meaning that the values on the alternative (non-active) side may not match to what is actually flashed there. And it doesn't matter, as these are not in use, for operation at least.
Once I wrapped my head around this, here is how I was able to go back from both current and alternative having 3 MB flash, to the more stock value (2624 kB). Of course, all of this also assumes you can make a custom build, to mess with these settings.
- Select a partition to start from (the one that is active). Modify the dts file, to set the desired target / final size of that kernel (the active side), but keep the "other" inactive side sizing to match what is there already (i.e. 3 MB in my case). I know this sounds screwy, but it's because when you flash dual-partition routers, it always flashes to (and then boots), the inactive side. So ... make this build, then flash it. It will come up, with still the larger size in the (now) booted side, but the (now) inactive side will have the desired partitioning. It won't be a functional side right now, as the partitions won't match to what is actually in flash (i.e. they will be misaligned). But,
- Make a new build, this time with the dts file modified to get to the final sizes on both partitions (i.e. in my case, both now back to 2624 kB). Build this, flash => now, you will come back to the partition you started this two step on, as the second flash was done based on the misaligned (but desired) partition sizes. So when it boots up ... life is good, back to the desired (smaller) sizing.
- Flash one more time, with the same build (image) as in step 2. This is to "solidify" that both (dual) partitions now have correct sizing.
All clear as mud? . It really does work (and did!) - just a bit of a two-step (dance) to get there. Of course, yell if you see any issues.
And, as a bit of an added "bonus", this can also be used to get back to OEM stock on one partition if you like. But not 100% straightforward. That's because the OEM file seems to be more of a raw (kernel + rootfs), and needs to be flashed as kernel only. So ... change the dts, to allocate almost the full size of one "side" to kernel, very little to rootfs (but don't remove rootfs, or you won't be able to boot - the total number of partitions can't change, this is key for booting). Then, flash OEM to the large (alternative) side, and reboot. It does come up!
Yell if you have any questions or comments, or if any of this doesn't make sense. I just wanted to try to share this back to folks.
And again, @bobafetthotmail - thanks for the pointers! Also - I do agree with your note ... tftp booting initramfs-uImage is easier, if you have serial port access. Buf if you don't (or don't want to open the router), you can follow the above steps.