CONFIG_TARGET_ROOTFS_PARTSIZE: Limitations on the size of the image

Hi, All!

I have already set CONFIG_TARGET_ROOTFS_PARTSIZE=1008 in my .config.

I am trying to generate an image with a lot of packages built-in. However I am having problems because it seems that a limit is reached and make just spits out an error then exits the build. In this, https://github.com/frank-w/openwrt/blob/R4Pro_4e/target/linux/mediatek/image/filogic.mk#L770, Makefile routine any one of the calls to check-size could fail which then terminates the build.

What is also interesting is why the OpenWRT version does not match up with what Banana Pi released. Please look at the argument passed to check-size in BPI-R4PRO-4E-OPENWRT-V24.10.0-Master-Devel/target/linux/mediatek/image/filogic.mk at main · BPI-SINOVOIP/BPI-R4PRO-4E-OPENWRT-V24.10.0-Master-Devel · GitHub and you will notice that the values differ, and they define CONFIG_TARGET_ROOTFS_PARTSIZE=448 in .config. So my questions are:

  1. Maybe it is not clear to me right now but why enforce such a small size in upstream OpenWRT upstream?
  2. Where are these values derived from? I am almost certain they are not arbitary, I mean to say, they are coming from somewhere right? For instance, is it mandated anywhere that initramfs-recovery.itb needs to be a certain size?
  3. Why is CONFIG_TARGET_ROOTFS_PARTSIZE so low to begin with? I thought this devices shipped with 8GB of eMMC?

Thanks,

- Bana

The partsize is afaik so small because all mist fit into ram as backup while sysupgrade to restpre after it.

These devices ship with at least 4GB of RAM, well at least the Pro 4E does. Even with heavy load I cannot get past 1GB of RAM being used. So in general I’d say that most people aren’t going to consume more RAM than that. That then leaves around 3GB of RAM for what you mentioned is required to function.

I still don’t know why those values are given to check-size. I mean to say are they following a specification of some sort or it is randomly chosen?

i guess these values are inherited from older boards with only 1M of RAM, but not sure and i’m not that deep in these parts of openwrt

You can also build a larger image. To do this, you must first disable the RAM disk and second, modify the Makefile. You can find the Makefile at “target/linux/mediatek/image/filogic.mk”. There, under “bananapi-r4 common” (I think that’s where it was), look for “check-size 44m.” You can then change that to “check-size 90m” or something similar. You have to be careful, though. The resulting image must fit into the 128MB NAND flash when decompressed; otherwise, you’ll run into problems.