coreboot-kgpe-d16/util/cbfstool
Patrick Georgi 0da38dde4b Add a "locate" function cbfstool, which helps you find
out a suitable address to put a XIP stage to.

Specifically, you pass it the file (to get its filesize), its filename
(as the header has a variable length that depends on it), and the
granularity requirement it has to fit in (for XIP).
The granularity is MTRR-style: when you request 0x10000, cbfstool looks
for a suitable place in a 64kb-aligned 64kb block.

cbfstool simply prints out a hex value which is the start address of a
suitably located free memory block. That value can then be used with
cbfs add-stage to store the file in the ROM image.

It's a two-step operation (instead of being merged into cbfs add-stage)
because the image must be linked twice: First, with some bogus, but safe
base address (eg. 0) to figure out the target address (based on file
size). Then a second time at the target address.

The work flow is:
 - link file
 - cbfstool locate
 - link file again
 - cbfstool add-stage.

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4929 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2009-11-09 17:18:02 +00:00
..
lzma fix some wrong versions of the FSF's address (trivial) 2009-09-23 21:52:45 +00:00
EXAMPLE v2/util: romfs -> cbfs rename 2009-04-14 00:08:34 +00:00
Makefile There was a missing addition of the size of the .notes.pinfo 2009-09-17 15:35:08 +00:00
Makefile.inc Remove all build/ prefixes in the build output. 2009-10-28 17:10:51 +00:00
cbfs-mkpayload.c check for ELF payloads in cbfstool 2009-09-25 22:21:47 +00:00
cbfs-mkstage.c New cbfstool. Works without mmap or fork/exec and 2009-09-14 13:29:27 +00:00
cbfs.h New cbfstool. Works without mmap or fork/exec and 2009-09-14 13:29:27 +00:00
cbfstool.c Add a "locate" function cbfstool, which helps you find 2009-11-09 17:18:02 +00:00
common.c Add a "locate" function cbfstool, which helps you find 2009-11-09 17:18:02 +00:00
common.h Add a "locate" function cbfstool, which helps you find 2009-11-09 17:18:02 +00:00
compress.c New cbfstool. Works without mmap or fork/exec and 2009-09-14 13:29:27 +00:00
elf.h fix some wrong versions of the FSF's address (trivial) 2009-09-23 21:52:45 +00:00