Hi, I'm trying to understand what the "Size of CBFS filesystem in ROM" setting actually does.
If I make the size of the ROM chip large enough to contain my kernel & initrd (~15MB in this case) how do I need to modify this parameter?
I've read up on the CBFS documentation, and while that provides good information on the CBFS layout & function, I was not able to connect the dots with the sizing parameter. Enlarging the value too much resulted in a failed build whereas enlarging it somewhat caused a working kernel to fail to load.
If anyone could provide some pointers, they would be greatly appreciated!
Cheers, R
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 . 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.
On Tue, Apr 9, 2019 at 3:32 AM Rafael Send flyingfishfinger@gmail.com wrote:
Hi, I'm trying to understand what the "Size of CBFS filesystem in ROM" setting actually does.
If I make the size of the ROM chip large enough to contain my kernel & initrd (~15MB in this case) how do I need to modify this parameter?
I've read up on the CBFS documentation, and while that provides good information on the CBFS layout & function, I was not able to connect the dots with the sizing parameter. Enlarging the value too much resulted in a failed build whereas enlarging it somewhat caused a working kernel to fail to load.
If anyone could provide some pointers, they would be greatly appreciated!
Cheers, R
coreboot mailing list -- coreboot@coreboot.org To unsubscribe send an email to coreboot-leave@coreboot.org
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
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.
If I'm building this for qemu for testing, should I make the chip size and CBFS identical then since I'm technically just passing the BIOS parameter?
R
On 09.04.19 17:13, Rafael Send wrote:
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.
If I'm building this for qemu for testing, should I make the chip size and CBFS identical then since I'm technically just passing the BIOS parameter?
Yes, that should be fine.
Nico