On Fri, Jun 05, 2009 at 07:37:26PM +0200, Patrick Georgi wrote:
The 20090605-[5678]-* patches give some indication on how to switch a board over to CBFS support. It's not as easy as without the 20090531 patch, but at least it works correctly then:
For targets that use the src/config/*calculation.lb files, it's quite easy:
- define FALLBACK_SIZE to ROM_IMAGE_SIZE (both normal and fallback are
of that size now, that kludge can be dropped after non-CBFS is dropped)
- drop most size definitions from the targets/*/*/Config*lb, except
ROM_SIZE (the total size of the image)
- ROM_IMAGE_SIZE must be set to the intended size of the up-to-raminit
stage of coreboot (coreboot_ram is loaded from CBFS). Usually, 64kb is enough, and choosing smaller values only makes configuring the XIP range harder.
For boards with coreboot_apc image (AMD stuff mostly), you also have to remove "ldscript /arch/i386/init/ldscript_apc.lb" from the mainboard's Config.lb (not shown in this patch set, as none of these boards uses it). coreboot_apc also resides in CBFS now, so this link hack in not required anymore.
With this, I think CBFS has no regressions over the old style rom image layout anymore, so moving everything over to using CBFS would be a nice next step, as lots of stuff in the build system could disappear after that.
Most of the text above should make a good start for a "How to move a board to CBFS" page in the wiki.
Index: targets/asus/m2v-mx_se/Config-abuild.lb
--- targets/asus/m2v-mx_se/Config-abuild.lb (revision 4340) +++ targets/asus/m2v-mx_se/Config-abuild.lb (working copy) @@ -20,6 +20,10 @@ target asus_m2v-mx_se mainboard asus/m2v-mx_se
+option CC="CROSSCC" +option CROSS_COMPILE="CROSS_PREFIX" +option HOSTCC="CROSS_HOSTCC"
Shouldn't this be
option CC="$(CROSSCC)" option CROSS_COMPILE="$(CROSS_PREFIX)" option HOSTCC="$(CROSS_HOSTCC)"
Does the syntax without braces work?
I confirmed on hardware (the kontron board), that these patches do indeed build/work fine _and_ fix the currently broken kontron board build. Without the patches you get 0xff on POST cards, and no serial output at all.
Acked-by: Uwe Hermann uwe@hermann-uwe.de
but please take Myles' comments into account.
Uwe.