Coincidentally, I've been experimenting with various KERNEL and ROOTFS partition sizes earlier today and I can confirm that specifying various values for CONFIG_TARGET_KERNEL_PARTSIZE and CONFIG_TARGET_ROOTFS_PARTSIZE on CLI for OpenWrt 21.02.1 image builder's make command doesn't work. The values from the .config file are always used and never overridden with values from CLI.
Yes but It doesn't, I suppose because the .config file gets included again in the nested make files (try grep -r CONFIG_TARGET_ROOTFS_PARTSIZE), and it seems that any "override" variables specified on the make image command line aren't propagated to sub-makes, as well the MAKEFLAGS env variable.
I haven't fully followed through all the logic, but I noticed unset PROFILE FILES PACKAGES MAKEFLAGS (can be seen with grep -r MAKEFLAGS).
I'm also surprised the following doesn't work as expected, I didn't see GNUMAKEFLAGS being altered anywhere:
I am using ROOTFS_PARTSIZE as per the make help documentation. Unfortunately, it doesn't seem to have any effect.
Should it affect all types of updates, even sysupgrade using the squashfs-sysupgrade.itb file?
Or does it only work for full flashes? I guess that wouldn't work in my case, because I have to flash to NAND first, which is just 128MB or so, and from there to EMMC which is 8GB.