aboutsummaryrefslogtreecommitdiff
path: root/resources/depthcharge/patch
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2016-04-19 18:09:30 +0200
committerMinifree Ltd <info@minifree.org>2016-04-19 23:50:21 +0100
commit8e3b064430300bba4ef15e99ddcda3d861e8e264 (patch)
treead02570aaf5d6da37a48726c0751e708ef8f50b2 /resources/depthcharge/patch
parentd0e903dac630b5d05e4b21dd90e410540ab55b6d (diff)
downloadlibrebootfr-8e3b064430300bba4ef15e99ddcda3d861e8e264.tar.gz
librebootfr-8e3b064430300bba4ef15e99ddcda3d861e8e264.zip
Coreboot, vboot and depthcharge updates to Coreboot 4.3 for CrOS devices
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'resources/depthcharge/patch')
-rw-r--r--resources/depthcharge/patch/0001-arm-armv7-a-march-abi-flag-for-ARMv7-hardware.patch6
-rw-r--r--resources/depthcharge/patch/0002-Coreboot-image-integration-removal.patch6
-rw-r--r--resources/depthcharge/patch/0003-DOTCONFIG-location-correction.patch6
-rw-r--r--resources/depthcharge/patch/0004-Adaptation-for-a-read-only-boot-path-when-no-vboot-h.patch6
-rw-r--r--resources/depthcharge/patch/0005-vboot-Only-initialize-cparams-once.patch34
-rw-r--r--resources/depthcharge/patch/0006-Proper-firmware-index-report-for-read-only-boot-path.patch (renamed from resources/depthcharge/patch/0005-Proper-firmware-index-report-for-read-only-boot-path.patch)6
-rw-r--r--resources/depthcharge/patch/0007-fdt-nonvolatile-context-storage-report-to-mkbp-for-E.patch (renamed from resources/depthcharge/patch/0006-fdt-nonvolatile-context-storage-report-to-mkbp-for-E.patch)6
-rw-r--r--resources/depthcharge/patch/0008-vboot-Display-callbacks-for-developer-and-recovery-m.patch (renamed from resources/depthcharge/patch/0007-vboot-Display-callbacks-for-developer-and-recovery-m.patch)52
8 files changed, 94 insertions, 28 deletions
diff --git a/resources/depthcharge/patch/0001-arm-armv7-a-march-abi-flag-for-ARMv7-hardware.patch b/resources/depthcharge/patch/0001-arm-armv7-a-march-abi-flag-for-ARMv7-hardware.patch
index f295a63e..d99a574d 100644
--- a/resources/depthcharge/patch/0001-arm-armv7-a-march-abi-flag-for-ARMv7-hardware.patch
+++ b/resources/depthcharge/patch/0001-arm-armv7-a-march-abi-flag-for-ARMv7-hardware.patch
@@ -1,7 +1,7 @@
-From 095ae6281bb2d5bdab288fa042e5c4daa05c5ca3 Mon Sep 17 00:00:00 2001
+From 80e3428c2e50b5a6838d71a89007f610eda5e2dc Mon Sep 17 00:00:00 2001
From: Paul Kocialkowski <contact@paulk.fr>
Date: Mon, 3 Aug 2015 14:39:42 +0200
-Subject: [PATCH 1/7] arm: armv7-a march abi flag for ARMv7 hardware
+Subject: [PATCH 1/8] arm: armv7-a march abi flag for ARMv7 hardware
Specifying the march is required to get depthcharge to build with e.g. the arm
toolchain built by coreboot's crossgcc script. Without this flag, the toolchain
@@ -26,5 +26,5 @@ index b2fce32..455e370 100644
ifeq ($(CONFIG_ARCH_ARM_V8),y)
--
-1.9.1
+2.8.0
diff --git a/resources/depthcharge/patch/0002-Coreboot-image-integration-removal.patch b/resources/depthcharge/patch/0002-Coreboot-image-integration-removal.patch
index 28ee21ad..611be4ff 100644
--- a/resources/depthcharge/patch/0002-Coreboot-image-integration-removal.patch
+++ b/resources/depthcharge/patch/0002-Coreboot-image-integration-removal.patch
@@ -1,7 +1,7 @@
-From 4e7d727edf1939904bc516d569ceef9e295f454c Mon Sep 17 00:00:00 2001
+From f095d901afe02728fb0471d51e02553036cd2538 Mon Sep 17 00:00:00 2001
From: Paul Kocialkowski <contact@paulk.fr>
Date: Mon, 3 Aug 2015 14:49:34 +0200
-Subject: [PATCH 2/7] Coreboot image integration removal
+Subject: [PATCH 2/8] Coreboot image integration removal
There is no need to integrate the built depthcharge binary inside a coreboot
image right after building it, coreboot will handle this on its own.
@@ -29,5 +29,5 @@ index a73785b..564dd13 100644
$(notdir $1)_unified: $1.bin $1.payload
PHONY += $(notdir $1)_unified
--
-1.9.1
+2.8.0
diff --git a/resources/depthcharge/patch/0003-DOTCONFIG-location-correction.patch b/resources/depthcharge/patch/0003-DOTCONFIG-location-correction.patch
index af070de5..d4b6ae98 100644
--- a/resources/depthcharge/patch/0003-DOTCONFIG-location-correction.patch
+++ b/resources/depthcharge/patch/0003-DOTCONFIG-location-correction.patch
@@ -1,7 +1,7 @@
-From 72bb1a69cf6c0f58d3c1a8f6ba98334640818566 Mon Sep 17 00:00:00 2001
+From dfdcd8c218215df4e1523bf6dd11270bc4f52605 Mon Sep 17 00:00:00 2001
From: Paul Kocialkowski <contact@paulk.fr>
Date: Sun, 9 Aug 2015 12:06:28 +0200
-Subject: [PATCH 3/7] DOTCONFIG location correction
+Subject: [PATCH 3/8] DOTCONFIG location correction
The configuration file doesn't have to be in src and HAVE_DOTCONFIG holds its
current location.
@@ -25,5 +25,5 @@ index a1a9d33..13305cd 100644
ifeq ($(CONFIG_ARCH_X86),y)
ARCH = x86
--
-1.9.1
+2.8.0
diff --git a/resources/depthcharge/patch/0004-Adaptation-for-a-read-only-boot-path-when-no-vboot-h.patch b/resources/depthcharge/patch/0004-Adaptation-for-a-read-only-boot-path-when-no-vboot-h.patch
index 890791b2..ed491a4c 100644
--- a/resources/depthcharge/patch/0004-Adaptation-for-a-read-only-boot-path-when-no-vboot-h.patch
+++ b/resources/depthcharge/patch/0004-Adaptation-for-a-read-only-boot-path-when-no-vboot-h.patch
@@ -1,7 +1,7 @@
-From 5ad9900434045ea97c536c98cb514bdb43114c12 Mon Sep 17 00:00:00 2001
+From 0ec9edead1d9de5f913333e6aa77bcd3de83a617 Mon Sep 17 00:00:00 2001
From: Paul Kocialkowski <contact@paulk.fr>
Date: Sun, 9 Aug 2015 12:09:35 +0200
-Subject: [PATCH 4/7] Adaptation for a read-only boot path when no vboot
+Subject: [PATCH 4/8] Adaptation for a read-only boot path when no vboot
handoff data is found
When no vboot handoff data is found, this makes the unified depthcharge build
@@ -128,5 +128,5 @@ index 10fcb93..575dcfd 100644
return 0;
}
--
-1.9.1
+2.8.0
diff --git a/resources/depthcharge/patch/0005-vboot-Only-initialize-cparams-once.patch b/resources/depthcharge/patch/0005-vboot-Only-initialize-cparams-once.patch
new file mode 100644
index 00000000..8bc56a73
--- /dev/null
+++ b/resources/depthcharge/patch/0005-vboot-Only-initialize-cparams-once.patch
@@ -0,0 +1,34 @@
+From 40668e8b5fb9a9e07a3b1ddf334bd4e12a38525f Mon Sep 17 00:00:00 2001
+From: Paul Kocialkowski <contact@paulk.fr>
+Date: Mon, 18 Apr 2016 11:14:19 +0200
+Subject: [PATCH 5/8] vboot: Only initialize cparams once
+
+Calling common_params_init multiple times in a row results in emptying cparams
+each time, causing the GBB data to be lost as it is only read once (the first
+time).
+
+Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
+---
+ src/vboot/util/commonparams.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/vboot/util/commonparams.c b/src/vboot/util/commonparams.c
+index 9f29473..3a71a8b 100644
+--- a/src/vboot/util/commonparams.c
++++ b/src/vboot/util/commonparams.c
+@@ -159,8 +159,10 @@ int is_cparams_initialized(void)
+ int common_params_init(int clear_shared_data)
+ {
+ // Set up the common param structure.
+- memset(&cparams, 0, sizeof(cparams));
+- cparams_initialized = 1;
++ if (!is_cparams_initialized()) {
++ memset(&cparams, 0, sizeof(cparams));
++ cparams_initialized = 1;
++ }
+
+ if (gbb_init())
+ return 1;
+--
+2.8.0
+
diff --git a/resources/depthcharge/patch/0005-Proper-firmware-index-report-for-read-only-boot-path.patch b/resources/depthcharge/patch/0006-Proper-firmware-index-report-for-read-only-boot-path.patch
index d883cbdf..7692ff2b 100644
--- a/resources/depthcharge/patch/0005-Proper-firmware-index-report-for-read-only-boot-path.patch
+++ b/resources/depthcharge/patch/0006-Proper-firmware-index-report-for-read-only-boot-path.patch
@@ -1,7 +1,7 @@
-From dce70fb042d91ba74359a6dfb519f31d77e2c328 Mon Sep 17 00:00:00 2001
+From 8acd4854603672dd1bc16900c9eb58dd5c8c342d Mon Sep 17 00:00:00 2001
From: Paul Kocialkowski <contact@paulk.fr>
Date: Mon, 10 Aug 2015 20:24:50 +0200
-Subject: [PATCH 5/7] Proper firmware index report for read-only boot path
+Subject: [PATCH 6/8] Proper firmware index report for read-only boot path
When booting from a read-only boot path, the active firmware to report is RO.
This is detected with the lack of a vboot handoff pointer.
@@ -66,5 +66,5 @@ index fb6f206..090e9d1 100644
int get_active_fw_size(void);
--
-1.9.1
+2.8.0
diff --git a/resources/depthcharge/patch/0006-fdt-nonvolatile-context-storage-report-to-mkbp-for-E.patch b/resources/depthcharge/patch/0007-fdt-nonvolatile-context-storage-report-to-mkbp-for-E.patch
index 7b39db6b..bfbe96b8 100644
--- a/resources/depthcharge/patch/0006-fdt-nonvolatile-context-storage-report-to-mkbp-for-E.patch
+++ b/resources/depthcharge/patch/0007-fdt-nonvolatile-context-storage-report-to-mkbp-for-E.patch
@@ -1,7 +1,7 @@
-From 9eb389b0273cf07add859cd162c1411d15806149 Mon Sep 17 00:00:00 2001
+From ff08bf3966b3c299d6ead9707cc17a71ff9e50c7 Mon Sep 17 00:00:00 2001
From: Paul Kocialkowski <contact@paulk.fr>
Date: Mon, 10 Aug 2015 20:30:14 +0200
-Subject: [PATCH 6/7] fdt: nonvolatile-context-storage report to mkbp for EC NV
+Subject: [PATCH 7/8] fdt: nonvolatile-context-storage report to mkbp for EC NV
storage
This allows old versions of crossystem to detect that it should use mosys to
@@ -26,5 +26,5 @@ index a79b192..0487513 100644
dt_add_string_prop(node, "nonvolatile-context-storage", "disk");
dt_add_u32_prop(node, "nonvolatile-context-lba",
--
-1.9.1
+2.8.0
diff --git a/resources/depthcharge/patch/0007-vboot-Display-callbacks-for-developer-and-recovery-m.patch b/resources/depthcharge/patch/0008-vboot-Display-callbacks-for-developer-and-recovery-m.patch
index ea061212..cacc3ecd 100644
--- a/resources/depthcharge/patch/0007-vboot-Display-callbacks-for-developer-and-recovery-m.patch
+++ b/resources/depthcharge/patch/0008-vboot-Display-callbacks-for-developer-and-recovery-m.patch
@@ -1,7 +1,7 @@
-From 541a3f09ecb062e3f0778eb9846732cfabcbfbba Mon Sep 17 00:00:00 2001
+From 50a27cb948d3e944e3e466146b0d81939e8ce9a5 Mon Sep 17 00:00:00 2001
From: Paul Kocialkowski <contact@paulk.fr>
Date: Tue, 11 Aug 2015 11:22:54 +0200
-Subject: [PATCH 7/7] vboot: Display callbacks for developer and recovery mode
+Subject: [PATCH 8/8] vboot: Display callbacks for developer and recovery mode
screens
We don't want to use bitmaps stored in GBB since they recommend the use of non-
@@ -9,22 +9,27 @@ free software (Chrome OS), so this implements a text-based interface instead.
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
---
- src/vboot/callbacks/display.c | 168 +++++++++++++++++++++++++++++++++++++++---
- 1 file changed, 156 insertions(+), 12 deletions(-)
+ src/vboot/callbacks/display.c | 200 ++++++++++++++++++++++++++++++++++++++----
+ 1 file changed, 185 insertions(+), 15 deletions(-)
diff --git a/src/vboot/callbacks/display.c b/src/vboot/callbacks/display.c
-index efa0691..b659f7b 100644
+index 183e278..ece9140 100644
--- a/src/vboot/callbacks/display.c
+++ b/src/vboot/callbacks/display.c
-@@ -84,9 +84,17 @@ void print_on_center(const char *msg)
+@@ -86,12 +86,19 @@ void print_on_center(const char *msg)
print_string(msg);
}
--VbError_t VbExDisplayScreen(uint32_t screen_type)
-+VbError_t VbExDisplayScreen(uint32_t screen_type, VbNvContext *vnc)
+-VbError_t VbExDisplayScreen(uint32_t screen_type, uint32_t locale)
++VbError_t VbExDisplayScreen(uint32_t screen_type, VbNvContext *vnc,
++ uint32_t locale)
{
- const char *msg = NULL;
+-
+- if (vboot_draw_screen(screen_type, locale) == CBGFX_SUCCESS)
+- return VBERROR_SUCCESS;
+ unsigned int rows, cols;
++ uint32_t default_boot = 0;
+ uint32_t boot_signed_only = 0;
+ uint32_t boot_usb = 0;
+ uint32_t boot_legacy = 0;
@@ -36,7 +41,7 @@ index efa0691..b659f7b 100644
/*
* Show the debug messages for development. It is a backup method
-@@ -98,31 +106,167 @@ VbError_t VbExDisplayScreen(uint32_t screen_type)
+@@ -103,31 +110,194 @@ VbError_t VbExDisplayScreen(uint32_t screen_type, uint32_t locale)
video_console_clear();
break;
case VB_SCREEN_DEVELOPER_WARNING:
@@ -50,6 +55,8 @@ index efa0691..b659f7b 100644
+
+ VbNvGet(vnc, VBNV_DEV_BOOT_USB, &boot_usb);
+ VbNvGet(vnc, VBNV_DEV_BOOT_LEGACY, &boot_legacy);
++
++ VbNvGet(vnc, VBNV_DEV_DEFAULT_BOOT, &default_boot);
+ }
+
+ print_string(
@@ -89,6 +96,25 @@ index efa0691..b659f7b 100644
+
+ if (!boot_signed_only || boot_usb)
+ print_string("\n");
++
++ print_string("Default boot medium: ");
++
++ switch (default_boot) {
++ case VBNV_DEV_DEFAULT_BOOT_DISK:
++ print_string("internal storage");
++ break;
++ case VBNV_DEV_DEFAULT_BOOT_USB:
++ print_string("external media");
++ break;
++ case VBNV_DEV_DEFAULT_BOOT_LEGACY:
++ print_string("legacy payload");
++ break;
++ default:
++ print_string("unknown");
++ break;
++ }
++
++ print_string("\n");
+ }
+
+ find_common_params(&blob, &size);
@@ -202,6 +228,12 @@ index efa0691..b659f7b 100644
+ case VB_SCREEN_TO_NORM_CONFIRMED:
+ video_console_clear();
+ print_on_center("Disabling developer mode.");
++ break;
++ case VB_SCREEN_OS_BROKEN:
++ video_console_clear();
++ print_on_center(
++ "Something went wrong and the device cannot boot.\n"
++ "Press Escape + Refresh + Power to access recovery.");
break;
default:
printf("Not a valid screen type: %d.\n", screen_type);
@@ -215,5 +247,5 @@ index efa0691..b659f7b 100644
}
--
-1.9.1
+2.8.0