On 12/11/2009, Myles Watson mylesgw@gmail.com wrote:
This doesn't seem like it should be a config option any more.
Ideally, it will become some automatic "as small as possible" configuration. Unfortunately ld doesn't allow to align everything to an upper boundary, so this requires the link-twice trick or so. So for now, I'd like to keep it there - people might want to tweak it. As an example (which made me look into this in the first place), someone (agaran) on #coreboot wanted to use a smaller bootblock. Until this automatically happens, we'll have to allow this to change.
Sounds good.
For me, ROMBASE must be at 0xFFFE000, that is 4G - romchip size (128k). if i try to set it to anything else i get some errors while build like:
$ grep ROMBASE build/ldoptions ; grep -A2 ROMBASE src/arch/i386/Kconfig;make CONFIG_ROMBASE = 0xfffe1000; config ROMBASE hex default 0xfffe1000 GEN build.h CC lib/version.o AR coreboot.a CC coreboot_ram.o CC coreboot_ram PAYLOAD payload.elf l CBFSPRINT coreboot.rom
/home/agaran/Coreboot/trunk/build/coreboot.rom: 128 kB, bootblocksize 0, romsize 131072, offset 0x0 Alignment: 64 bytes
Name Offset Type Size fallback/coreboot_ram 0x0 stage 33186 fallback/payload 0x8200 payload 16172 0xc180 null 81464 make: *** [/home/agaran/Coreboot/trunk/build/coreboot.rom] Segmentation fault make: *** Deleting file `/home/agaran/Coreboot/trunk/build/coreboot.rom'
but i found way that works for me (but it is somewhat ugly) (see patch in attachment)
this causes to increase space before actual rom code, but main disadvantage is need to make this change manual, probably this could be scripted (default extra gap = 0, and changed via some echo after first linking when amount of space after rom code before jumpvector is known)
or maybe you have better idea
ps. please just tell me if this make no sense at all
best regards Maciej