Add vendor specific information's to a coreboot rom

Sometimes it is needed to add some vendor specific information’s like a version string
to a generated coreboot rom. For this example we assume we want the area from 0x00 to 0x30
for such kind of data.

The first idea is to use cbfstool. Thanks to some guys in the IRC channel it looks like the
current build system does something like:

cbfstool -o $$(( $(CONFIGROMSIZE) - $(CONFIGCBFSSIZE) )) ...

So all we need is to change CBFSSIZE to ROMSIZE – 0x30 in .config file.

... CONFIGCONSOLESERIAL8250=y # CONFIGUSBDEBUG is not set # CONFIGK8REVFSUPPORT is not set CONFIGCPUADDRBITS=32 CONFIGBOARDROMSIZEKB2048=y # CONFIGCOREBOOTROMSIZEKB64 is not set # CONFIGCOREBOOTROMSIZEKB128 is not set # CONFIGCOREBOOTROMSIZEKB256 is not set ... CONFIGCOREGLIU500266=y CONFIGPLLMSRhi=0x39c # CONFIGNORTHBRIDGEAMDAGESA is not set # CONFIGAMDNBCIMX is not set # CONFIGNORTHBRIDGEAMDCIMXRD890 is not set CONFIGCBFSSIZE=0x1FFFD0 # # Southbridge # CONFIGSOUTHBRIDGEAMDCS5536=y ...

This results in the wanted result:

... coreboot.rom: 2048 kB, bootblocksize 688, romsize 2097152, offset 0x30 alignment: 64 bytes, architecture: x86 Name Offset Type Size vsa 0x30 stage 55124 config 0xd7c0 raw 2810 (empty) 0xe300 null 7256 fallback/romstage 0xff80 stage 19339 fallback/coreboot_ram 0x14b80 stage 38852 fallback/payload 0x1e380 payload 21831 (empty) 0x23900 null 1950728

And here the file based prove:

# hexedit build/coreboot.rom 00000000 FF FF FF FF FF FF FF FF ........ 00000008 FF FF FF FF FF FF FF FF ........ 00000010 FF FF FF FF FF FF FF FF ........ 00000018 FF FF FF FF FF FF FF FF ........ 00000020 FF FF FF FF FF FF FF FF ........ 00000028 FF FF FF FF FF FF FF FF ........ 00000030 4C 41 52 43 48 49 56 45 LARCHIVE 00000038 00 00 D7 54 00 00 00 10 ...T.... 00000040 00 00 00 00 00 00 00 28 .......(

Open Hub profile for Christian Gmeiner