Hi Mike, Rafael,
Am 09.04.19 um 11:05 schrieb Mike Banon:
Usually the size of CBFS filesystem should be equal to the size of your chip. In your case - ~15MB rounded up to 16MB - it should be 0x1000000 (16*1024*1024 = 16777216 in dec = 0x1000000) . So CONFIG_CBFS_SIZE=0x1000000 .
this is only true if the flash chip isn't shared with other firmware components. But it often is. If you are running a modern Intel-based system, for instance, CBFS size should be at most the size of the BIOS partition of the flash.
By the way I noticed a strange thing:
If you don't have any .config and try to change your ROM chip size, e.g. to (16384 KB (16 MB)), your size of CBFS filesystem will be automatically updated to match the size of your selected ROM chip size (0x1000000) - and will continue to update until you'll exit with saving your menuconfig changes to .config. But if you'd launch menuconfig again, with existing .config in place, your CBFS size will not be automatically updated anymore. I don't know if it's deliberate or a bug, hopefully someone there could clarify it.
It's deliberate. Once the .config is written there is no way to detect if the CBFS size was intentionally set by the user or not. This is a common problem of all Kconfig options with complex defaults that depend on other settings, and also why you should start with a clean .config when you switch boards (because you'd be stuck with the old board's defaults otherwise).
Nico