coreboot-kgpe-d16/util/cbfstool
Hung-Te Lin b02c873190 cbfstool: Fix initial empty space in image creation.
When calculating initial CBFS empty entry space, the size of header itself must
be not included (with the reserved space for entry name). This is a regression
of the old cbfstool size bug.

Before this fix, in build process we see:
 OBJCOPY    cbfs/fallback/romstage_null.bin
 W: CBFS image was created with old cbfstool with size bug.
    Fixing size in last entry...

And checking the output binary:
 cbfstool build/coreboot.pre1 print -v -v
 DEBUG: read_cbfs_image: build/coreboot.pre1 (262144 bytes)
 DEBUG: x86sig: 0xfffffd30, offset: 0x3fd30
 W: CBFS image was created with old cbfstool with size bug.
    Fixing size in last entry...
 DEBUG: Last entry has been changed from 0x3fd40 to 0x3fd00.
 coreboot.pre1: 256 kB, bootblksz 688, romsize 262144, offset 0x0 align: 64
 Name                           Offset     Type         Size
 (empty)                        0x0        null         261296
 DEBUG:  cbfs_file=0x0, offset=0x28, content_address=0x28+0x3fcb0

After this fix, no more alerts in build process.
Verified to build successfully on x86/qemu and arm/snow configurations.

Change-Id: I35c96f4c10a41bae671148a0e08988fa3bf6b7d3
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: http://review.coreboot.org/2731
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2013-03-22 00:21:41 +01:00
..
lzma cbfstool: Update LZMA encoder to LZMA SDK 9.12 2012-11-12 18:35:52 +01:00
EXAMPLE cbfstool: Update example file. 2013-02-04 11:12:15 +01:00
Makefile cbfstool: Add `-Werror` to make all warnings into errors 2013-02-18 12:10:44 +01:00
Makefile.inc cbfstool: Add cbfs_image new CBFS image manipulation API. 2013-02-05 22:25:02 +01:00
cbfs-mkpayload.c cbfstool: Fix compile warnings caused by incorrect data types. 2013-02-18 12:28:43 +01:00
cbfs-mkstage.c cbfstool: Use cbfs_image API for "add-*" (add-payload, add-stage, ...) commands. 2013-02-05 22:27:20 +01:00
cbfs.h cbfstool: Use cbfs_image API for "print" command. 2013-02-05 22:25:13 +01:00
cbfs_image.c cbfstool: Fix initial empty space in image creation. 2013-03-22 00:21:41 +01:00
cbfs_image.h cbfstool locate: Implement alignment switch --align/-a 2013-03-20 05:47:32 +01:00
cbfstool.c cbfstool locate: Implement alignment switch --align/-a 2013-03-20 05:47:32 +01:00
coff.h GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
common.c cbfstool: Add buffer management API. 2013-02-05 22:24:45 +01:00
common.h cbfstool: support parsing UEFI firmware volumes 2013-02-05 22:43:23 +01:00
compress.c cbfstool: Add -v (verbose) output. 2013-02-01 05:54:24 +01:00
elf.h
fv.h GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
swab.h Various fixes to cbfstool. 2011-10-24 20:29:29 +02:00