[coreboot-gerrit] New patch to review for coreboot: cbfstool: update warning on cbfstool extract

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Wed Aug 26 14:24:50 CEST 2015


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11360

-gerrit

commit 1dd5e75a983cfc1dd576c532dadca896adc62ff2
Author: Patrick Georgi <patrick at georgi-clan.de>
Date:   Wed Aug 26 12:16:54 2015 +0200

    cbfstool: update warning on cbfstool extract
    
    We have tons of file types now that can be safely extracted.
    It's pretty much only stages and payloads that aren't.
    
    Change-Id: Ibf58a2c721f863d654537850c6f93d68a8a5bbeb
    Signed-off-by: Patrick Georgi <patrick at georgi-clan.de>
---
 util/cbfstool/cbfs_image.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/util/cbfstool/cbfs_image.c b/util/cbfstool/cbfs_image.c
index d701a69..5df7d68 100644
--- a/util/cbfstool/cbfs_image.c
+++ b/util/cbfstool/cbfs_image.c
@@ -645,8 +645,12 @@ int cbfs_export_entry(struct cbfs_image *image, const char *entry_name,
 	    entry_name, cbfs_get_entry_addr(image, entry),
 	    get_cbfs_entry_type_name(ntohl(entry->type)), ntohl(entry->len));
 
-	if (ntohl(entry->type) != CBFS_COMPONENT_RAW) {
-		WARN("Only 'raw' files are safe to extract.\n");
+	if (ntohl(entry->type) == CBFS_COMPONENT_STAGE) {
+		WARN("Stages are extracted in SELF format.\n");
+	}
+
+	if (ntohl(entry->type) == CBFS_COMPONENT_PAYLOAD) {
+		WARN("Payloads are extracted in SELF format.\n");
 	}
 
 	buffer.data = CBFS_SUBHEADER(entry);



More information about the coreboot-gerrit mailing list