Rootfs does not get a size as far as I can see for any device. But there is an image size for some devices. I don't know the exact meaning/calculation of IMAGE_SIZE := nor if it can be used like I think of using it. Basically kernel size + rootfs size. Is this correct?
We have 60 MiB for rootfs => 66*1024
IMAGE_SIZE := 67584
We also do not have set any Blocksize for emmc. Is 512 an usual size for this sort of devices (like for any emmc card)?
This device has two flash chips. One 8MB SPI NOR and one 4GB EMMC. While the device' config resides on the SPI (sbl, art, etc.) rootfs and kernel resides on the emmc. Emmc is not defined within DTS file. Bootloader/zloader is pointing to emmc.
The rootfs size I'm asking is the rootfs size packaged for the resulting sysupgrade image. I should have been more precise here. Sorry.
I can't find any reference for these in the OpenWrt codebase, are you sure OpenWrt doesn't use them as is from stock without any change to the eMMC partitions?
I'm pretty sure that OpenWrt does not reference anything regarding the imagesize for this device. I've recently tested samba v4.22. The resulting sysupgrade image was ~95MB. I've flashed it to the device blindly ofc. I've got no warning about the size or anything red coloured (what usually appears in those situations). The device didn't come up again ofc. I had to use tftp. I could have used one of my units with resized rootfs ... but my bad.
So I would like to fix it and create a PR if I have the correct setup.
I think, but don't quote me on this, that you need to define the eMMC partitions in the dts file. This way sysupgrade knows where the readonly image partition ends.
So do I understand it right that there is a workaround in place to get the device booted correctly (refereing to the "note"). So emmc is recognized by the kernel during boot only. And if I connect the dots with that what @Cthulhu88 wrote here. This would mean that we cannot define a rootfs size within the DTS. So no fix for this.
You can (assuming the note only applies to the NOR chip), but that would be a different partition table than stock, which means going back to stock firmware wouldn't be as trivial.