From 93dd07f3d5ee1726b79e26644ff245fe8b5aaef7 Mon Sep 17 00:00:00 2001 From: zbao Date: Fri, 17 Feb 2012 21:44:09 +0800 Subject: Exit building if romstage.bin is larger than size of XIP When the romstage.bin becomes bigger than the size of XIP, the cbfstool can not allocate the romstage in the CBFS. But it doesn't report an error. It will take quite a while to find out the root cause. Change-Id: I5be2a46a8b57934f14c5a0d4596f3bec4251e0aa Signed-off-by: Zheng Bao Signed-off-by: zbao Reviewed-on: http://review.coreboot.org/650 Reviewed-by: Patrick Georgi Tested-by: build bot (Jenkins) Reviewed-by: Marc Jones --- util/cbfstool/cbfstool.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'util/cbfstool') diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c index b8abb515bf..939221e66d 100644 --- a/util/cbfstool/cbfstool.c +++ b/util/cbfstool/cbfstool.c @@ -232,9 +232,10 @@ static int cbfs_locate(int argc, char **argv) uint32_t filesize = getfilesize(file); const char *filename = argv[4]; int align = strtoul(argv[5], NULL, 0); + uint32_t location = cbfs_find_location(romname, filesize, filename, align); - printf("%x\n", cbfs_find_location(romname, filesize, filename, align)); - return 0; + printf("%x\n", location); + return location == 0 ? 1 : 0; } static int cbfs_print(int argc, char **argv) -- cgit v1.2.3