[coreboot] Re: "Size of CBFS filesystem in ROM" parameter?

2019-04-09 Thread Nico Huber
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
___
coreboot mailing list -- coreboot@coreboot.org
To unsubscribe send an email to coreboot-le...@coreboot.org


[coreboot] Re: "Size of CBFS filesystem in ROM" parameter?

2019-04-09 Thread Rafael Send
>
> 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

>
>
___
coreboot mailing list -- coreboot@coreboot.org
To unsubscribe send an email to coreboot-le...@coreboot.org


[coreboot] Re: "Size of CBFS filesystem in ROM" parameter?

2019-04-09 Thread Nico Huber
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
> 0x100 (16*1024*1024 = 16777216 in dec = 0x100) . So
> CONFIG_CBFS_SIZE=0x100 .

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
> (0x100) - 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


0xBD56B4A4138B3CE3.asc
Description: application/pgp-keys
___
coreboot mailing list -- coreboot@coreboot.org
To unsubscribe send an email to coreboot-le...@coreboot.org


[coreboot] Re: "Size of CBFS filesystem in ROM" parameter?

2019-04-09 Thread 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
0x100 (16*1024*1024 = 16777216 in dec = 0x100) . So
CONFIG_CBFS_SIZE=0x100 . 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
(0x100) - 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  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-le...@coreboot.org
___
coreboot mailing list -- coreboot@coreboot.org
To unsubscribe send an email to coreboot-le...@coreboot.org