Is there a rule of thumb for estimating the install size of a package as installed through an image building process based on the install size resulting from a regular command line install?
For example, I flashed my TP-Link C7 v5 with the downloaded sysupgrade bin, i.e.
installed just two things (kmod-usb-storage, kmod-fs-ext4), used df and got (in relevant portions):
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mtdblock9 11008 832 10176 8% /overlay
After that, I installed midnight commander (opkg install mc), did df, and got:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mtdblock9 11008 3048 7960 28% /overlay
I believe that means midnight commander (with its dependencies) took up 3048 - 832, or 2216 KB.
If I am correct so far, what should be my estimate for midnight commander's install size as installed through image building, based on "regular" command line install 2216 KB?
Many devices are limited in storage capacity and there is no guarantee that the build system will detect when you have added too many packages to fit into the device storage space, which may render the device unbootable if installed. If in doubt, do not go overboard. Use what you had installed on the device last as a guide or create a minimal image first, install it to the device and test what you would like to add first.
Image builder is using strong compression to reduce size. How well something is compressed depends from how it was made.
The only way to compare is to make an image with image builder with default packages, and then an image with default + your additional packages.
Then you know how much space the new packages you added will need.
In general, it's better to use Image Builder if you can do so, you use a lot less space if you install many packages