summaryrefslogtreecommitdiffstats
path: root/resources/depthcharge/patch/0005-Proper-firmware-index-report-for-read-only-boot-path.patch
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2015-10-11 11:48:46 (EDT)
committer Francis Rowe <info@gluglug.org.uk>2015-10-11 15:16:26 (EDT)
commitd8b597f33e75d04b84be7c9d7081a3b97821617d (patch)
tree8ad2d64ba4dff4cb6cfc1d9f7ecdc2c9cda8d19c /resources/depthcharge/patch/0005-Proper-firmware-index-report-for-read-only-boot-path.patch
parentd6b6b1ea62f555f38152ab475d98c57f739f8b8d (diff)
downloadlibreboot-d8b597f33e75d04b84be7c9d7081a3b97821617d.zip
libreboot-d8b597f33e75d04b84be7c9d7081a3b97821617d.tar.gz
libreboot-d8b597f33e75d04b84be7c9d7081a3b97821617d.tar.bz2
Chromebook C201 (codename veyron_speedy) support
This introduces Libreboot support for the Asus Chromebook C201 (codename veyron_speedy). At this point, this produces a standalone Libreboot image that can be flashed to the RO Coreboot partition of the SPI flash, as well as the Libreboot version that can be flash to the RO Firmware ID partition. Libreboot on the Chromebook C201 uses the depthcharge bootloader, modified to display text messages instead of ChromeOS bitmaps (that encourage the use of ChromeOS). For convenience, an installation script, chromebook-flash-replace, is provided along with a description of the flash layout, to ease the replacement of the Coreboot and RO Firmware ID partitions on the full SPI flash image. Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'resources/depthcharge/patch/0005-Proper-firmware-index-report-for-read-only-boot-path.patch')
-rw-r--r--resources/depthcharge/patch/0005-Proper-firmware-index-report-for-read-only-boot-path.patch70
1 files changed, 70 insertions, 0 deletions
diff --git a/resources/depthcharge/patch/0005-Proper-firmware-index-report-for-read-only-boot-path.patch b/resources/depthcharge/patch/0005-Proper-firmware-index-report-for-read-only-boot-path.patch
new file mode 100644
index 0000000..d883cbd
--- /dev/null
+++ b/resources/depthcharge/patch/0005-Proper-firmware-index-report-for-read-only-boot-path.patch
@@ -0,0 +1,70 @@
+From dce70fb042d91ba74359a6dfb519f31d77e2c328 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
+
+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.
+
+Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
+---
+ src/vboot/crossystem/fdt.c | 2 +-
+ src/vboot/firmware_id.c | 6 +++++-
+ src/vboot/firmware_id.h | 1 +
+ 3 files changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/src/vboot/crossystem/fdt.c b/src/vboot/crossystem/fdt.c
+index ca39dac..a79b192 100644
+--- a/src/vboot/crossystem/fdt.c
++++ b/src/vboot/crossystem/fdt.c
+@@ -73,7 +73,7 @@ static int install_crossystem_data(DeviceTreeFixup *fixup, DeviceTree *tree)
+ nvstorage_flash_get_blob_size());
+ }
+
+- int fw_index = vdat->firmware_index;
++ int fw_index = get_active_fw_index(vdat);
+ const char *fwid;
+ int fwid_size;
+
+diff --git a/src/vboot/firmware_id.c b/src/vboot/firmware_id.c
+index 3662921..955bc84 100644
+--- a/src/vboot/firmware_id.c
++++ b/src/vboot/firmware_id.c
+@@ -36,6 +36,7 @@ static struct fwid {
+ } fw_fmap_ops[] = {
+ {VDAT_RW_A, "RW_FWID_A", NULL, 0, "RW A: ID NOT FOUND"},
+ {VDAT_RW_B, "RW_FWID_B", NULL, 0, "RW B: ID NOT FOUND"},
++ {VDAT_RO, "RO_FRID", NULL, 0, "RO: ID NOT FOUND"},
+ {VDAT_RECOVERY, "RO_FRID", NULL, 0, "RO: ID NOT FOUND"},
+ };
+
+@@ -130,10 +131,13 @@ static VbSharedDataHeader *get_vdat(void)
+ return NULL;
+ }
+
+-static inline int get_active_fw_index(VbSharedDataHeader *vdat)
++int get_active_fw_index(VbSharedDataHeader *vdat)
+ {
+ int fw_index = VDAT_UNKNOWN;
+
++ if (lib_sysinfo.vboot_handoff == NULL)
++ return VDAT_RO;
++
+ if (vdat)
+ fw_index = vdat->firmware_index;
+
+diff --git a/src/vboot/firmware_id.h b/src/vboot/firmware_id.h
+index fb6f206..090e9d1 100644
+--- a/src/vboot/firmware_id.h
++++ b/src/vboot/firmware_id.h
+@@ -49,6 +49,7 @@ int get_rwb_fw_size(void);
+ * Get firmware details for currently active fw type. It looks up vdat,
+ * identifies fw_index and returns appropriate id and size for that index.
+ */
++int get_active_fw_index(VbSharedDataHeader *vdat);
+ const char *get_active_fw_id(void);
+ int get_active_fw_size(void);
+
+--
+1.9.1
+