Hi,
We have a couple of chipsets in the tree that require external data in CBFS, sometimes with placement requirements (eg. for embedded controllers), and there will be more of that kind to come. Right now, we're adding Kconfig options for each and every of these new files, but that's not a sustainable model.
The patch provides a way for each Makefile.inc to add such files by setting up a couple of variables: # -y can, as usual be used for conditional inclusion cbfs-files-y += filename filename-name := CBFS filename filename-type := CBFS type filename-position := location in CBFS (eg. 0xfff80000)
filename can either be a filename in the current directory (or a relative path from there) or, if that doesn't match a file, a path starting from the tree root. filename in filename-name etc. means the actual filename, for example: cbfs-files-y += mbi.bin mbi.bin-name := mbi.bin mbi.bin-type := 0x80
filename-position is an optional argument. If it doesn't exist, CBFS is free in its placement of the file. The files are added immediately after creation of the CBFS image to make sure that they'll have the space. Even the romstage is added only afterwards.
mbi.bin-* (in the example above) are cleaned after processing to avoid option conflicts if two files of the same name (with different CBFS names) are added.
To avoid code duplication, I moved CBFS image creation from two locations into src/arch/x86/Makefile.inc. That's also part of the patch.
The patch doesn't yet rework MBI, VGABIOS and bootsplash handling into the new method of adding generic files. I'm reasonably sure that MBI and VGABIOS can be moved out of Kconfig without much effect to users (as they're pretty much a binary decision, if the file is used at all, but the file is the same everywhere), but the bootsplash is probably a more individualistic matter, so should be kept in Kconfig. Opinions?
Anyway, the patch is Signed-off-by: Patrick Georgi patrick.georgi@coresystems.de
Regards, Patrick