edit the DTS file
make your own build
and if you think it needs to be like this for everyone you can make a pull request
the "reg" property is what you change
syntax is <start length>
whenever you change one value you have to do some math for the others
making sure the partitions are not overlapping
(when you make kernel larger, obviously make rootfs smaller)
partitions here should only be changed by multiples of 64k
(don't touch the last 4 zeros of each value)
here is DTS of EA3500 for example
partitions at line 145
Thank you, Michael @mpratt14 , for the helpful pointer.
It seems that your idea (the 3rd option) is much simpler and less risky to implement. There are a lot of unknown implications for options 1 and 2.
Repartition and install OpenWrt over mtd3 to mtd8
Over mtd5 to mtd8, leaving stock firmware alone
Make kernel (mtd3/5) larger and make rootfs (mtd4/6) smaller
If increasing the kernel size to 3072 KB, is it right that no u-boot variable changes will be needed? The mtdparts variable is ignored for EA3500/EA4500, too?
Although the reward (utilization of space on the 2 devices) is smaller, it will restore the booting capability form external storage. That can gain huge space.
By the way, what's in the partition mtd7 syscfg and what is it used for? I don't know how to open it for an inspection.
this is what repartitioning is...I'm not sure what you mean with "option 1"
keep in mind that if you do a sysupgrade, then it will install to the other set of kernel + rootfs
probably you have to follow factory install directions again to install to the same set
Option 3 doesn't quite work, as the new layout (bigger kernel smaller rootfs) trashes the stock firmware's rootfs. Not sure how to mandate on which set of kernel+rootfs OpenWrt resides in the stock flashing process and how to make the partition table dynamic in OpenWrt.
@mpratt14 , I'm trying Option 1, which combines partitions mtd3 thru mtd7 and allocates 3 MB to kernel and the rest to rootfs. I keep unused, a padding after s_env before kernel. Of course, there is lot of space to increase the kernel size to 4~8 MB.
Flash OpenWrt 19.07.x version of factory.bin in the stock Web interface. Set U-boot variables so that the new version of OpenWrt can be booted up from a USB drive. Alternatively, boot the new uImage in the console, with a serial cable.
sysupgrade sysupgrade.bin to the single set of kernel+rootfs.
Any other implications? I wonder why partition overlay (39 MB) is much smaller than rootfs (59 MB), given /rom is only 2.75 MB?