Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10943
-gerrit
commit f21a14c4bddce253bf20a19dfe2640bc628b5089
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Thu Jul 16 16:56:50 2015 +0200
crossgcc: update to gcc 4.9.3
We will probably update to 5.2 soonish, but that requires some more
testing (and better availability of the tarball at gnu mirrors)
Change-Id: I7144c0d92aab26e6a4a11ec10e560fb01c9c3360
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
---
util/crossgcc/buildgcc | 6 +++---
util/crossgcc/sum/gcc-4.9.3.tar.bz2.cksum | 1 +
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index f59b225..a3c4845 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -22,8 +22,8 @@
cd $(dirname $0)
-CROSSGCC_DATE="June 17th, 2015"
-CROSSGCC_VERSION="1.31"
+CROSSGCC_DATE="July 16th, 2015"
+CROSSGCC_VERSION="1.32"
# default settings
PACKAGE=GCC
@@ -38,7 +38,7 @@ GMP_VERSION=6.0.0
MPFR_VERSION=3.1.2
MPC_VERSION=1.0.3
LIBELF_VERSION=0.8.13
-GCC_VERSION=4.9.2
+GCC_VERSION=4.9.3
GCC_AUTOCONF_VERSION=2.69
BINUTILS_VERSION=2.25
GDB_VERSION=7.9.1
diff --git a/util/crossgcc/sum/gcc-4.9.3.tar.bz2.cksum b/util/crossgcc/sum/gcc-4.9.3.tar.bz2.cksum
new file mode 100644
index 0000000..f89c999
--- /dev/null
+++ b/util/crossgcc/sum/gcc-4.9.3.tar.bz2.cksum
@@ -0,0 +1 @@
+2e6490a908eac8b2b56b73679bd7c2a5237df1f8 tarballs/gcc-4.9.3.tar.bz2
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10943
-gerrit
commit 3e83cabc848d87b4aa1613334a715b188040aa85
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Thu Jul 16 16:56:50 2015 +0200
crossgcc: update to gcc 4.9.3
We will probably update to 5.2 soonish, but that requires some more
testing (and better availability of the tarball at gnu mirrors)
Change-Id: I7144c0d92aab26e6a4a11ec10e560fb01c9c3360
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
---
util/crossgcc/buildgcc | 2 +-
util/crossgcc/sum/gcc-4.9.3.tar.bz2.cksum | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index f59b225..7e58302 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -38,7 +38,7 @@ GMP_VERSION=6.0.0
MPFR_VERSION=3.1.2
MPC_VERSION=1.0.3
LIBELF_VERSION=0.8.13
-GCC_VERSION=4.9.2
+GCC_VERSION=4.9.3
GCC_AUTOCONF_VERSION=2.69
BINUTILS_VERSION=2.25
GDB_VERSION=7.9.1
diff --git a/util/crossgcc/sum/gcc-4.9.3.tar.bz2.cksum b/util/crossgcc/sum/gcc-4.9.3.tar.bz2.cksum
new file mode 100644
index 0000000..f89c999
--- /dev/null
+++ b/util/crossgcc/sum/gcc-4.9.3.tar.bz2.cksum
@@ -0,0 +1 @@
+2e6490a908eac8b2b56b73679bd7c2a5237df1f8 tarballs/gcc-4.9.3.tar.bz2
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10942
-gerrit
commit 31807badef2a5515e0715af33aa4631590b49900
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Thu Jul 16 15:34:26 2015 +0200
amd/pi: Increase assumption for maximum CBFS file header size
The new attributes increase the header size, breaking this assumption.
Change-Id: Ib23862f27650b39133deafb74a24327b098b6e86
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
---
src/southbridge/amd/pi/hudson/Makefile.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/southbridge/amd/pi/hudson/Makefile.inc b/src/southbridge/amd/pi/hudson/Makefile.inc
index d2fd7dc..bf67505 100644
--- a/src/southbridge/amd/pi/hudson/Makefile.inc
+++ b/src/southbridge/amd/pi/hudson/Makefile.inc
@@ -68,7 +68,7 @@ endif
ifneq ($(HUDSON_FWM_INSIDE_CBFS), 1)
$(warning ##### WARNING: CONFIG_HUDSON_FWM_POSITION ($(HUDSON_FWM_POSITION)) is outside of CBFS area ($(CBFS_BASE_ADDRESS) to 4294967295) ##### )
endif
-CBFS_HEADER_SIZE=0x40
+CBFS_HEADER_SIZE=0x60
#assume the cbfs header is less than $(CBFS_HEADER_SIZE) bytes.
ROMSIG_SIZE=4096
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10934
-gerrit
commit bd3cd72d26191f3925bc2319f6e27a4c57942616
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Wed Jul 15 20:49:00 2015 +0200
cbfstool: add extended attributes structure to cbfs_file
This is a forward and backward compatible approach to extending the cbfs
format. Unfortunately we forgot to add a header length or offset to the file
name, making old implementations depend on it starting 24 bytes after the
cbfs_file structure.
To work around that, add another, extensible structure after the file name,
and point to it through an offset, so we can add more variable length
structures in the future when necessary.
The offset field which points to the file data is adjusted appropriately and
so old implementations still know where to find both any file's data and its
successor in the directory.
Files within CBFS that don't use advanced features remain fully usable by old
implementations. Files that use advanced features still don't break the data
structures.
Change-Id: I325965286c44f31abd95df684d340cebb0e68b75
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
---
util/cbfstool/cbfs.h | 9 +++++++++
util/cbfstool/cbfs_image.c | 11 +++++++++--
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/util/cbfstool/cbfs.h b/util/cbfstool/cbfs.h
index e63db37..c7a5bd6 100644
--- a/util/cbfstool/cbfs.h
+++ b/util/cbfstool/cbfs.h
@@ -74,6 +74,7 @@ struct cbfs_file {
/* length of file data */
uint32_t len;
uint32_t type;
+ /* offset to struct cbfs_file_attributes or 0 */
uint32_t attributes_offset;
/* length of header incl. variable data */
uint32_t offset;
@@ -82,6 +83,11 @@ struct cbfs_file {
_Static_assert(sizeof(struct cbfs_file) == 24, "cbfs_file size mismatch");
+struct cbfs_file_attributes {
+ /* size of this structure, to test if a given element is available */
+ uint32_t len;
+} __PACKED;
+
struct cbfs_stage {
uint32_t compression;
uint64_t entry;
@@ -142,6 +148,9 @@ struct cbfs_payload {
#define CBFS_COMPONENT_NULL 0xFFFFFFFF
#define CBFS_SUBHEADER(_p) ( (void *) ((((uint8_t *) (_p)) + ntohl((_p)->offset))) )
+#define CBFS_FILE_ATTRIBUTES(_p) (((_p)->attributes_offset <= sizeof(_p)) ? NULL : \
+ (struct cbfs_file_attributes *)(((uint8_t *)(_p)) + ntohl((_p)->attributes_offset)))
+
/* cbfs_image.c */
uint32_t get_cbfs_entry_type(const char *name, uint32_t default_value);
uint32_t get_cbfs_compression(const char *name, uint32_t unknown);
diff --git a/util/cbfstool/cbfs_image.c b/util/cbfstool/cbfs_image.c
index 6f028c8..48cf7b2 100644
--- a/util/cbfstool/cbfs_image.c
+++ b/util/cbfstool/cbfs_image.c
@@ -118,7 +118,8 @@ int cbfs_parse_comp_algo(const char *name)
static size_t cbfs_calculate_file_header_size(const char *name)
{
return (sizeof(struct cbfs_file) +
- align_up(strlen(name) + 1, CBFS_FILENAME_ALIGN));
+ align_up(strlen(name) + 1, CBFS_FILENAME_ALIGN) +
+ sizeof(struct cbfs_file_attributes));
}
/* Only call on legacy CBFSes possessing a master header. */
@@ -1035,11 +1036,17 @@ int cbfs_create_empty_entry(struct cbfs_file *entry,
memcpy(entry->magic, CBFS_FILE_MAGIC, sizeof(entry->magic));
entry->type = htonl(CBFS_COMPONENT_NULL);
entry->len = htonl(len);
- entry->attributes_offset = 0;
+ /* FIXME:
+ move writing the offset fields to cbfs_calculate_file_header */
entry->offset = htonl(cbfs_calculate_file_header_size(name));
+ entry->attributes_offset = htonl(cbfs_calculate_file_header_size(name) -
+ sizeof(struct cbfs_file_attributes));
memset(entry->filename, 0, ntohl(entry->offset) - sizeof(*entry));
strcpy(entry->filename, name);
memset(CBFS_SUBHEADER(entry), CBFS_CONTENT_DEFAULT_VALUE, len);
+
+ struct cbfs_file_attributes *attr = CBFS_FILE_ATTRIBUTES(entry);
+ attr->len = sizeof(struct cbfs_file_attributes);
return 0;
}
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10933
-gerrit
commit 5cbe000fe30281e927fe78a28e217caf3225d77f
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Wed Jul 15 18:28:23 2015 +0200
cbfstool: rename checksum to attributes_offset
So far it's still unused, but its purpose will change:
It will become an offset to another structure that contains additional file
attributes.
This change is compatible because the binary format doesn't change and so far
the field was always set to 0, which can serve nicely as 'unused' field.
Change-Id: I2dafb06866713d43a236556f9492641526270837
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
---
util/cbfstool/cbfs.h | 2 +-
util/cbfstool/cbfs_image.c | 2 +-
util/cbfstool/common.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/util/cbfstool/cbfs.h b/util/cbfstool/cbfs.h
index 1996b1c..e63db37 100644
--- a/util/cbfstool/cbfs.h
+++ b/util/cbfstool/cbfs.h
@@ -74,7 +74,7 @@ struct cbfs_file {
/* length of file data */
uint32_t len;
uint32_t type;
- uint32_t checksum;
+ uint32_t attributes_offset;
/* length of header incl. variable data */
uint32_t offset;
char filename[];
diff --git a/util/cbfstool/cbfs_image.c b/util/cbfstool/cbfs_image.c
index 828d367..6f028c8 100644
--- a/util/cbfstool/cbfs_image.c
+++ b/util/cbfstool/cbfs_image.c
@@ -1035,7 +1035,7 @@ int cbfs_create_empty_entry(struct cbfs_file *entry,
memcpy(entry->magic, CBFS_FILE_MAGIC, sizeof(entry->magic));
entry->type = htonl(CBFS_COMPONENT_NULL);
entry->len = htonl(len);
- entry->checksum = 0; // TODO Build a checksum algorithm.
+ entry->attributes_offset = 0;
entry->offset = htonl(cbfs_calculate_file_header_size(name));
memset(entry->filename, 0, ntohl(entry->offset) - sizeof(*entry));
strcpy(entry->filename, name);
diff --git a/util/cbfstool/common.c b/util/cbfstool/common.c
index fffd096..d72db38 100644
--- a/util/cbfstool/common.c
+++ b/util/cbfstool/common.c
@@ -131,7 +131,7 @@ void cbfs_file_get_header(struct buffer *buf, struct cbfs_file *file)
bgets(buf, &file->magic, sizeof(file->magic));
file->len = xdr_be.get32(buf);
file->type = xdr_be.get32(buf);
- file->checksum = xdr_be.get32(buf);
+ file->attributes_offset = xdr_be.get32(buf);
file->offset = xdr_be.get32(buf);
}
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10939
-gerrit
commit 367ab487f2b153380685e04b0b10c0d130f0851e
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Wed Jul 15 21:36:58 2015 +0200
cbfs: mirror cbfs file attributes for compression
Even if coreboot doesn't use them at this time, but keep the structures in
sync.
Change-Id: I92f21edc3bbac6be419b1593d8e13d6055c94efa
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
---
src/include/cbfs_serialized.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/include/cbfs_serialized.h b/src/include/cbfs_serialized.h
index 198ce78..c764120 100644
--- a/src/include/cbfs_serialized.h
+++ b/src/include/cbfs_serialized.h
@@ -138,6 +138,8 @@ struct cbfs_file {
struct cbfs_file_attributes {
uint32_t len;
+ uint32_t compression;
+ uint32_t decompressed_size;
} __attribute__((packed));
#define CBFS_FILE_ATTRIBUTES(_p) (((_p)->attributes_offset <= sizeof(_p)) ? NULL : \
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10936
-gerrit
commit f320dbe6c38a1ca3ef48ccbd93ec045b18f7d99f
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Wed Jul 15 21:18:10 2015 +0200
cbfs: Add support for cbfs_file_attributes as far as required so far
Change-Id: I808a529b18c2e43e4ab83f30259f73e66635b83d
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
---
src/include/cbfs_serialized.h | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/include/cbfs_serialized.h b/src/include/cbfs_serialized.h
index f672095..198ce78 100644
--- a/src/include/cbfs_serialized.h
+++ b/src/include/cbfs_serialized.h
@@ -132,10 +132,17 @@ struct cbfs_file {
char magic[8];
uint32_t len;
uint32_t type;
- uint32_t checksum;
+ uint32_t attributes_offset;
uint32_t offset;
} __attribute__((packed));
+struct cbfs_file_attributes {
+ uint32_t len;
+} __attribute__((packed));
+
+#define CBFS_FILE_ATTRIBUTES(_p) (((_p)->attributes_offset <= sizeof(_p)) ? NULL : \
+ (struct cbfs_file_attributes *)(((uint8_t *)(_p)) + ntohl((_p)->attributes_offset)))
+
/*
* ROMCC does not understand uint64_t, so we hide future definitions as they are
* unlikely to be ever needed from ROMCC