[coreboot] Patch set updated for coreboot: 6becab8 cbfstool: Change "locate" output to prefix "0x".

Hung-Te Lin (hungte@chromium.org) gerrit at coreboot.org
Tue Jan 29 02:55:22 CET 2013


Hung-Te Lin (hungte at chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2201

-gerrit

commit 6becab879bcf9dd875d64fc0883eddfab41f0ee5
Author: Hung-Te Lin <hungte at chromium.org>
Date:   Mon Jan 28 23:00:47 2013 +0800

    cbfstool: Change "locate" output to prefix "0x".
    
    Currently "cbfstool locate" outputs a hex number without "0x" prefix.
    This makes extra step (prefix 0x, and then generate another temp file) in build
    process, and may be a problem when we want to allow changing its output format
    (ex, using decimal). Adding the "0x" in cbfstool itself should be better.
    
    Change-Id: I639bb8f192a756883c9c4b2d11af6bc166c7811d
    Signed-off-by: Hung-Te Lin <hungte at chromium.org>
---
 src/arch/armv7/Makefile.inc | 4 +---
 src/arch/x86/Makefile.inc   | 4 +---
 util/cbfstool/cbfstool.c    | 2 +-
 3 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/arch/armv7/Makefile.inc b/src/arch/armv7/Makefile.inc
index 872365c..ba734a6 100644
--- a/src/arch/armv7/Makefile.inc
+++ b/src/arch/armv7/Makefile.inc
@@ -316,9 +316,7 @@ $(objcbfs)/base_xip.txt: $(obj)/coreboot.pre1 $(objcbfs)/romstage_null.bin
 	rm -f $@
 	$(CBFSTOOL) $(obj)/coreboot.pre1 locate -f $(objcbfs)/romstage_null.bin -n $(CONFIG_CBFS_PREFIX)/romstage -a $(CONFIG_XIP_ROM_SIZE) > $@.tmp \
 	 || { echo "The romstage is larger than XIP size. Please expand the CONFIG_XIP_ROM_SIZE" ; exit 1; }
-	sed -e 's/^/0x/g' $@.tmp > $@.tmp2
-	rm $@.tmp
-	mv $@.tmp2 $@
+	mv $@.tmp $@
 
 $(objgenerated)/crt0.romstage.S: $$(crt0s)
 	@printf "    GEN        $(subst $(obj)/,,$(@))\n"
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index ea86f8f..190f7cb 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -377,9 +377,7 @@ $(objcbfs)/base_xip.txt: $(obj)/coreboot.pre1 $(objcbfs)/romstage_null.bin
 	rm -f $@
 	$(CBFSTOOL) $(obj)/coreboot.pre1 locate -f $(objcbfs)/romstage_null.bin -n $(CONFIG_CBFS_PREFIX)/romstage -a $(CONFIG_XIP_ROM_SIZE) > $@.tmp \
 	 || { echo "The romstage is larger than XIP size. Please expand the CONFIG_XIP_ROM_SIZE" ; exit 1; }
-	sed -e 's/^/0x/g' $@.tmp > $@.tmp2
-	rm $@.tmp
-	mv $@.tmp2 $@
+	mv $@.tmp $@
 
 $(objgenerated)/crt0.romstage.S: $$(crt0s)
 	@printf "    GEN        $(subst $(obj)/,,$(@))\n"
diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c
index c439a57..942baad 100644
--- a/util/cbfstool/cbfstool.c
+++ b/util/cbfstool/cbfstool.c
@@ -382,7 +382,7 @@ static int cbfs_locate(void)
 	location = cbfs_find_location(param.cbfs_name, filesize,
 					param.name, param.alignment);
 
-	printf("%x\n", location);
+	printf("0x%x\n", location);
 	return location == 0 ? 1 : 0;
 }
 



More information about the coreboot mailing list