2021-10-16 14:05:45 -04:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2021-04-05 22:57:59 -04:00
|
|
|
From: Tad <tad@spotco.us>
|
|
|
|
Date: Mon, 5 Apr 2021 23:00:41 -0400
|
|
|
|
Subject: [PATCH] Allow setting OTA public keys from environment variable
|
|
|
|
|
|
|
|
Change-Id: Id2338b2d30f7c477583a34f4171d37b70f0a6e92
|
|
|
|
---
|
|
|
|
core/Makefile | 4 ++++
|
|
|
|
core/product_config.mk | 5 +++++
|
|
|
|
2 files changed, 9 insertions(+)
|
|
|
|
|
|
|
|
diff --git a/core/Makefile b/core/Makefile
|
2021-10-16 14:05:45 -04:00
|
|
|
index 404bb54133..bd23c8be3d 100644
|
2021-04-05 22:57:59 -04:00
|
|
|
--- a/core/Makefile
|
|
|
|
+++ b/core/Makefile
|
|
|
|
@@ -1413,6 +1413,10 @@ endif
|
|
|
|
# substitute other keys for this one.
|
|
|
|
OTA_PUBLIC_KEYS := $(DEFAULT_SYSTEM_DEV_CERTIFICATE).x509.pem
|
|
|
|
|
|
|
|
+ifneq ($(OTA_KEY_OVERRIDE_DIR),)
|
|
|
|
+ OTA_PUBLIC_KEYS := $(OTA_KEY_OVERRIDE_DIR)/releasekey.x509.pem
|
|
|
|
+endif
|
|
|
|
+
|
|
|
|
# Generate a file containing the keys that will be read by the
|
|
|
|
# recovery binary.
|
|
|
|
RECOVERY_INSTALL_OTA_KEYS := \
|
|
|
|
diff --git a/core/product_config.mk b/core/product_config.mk
|
2021-10-16 14:05:45 -04:00
|
|
|
index 2c3f21f1db..a300efbcf5 100644
|
2021-04-05 22:57:59 -04:00
|
|
|
--- a/core/product_config.mk
|
|
|
|
+++ b/core/product_config.mk
|
|
|
|
@@ -399,6 +399,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
|
|
|
|
+ PRODUCT_EXTRA_RECOVERY_KEYS := $(OTA_KEY_OVERRIDE_DIR)/extra
|
|
|
|
+endif
|
|
|
|
+
|
|
|
|
PRODUCT_DEX_PREOPT_DEFAULT_COMPILER_FILTER := \
|
|
|
|
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEX_PREOPT_DEFAULT_COMPILER_FILTER))
|
|
|
|
PRODUCT_DEX_PREOPT_DEFAULT_FLAGS := \
|