the following patch was just integrated into master:
commit 6af48bb7f45cf8584de0e051dd3a1e853fa748ff
Author: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Date: Fri Jul 17 12:13:09 2015 -0700
soc/intel: Remove microcode terminators
They have been removed in the rest of the code already.
http://review.coreboot.org/#/c/4506/
Change-Id: I232cc2ccd4dd90359de4ab710486db65667500f4
Signed-off-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Reviewed-on: http://review.coreboot.org/10964
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
See http://review.coreboot.org/10964 for details.
-gerrit
the following patch was just integrated into master:
commit 1332bb8a84dbfc19eb8a5cac4cd940d93b08d967
Author: Patrick Georgi <patrick(a)georgi-clan.de>
Date: Fri Jul 17 21:39:08 2015 +0200
intel/sklrvp: remove trailing whitespace
Change-Id: If933a70992a6ae8228eef8d4f0386387b4e4549d
Signed-off-by: Patrick Georgi <patrick(a)georgi-clan.de>
Reviewed-on: http://review.coreboot.org/10966
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
See http://review.coreboot.org/10966 for details.
-gerrit
Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10970
-gerrit
commit 6be9281034ad5f21996f492322f049f0ed4dad6e
Author: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Date: Fri Jul 17 13:31:16 2015 -0700
Makefile: use KCONFIG_AUTOHEADER instead of file name
This makes the Makefile more robust when changing the file name.
Change-Id: Ifc013cc3ef899a7846742a961261ac50bc67e27b
Signed-off-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 85a10c0..61e6e20 100644
--- a/Makefile
+++ b/Makefile
@@ -138,7 +138,7 @@ real-all: real-target
# must come rather early
.SECONDEXPANSION:
-$(obj)/config.h:
+$(KCONFIG_AUTOHEADER):
$(MAKE) oldconfig
# Add a new class of source/object files to the build system
@@ -218,7 +218,7 @@ define create_cc_template
# $4 additional dependencies
ifn$(EMPTY)def $(1)-objs_$(2)_template
de$(EMPTY)fine $(1)-objs_$(2)_template
-$$(call src-to-obj,$1,$$(1).$2): $$(1).$2 $(obj)/config.h $(4)
+$$(call src-to-obj,$1,$$(1).$2): $$(1).$2 $(KCONFIG_AUTOHEADER) $(4)
@printf " CC $$$$(subst $$$$(obj)/,,$$$$(@))\n"
$(CC_$(1)) -MMD $$$$(CPPFLAGS_$(1)) $$$$(CFLAGS_$(1)) -MT $$$$(@) $(3) -c -o $$$$@ $$$$<
en$(EMPTY)def
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10969
-gerrit
commit 1bce5171c91c789801b184e2cebf0680c188b17f
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Fri Jul 17 21:33:00 2015 +0200
cbfstool: Add accessor functions to manipulate cbfs file headers
There will be more to add file attributes. The overall idea is to build a
header, then pass header and data into the functions that make use of them,
eg. to store them in the image or to find a suitable location.
Change-Id: Ic0e916c6fd6d1fff7d0ef3581f4b0027bd483137
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
---
util/cbfstool/Makefile | 2 +-
util/cbfstool/Makefile.inc | 1 +
util/cbfstool/cbfs_file_header.c | 71 ++++++++++++++++++++++++++++++++++++++++
util/cbfstool/cbfs_file_header.h | 26 +++++++++++++++
4 files changed, 99 insertions(+), 1 deletion(-)
diff --git a/util/cbfstool/Makefile b/util/cbfstool/Makefile
index 65d5710..68939dd 100644
--- a/util/cbfstool/Makefile
+++ b/util/cbfstool/Makefile
@@ -12,7 +12,7 @@ CPPFLAGS += -Iflashmap
LDFLAGS += -g3
CBFSTOOL_BINARY:=$(obj)/cbfstool
-CBFSTOOL_COMMON:=common.o cbfs_image.o compress.o fit.o
+CBFSTOOL_COMMON:=common.o cbfs_image.o cbfs_file_header.o compress.o fit.o
CBFSTOOL_COMMON+=elfheaders.o cbfs-mkstage.o cbfs-mkpayload.o xdr.o
CBFSTOOL_COMMON+=partitioned_file.o linux_trampoline.o cbfs-payload-linux.o
# LZMA
diff --git a/util/cbfstool/Makefile.inc b/util/cbfstool/Makefile.inc
index 976f0c2..b7877fd 100644
--- a/util/cbfstool/Makefile.inc
+++ b/util/cbfstool/Makefile.inc
@@ -3,6 +3,7 @@ cbfsobj += cbfstool.o
cbfsobj += common.o
cbfsobj += compress.o
cbfsobj += cbfs_image.o
+cbfsobj += cbfs_file_header.o
cbfsobj += cbfs-mkstage.o
cbfsobj += cbfs-mkpayload.o
cbfsobj += elfheaders.o
diff --git a/util/cbfstool/cbfs_file_header.c b/util/cbfstool/cbfs_file_header.c
new file mode 100644
index 0000000..9d359ca
--- /dev/null
+++ b/util/cbfstool/cbfs_file_header.c
@@ -0,0 +1,71 @@
+/*
+ * CBFS file header management
+ *
+ * Copyright (C) 2015 Google Inc
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc.
+ */
+
+#include <inttypes.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+
+#include "swab.h"
+#include "cbfs_file_header.h"
+
+/* this is excessive so should provide enough room */
+#define MAX_FILE_HEADER_SIZE 4096
+
+struct cbfs_file *create_file_header(void)
+{
+ struct cbfs_file *file = malloc(MAX_FILE_HEADER_SIZE);
+ if (!file) return NULL;
+
+ memset(file, CBFS_CONTENT_DEFAULT_VALUE, MAX_FILE_HEADER_SIZE);
+ memcpy(file->magic, CBFS_FILE_MAGIC, sizeof(file->magic));
+ file->type = htonl(CBFS_COMPONENT_NULL);
+ file->attributes_offset = 0;
+ file->offset = htonl(sizeof(struct cbfs_file));
+ file->filename[0] = 0;
+
+ return file;
+}
+
+int file_header_set_filename(struct cbfs_file *file, const char *name)
+{
+ if (file->offset != sizeof(struct cbfs_file))
+ return -1;
+
+ int len = strlen(name);
+
+ if (sizeof(struct cbfs_file) + len + 1 > MAX_FILE_HEADER_SIZE)
+ return -1;
+
+ strcpy(file->filename, name);
+ file->offset += len + 1;
+ return 0;
+}
+
+uint32_t file_header_get_length(struct cbfs_file *file)
+{
+ return ntohl(file->offset);
+}
+
+void file_header_set_data_size(struct cbfs_file *file, uint32_t size)
+{
+ file->len = htonl(size);
+}
diff --git a/util/cbfstool/cbfs_file_header.h b/util/cbfstool/cbfs_file_header.h
new file mode 100644
index 0000000..6dcd743
--- /dev/null
+++ b/util/cbfstool/cbfs_file_header.h
@@ -0,0 +1,26 @@
+/*
+ * CBFS file header management
+ *
+ * Copyright (C) 2015 Google Inc
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc.
+ */
+
+#include "common.h"
+#include "cbfs.h"
+
+struct cbfs_file *create_file_header(void);
+int file_header_set_filename(struct cbfs_file *file, const char *name);
+uint32_t file_header_get_length(struct cbfs_file *file);
+void file_header_set_data_size(struct cbfs_file *file, uint32_t size);
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10968
-gerrit
commit 120181599b189aac8dfd0811ee30d1f0c4d7e818
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Fri Jul 17 21:35:46 2015 +0200
cbfstool: move fill value to cbfs.h
Change-Id: Ie05db6d43219c65d08e2221009875f81eb29b630
Signed-off-by: Patrick Georgi <patrick(a)georgi-clan.de>
---
util/cbfstool/cbfs.h | 3 +++
util/cbfstool/cbfs_image.c | 3 ---
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/util/cbfstool/cbfs.h b/util/cbfstool/cbfs.h
index e63db37..f63b881 100644
--- a/util/cbfstool/cbfs.h
+++ b/util/cbfstool/cbfs.h
@@ -38,6 +38,9 @@
#define __PACKED __attribute__((packed))
#endif
+/* To make CBFS more friendly to ROM, fill -1 (0xFF) instead of zero. */
+#define CBFS_CONTENT_DEFAULT_VALUE (-1)
+
// Alignment (in bytes) to be used when no master header is present
#define CBFS_ENTRY_ALIGNMENT 64
diff --git a/util/cbfstool/cbfs_image.c b/util/cbfstool/cbfs_image.c
index 5bd98ab..b338e9a 100644
--- a/util/cbfstool/cbfs_image.c
+++ b/util/cbfstool/cbfs_image.c
@@ -50,9 +50,6 @@
* (old) cbfstool. */
#define CBFS_FILENAME_ALIGN (16)
-/* To make CBFS more friendly to ROM, fill -1 (0xFF) instead of zero. */
-#define CBFS_CONTENT_DEFAULT_VALUE (-1)
-
/* Type and format */
struct typedesc_t {
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 d004d031bad32029c88d642d600638e4435db825
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);
}