Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31379
Change subject: libpayload: Draw time_t and suseconds_t into sys/types.h
......................................................................
libpayload: Draw time_t and suseconds_t into sys/types.h
These are not architecture specific and were the only reason to
include `arch/types.h` in `sys/types.h`.
Beware this may break payloads that assume non-standard definitions
in `sys/types.h`.
Change-Id: I00d513a4775b013221df98d3d96c096320663cdd
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
---
M payloads/libpayload/include/arm/arch/types.h
M payloads/libpayload/include/arm64/arch/types.h
M payloads/libpayload/include/mips/arch/types.h
M payloads/libpayload/include/sys/types.h
M payloads/libpayload/include/x86/arch/types.h
5 files changed, 2 insertions(+), 13 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/79/31379/1
diff --git a/payloads/libpayload/include/arm/arch/types.h b/payloads/libpayload/include/arm/arch/types.h
index 1bd815b..641fb0a 100644
--- a/payloads/libpayload/include/arm/arch/types.h
+++ b/payloads/libpayload/include/arm/arch/types.h
@@ -50,9 +50,6 @@
typedef signed long long int64_t;
typedef signed long long s64;
-typedef long time_t;
-typedef long suseconds_t;
-
#ifndef NULL
#define NULL ((void *)0)
#endif
diff --git a/payloads/libpayload/include/arm64/arch/types.h b/payloads/libpayload/include/arm64/arch/types.h
index 1bd815b..641fb0a 100644
--- a/payloads/libpayload/include/arm64/arch/types.h
+++ b/payloads/libpayload/include/arm64/arch/types.h
@@ -50,9 +50,6 @@
typedef signed long long int64_t;
typedef signed long long s64;
-typedef long time_t;
-typedef long suseconds_t;
-
#ifndef NULL
#define NULL ((void *)0)
#endif
diff --git a/payloads/libpayload/include/mips/arch/types.h b/payloads/libpayload/include/mips/arch/types.h
index afa3a37..32537b8 100644
--- a/payloads/libpayload/include/mips/arch/types.h
+++ b/payloads/libpayload/include/mips/arch/types.h
@@ -62,9 +62,6 @@
typedef unsigned long phys_addr_t;
typedef unsigned long phys_size_t;
-typedef long time_t;
-typedef long suseconds_t;
-
#ifndef NULL
#define NULL ((void *)0)
#endif
diff --git a/payloads/libpayload/include/sys/types.h b/payloads/libpayload/include/sys/types.h
index 0ed4975..f7e0598 100644
--- a/payloads/libpayload/include/sys/types.h
+++ b/payloads/libpayload/include/sys/types.h
@@ -30,7 +30,8 @@
#ifndef _SYS_TYPES_H
#define _SYS_TYPES_H
-#include <arch/types.h>
+typedef long time_t;
+typedef long suseconds_t;
typedef signed long int off_t;
diff --git a/payloads/libpayload/include/x86/arch/types.h b/payloads/libpayload/include/x86/arch/types.h
index 1bd815b..641fb0a 100644
--- a/payloads/libpayload/include/x86/arch/types.h
+++ b/payloads/libpayload/include/x86/arch/types.h
@@ -50,9 +50,6 @@
typedef signed long long int64_t;
typedef signed long long s64;
-typedef long time_t;
-typedef long suseconds_t;
-
#ifndef NULL
#define NULL ((void *)0)
#endif
--
To view, visit https://review.coreboot.org/c/coreboot/+/31379
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I00d513a4775b013221df98d3d96c096320663cdd
Gerrit-Change-Number: 31379
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-MessageType: newchange
Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36674 )
Change subject: arch/x86: Add option to compress postcar stage
......................................................................
arch/x86: Add option to compress postcar stage
The LZ4 decompressor was already linked in romstage.
Change-Id: I89fdc6066027447bf72968c66e6f5eb5fbb630c7
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/Kconfig
M src/arch/x86/Makefile.inc
2 files changed, 19 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/74/36674/1
diff --git a/src/Kconfig b/src/Kconfig
index 0d56291..17bf545 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -158,6 +158,16 @@
that decompression might slow down booting if the boot flash
is connected through a slow link (i.e. SPI).
+config COMPRESS_POSTCAR
+ bool "Compress postcar with LZ4"
+ depends on POSTCAR_STAGE
+ # Default value set at the end of the file
+ help
+ Compress postcar with LZ4 to save flash space and speed up boot,
+ since the time for reading the image from SPI (and in the vboot
+ case verifying it) is usually much greater than the time spent
+ decompressing.
+
config COMPRESS_PRERAM_STAGES
bool "Compress romstage and verstage with LZ4"
depends on !ARCH_X86 && (HAVE_ROMSTAGE || HAVE_VERSTAGE)
@@ -1203,6 +1213,9 @@
config COMPRESS_RAMSTAGE
default y if !UNCOMPRESSED_RAMSTAGE
+config COMPRESS_POSTCAR
+ default y
+
config COMPRESS_PRERAM_STAGES
depends on !ARCH_X86
default y
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index 447fd57..8c35176 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -278,11 +278,16 @@
$(objcbfs)/postcar.elf: $(objcbfs)/postcar.debug.rmod
cp $< $@
+CBFS_POSTCAR_COMPRESS_FLAG := none
+ifeq ($(CONFIG_COMPRESS_POSTCAR),y)
+CBFS_POSTCAR_COMPRESS_FLAG := lz4
+endif
+
# Add postcar to CBFS
cbfs-files-$(CONFIG_POSTCAR_STAGE) += $(CONFIG_CBFS_PREFIX)/postcar
$(CONFIG_CBFS_PREFIX)/postcar-file := $(objcbfs)/postcar.elf
$(CONFIG_CBFS_PREFIX)/postcar-type := stage
-$(CONFIG_CBFS_PREFIX)/postcar-compression := none
+$(CONFIG_CBFS_PREFIX)/postcar-compression := $(CBFS_POSTCAR_COMPRESS_FLAG)
###############################################################################
# ramstage
--
To view, visit https://review.coreboot.org/c/coreboot/+/36674
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I89fdc6066027447bf72968c66e6f5eb5fbb630c7
Gerrit-Change-Number: 36674
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: newchange