Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/25986
Change subject: cbfs: Rename CBFS_TYPE_PAYLOAD to CBFS_TYPE_SELF ......................................................................
cbfs: Rename CBFS_TYPE_PAYLOAD to CBFS_TYPE_SELF
In preparation of having FIT payloads, which aren't converted to simple ELF, rename the CBFS type payload to actually show the format the payload is encoded in.
Another type CBFS_TYPE_FIT will be added to have two different payload formats. For now this is only a cosmetic change.
Change-Id: I39ee590d063b3e90f6153fe655aa50e58d45e8b0 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M payloads/coreinfo/cbfs_module.c M payloads/libpayload/include/cbfs_core.h M payloads/libpayload/libcbfs/cbfs.c M src/commonlib/include/commonlib/cbfs_serialized.h M util/cbfstool/cbfs.h M util/cbfstool/cbfs_image.c M util/cbfstool/cbfstool.c M util/nvramtool/cbfs.h 8 files changed, 14 insertions(+), 14 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/86/25986/1
diff --git a/payloads/coreinfo/cbfs_module.c b/payloads/coreinfo/cbfs_module.c index d9f7b24..ee75935 100644 --- a/payloads/coreinfo/cbfs_module.c +++ b/payloads/coreinfo/cbfs_module.c @@ -28,7 +28,7 @@ #define COMPONENT_BOOTBLOCK 0x01 #define COMPONENT_CBFSHEADER 0x02 #define COMPONENT_STAGE 0x10 -#define COMPONENT_PAYLOAD 0x20 +#define COMPONENT_SELF 0x20 #define COMPONENT_OPTIONROM 0x30 #define COMPONENT_RAW 0x50 #define COMPONENT_MICROCODE 0x53 @@ -187,8 +187,8 @@ case COMPONENT_STAGE: mvwprintw(win, row++, 38, "stage"); break; - case COMPONENT_PAYLOAD: - mvwprintw(win, row++, 38, "payload"); + case COMPONENT_SELF: + mvwprintw(win, row++, 38, "simple ELF"); break; case COMPONENT_OPTIONROM: mvwprintw(win, row++, 38, "optionrom"); diff --git a/payloads/libpayload/include/cbfs_core.h b/payloads/libpayload/include/cbfs_core.h index 1f155df..da98604 100644 --- a/payloads/libpayload/include/cbfs_core.h +++ b/payloads/libpayload/include/cbfs_core.h @@ -67,7 +67,7 @@ components */
#define CBFS_TYPE_STAGE 0x10 -#define CBFS_TYPE_PAYLOAD 0x20 +#define CBFS_TYPE_SELF 0x20 #define CBFS_TYPE_OPTIONROM 0x30 #define CBFS_TYPE_BOOTSPLASH 0x40 #define CBFS_TYPE_RAW 0x50 diff --git a/payloads/libpayload/libcbfs/cbfs.c b/payloads/libpayload/libcbfs/cbfs.c index 3cce799..f087eaa 100644 --- a/payloads/libpayload/libcbfs/cbfs.c +++ b/payloads/libpayload/libcbfs/cbfs.c @@ -158,7 +158,7 @@ void *cbfs_load_payload(struct cbfs_media *media, const char *name) { return (struct cbfs_payload *)cbfs_get_file_content( - media, name, CBFS_TYPE_PAYLOAD, NULL); + media, name, CBFS_TYPE_SELF, NULL); }
struct cbfs_file *cbfs_find(const char *name) { diff --git a/src/commonlib/include/commonlib/cbfs_serialized.h b/src/commonlib/include/commonlib/cbfs_serialized.h index 9273b35..53b701a 100644 --- a/src/commonlib/include/commonlib/cbfs_serialized.h +++ b/src/commonlib/include/commonlib/cbfs_serialized.h @@ -67,7 +67,7 @@ #define CBFS_TYPE_DELETED 0x00000000 #define CBFS_TYPE_DELETED2 0xffffffff #define CBFS_TYPE_STAGE 0x10 -#define CBFS_TYPE_PAYLOAD 0x20 +#define CBFS_TYPE_SELF 0x20 #define CBFS_TYPE_OPTIONROM 0x30 #define CBFS_TYPE_BOOTSPLASH 0x40 #define CBFS_TYPE_RAW 0x50 diff --git a/util/cbfstool/cbfs.h b/util/cbfstool/cbfs.h index 2964304..1a4f101 100644 --- a/util/cbfstool/cbfs.h +++ b/util/cbfstool/cbfs.h @@ -171,7 +171,7 @@ #define CBFS_COMPONENT_BOOTBLOCK 0x01 #define CBFS_COMPONENT_CBFSHEADER 0x02 #define CBFS_COMPONENT_STAGE 0x10 -#define CBFS_COMPONENT_PAYLOAD 0x20 +#define CBFS_COMPONENT_SELF 0x20 #define CBFS_COMPONENT_OPTIONROM 0x30 #define CBFS_COMPONENT_BOOTSPLASH 0x40 #define CBFS_COMPONENT_RAW 0x50 @@ -204,7 +204,7 @@ {CBFS_COMPONENT_BOOTBLOCK, "bootblock"}, {CBFS_COMPONENT_CBFSHEADER, "cbfs header"}, {CBFS_COMPONENT_STAGE, "stage"}, - {CBFS_COMPONENT_PAYLOAD, "payload"}, + {CBFS_COMPONENT_SELF, "simple elf"}, {CBFS_COMPONENT_OPTIONROM, "optionrom"}, {CBFS_COMPONENT_BOOTSPLASH, "bootsplash"}, {CBFS_COMPONENT_RAW, "raw"}, diff --git a/util/cbfstool/cbfs_image.c b/util/cbfstool/cbfs_image.c index 306fc29..e533483 100644 --- a/util/cbfstool/cbfs_image.c +++ b/util/cbfstool/cbfs_image.c @@ -1328,7 +1328,7 @@ buffer_delete(&buffer); return -1; } - } else if (ntohl(entry->type) == CBFS_COMPONENT_PAYLOAD) { + } else if (ntohl(entry->type) == CBFS_COMPONENT_SELF) { if (cbfs_payload_make_elf(&buffer, arch)) { buffer_delete(&buffer); return -1; @@ -1522,7 +1522,7 @@ CBFS_SUBHEADER(entry), fp); break;
- case CBFS_COMPONENT_PAYLOAD: + case CBFS_COMPONENT_SELF: payload = (struct cbfs_payload_segment *) CBFS_SUBHEADER(entry); while (payload) { diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c index d4de409..27e4cae 100644 --- a/util/cbfstool/cbfstool.c +++ b/util/cbfstool/cbfstool.c @@ -410,7 +410,7 @@ if (type == CBFS_COMPONENT_STAGE) attrs->position = htonl(offset + sizeof(struct cbfs_stage)); - else if (type == CBFS_COMPONENT_PAYLOAD) + else if (type == CBFS_COMPONENT_SELF) attrs->position = htonl(offset + sizeof(struct cbfs_payload)); else @@ -737,7 +737,7 @@ { return cbfs_add_component(param.filename, param.name, - CBFS_COMPONENT_PAYLOAD, + CBFS_COMPONENT_SELF, param.baseaddress, param.headeroffset, cbfstool_convert_mkpayload); @@ -757,7 +757,7 @@ } return cbfs_add_component(param.filename, param.name, - CBFS_COMPONENT_PAYLOAD, + CBFS_COMPONENT_SELF, param.baseaddress, param.headeroffset, cbfstool_convert_mkflatpayload); diff --git a/util/nvramtool/cbfs.h b/util/nvramtool/cbfs.h index 3a5bddb..212aff9 100644 --- a/util/nvramtool/cbfs.h +++ b/util/nvramtool/cbfs.h @@ -67,7 +67,7 @@ components */
#define CBFS_TYPE_STAGE 0x10 -#define CBFS_TYPE_PAYLOAD 0x20 +#define CBFS_TYPE_SELF 0x20 #define CBFS_TYPE_OPTIONROM 0x30 #define CBFS_TYPE_BOOTSPLASH 0x40 #define CBFS_TYPE_RAW 0x50