2021-10-16 14:05:45 -04:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2019-09-13 20:26:43 -04:00
|
|
|
From: Tad <tad@spotco.us>
|
2021-04-05 22:57:59 -04:00
|
|
|
Date: Mon, 5 Apr 2021 23:11:12 -0400
|
|
|
|
Subject: [PATCH] Allow setting OTA public keys from environment variable
|
2019-09-13 20:26:43 -04:00
|
|
|
|
2022-03-05 12:24:18 -05:00
|
|
|
Change-Id: Ib2a00de63b0c7a8790640462d13a84daf2076fa7
|
2019-09-13 20:26:43 -04:00
|
|
|
---
|
2022-05-12 10:12:31 -04:00
|
|
|
core/Makefile | 6 +++---
|
2021-04-05 22:57:59 -04:00
|
|
|
core/product_config.mk | 5 +++++
|
2022-05-12 10:12:31 -04:00
|
|
|
2 files changed, 8 insertions(+), 3 deletions(-)
|
2019-09-13 20:26:43 -04:00
|
|
|
|
|
|
|
diff --git a/core/Makefile b/core/Makefile
|
2022-05-12 10:12:31 -04:00
|
|
|
index 3fb424733d..6d313406d6 100644
|
2019-09-13 20:26:43 -04:00
|
|
|
--- a/core/Makefile
|
|
|
|
+++ b/core/Makefile
|
2022-05-12 10:12:31 -04:00
|
|
|
@@ -1033,9 +1033,9 @@ endif
|
2021-04-05 22:57:59 -04:00
|
|
|
# substitute other keys for this one.
|
|
|
|
OTA_PUBLIC_KEYS := $(DEFAULT_SYSTEM_DEV_CERTIFICATE).x509.pem
|
2019-09-13 20:26:43 -04:00
|
|
|
|
2021-04-05 22:57:59 -04:00
|
|
|
-ifneq ($(OTA_PACKAGE_SIGNING_KEY),)
|
|
|
|
- OTA_PUBLIC_KEYS := $(OTA_PACKAGE_SIGNING_KEY).x509.pem
|
|
|
|
- PRODUCT_EXTRA_RECOVERY_KEYS := $(DEFAULT_SYSTEM_DEV_CERTIFICATE)
|
2019-09-13 20:26:43 -04:00
|
|
|
+ifneq ($(OTA_KEY_OVERRIDE_DIR),)
|
|
|
|
+ OTA_PUBLIC_KEYS := $(OTA_KEY_OVERRIDE_DIR)/releasekey.x509.pem
|
2022-05-12 10:12:31 -04:00
|
|
|
+ PRODUCT_EXTRA_RECOVERY_KEYS := $(OTA_KEY_OVERRIDE_DIR)/extra
|
2021-04-05 22:57:59 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
# Generate a file containing the keys that will be read by the
|
|
|
|
diff --git a/core/product_config.mk b/core/product_config.mk
|
2021-10-16 14:05:45 -04:00
|
|
|
index 7b440b1eff..f26ebb6d55 100644
|
2021-04-05 22:57:59 -04:00
|
|
|
--- a/core/product_config.mk
|
|
|
|
+++ b/core/product_config.mk
|
|
|
|
@@ -422,6 +422,11 @@ PRODUCT_OTA_PUBLIC_KEYS := $(sort \
|
|
|
|
PRODUCT_EXTRA_RECOVERY_KEYS := $(sort \
|
|
|
|
$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_EXTRA_RECOVERY_KEYS))
|
|
|
|
|
|
|
|
+ifneq ($(OTA_KEY_OVERRIDE_DIR),)
|
|
|
|
+ PRODUCT_OTA_PUBLIC_KEYS := $(OTA_KEY_OVERRIDE_DIR)/releasekey.x509.pem
|
2019-09-13 20:26:43 -04:00
|
|
|
+ PRODUCT_EXTRA_RECOVERY_KEYS := $(OTA_KEY_OVERRIDE_DIR)/extra
|
|
|
|
+endif
|
|
|
|
+
|
2021-04-05 22:57:59 -04:00
|
|
|
PRODUCT_DEX_PREOPT_DEFAULT_FLAGS := \
|
|
|
|
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEX_PREOPT_DEFAULT_FLAGS))
|
|
|
|
PRODUCT_DEX_PREOPT_BOOT_FLAGS := \
|