From 0d4a638cca62ba26a18cd66aad1871dcaf097040 Mon Sep 17 00:00:00 2001 From: Robin Peng Date: Tue, 30 Apr 2024 13:36:47 +0000 Subject: [PATCH 1/2] Switch kernel directory to control by build flag Bug: 337161745 Change-Id: Ie7d2f8623846a72de8dc1a423616e3bccbf1508c Merged-In: I3f1688e6186cec4644f1d9a4cd80537c9672822f --- device-caiman.mk | 9 +++++++-- device-komodo.mk | 9 +++++++-- device-ripcurrent24.mk | 9 +++++++-- device-ripcurrentpro.mk | 9 +++++++-- device-tokay.mk | 9 +++++++-- 5 files changed, 35 insertions(+), 10 deletions(-) diff --git a/device-caiman.mk b/device-caiman.mk index 17d7a5fc..0dbca23d 100644 --- a/device-caiman.mk +++ b/device-caiman.mk @@ -14,8 +14,13 @@ # limitations under the License. # -TARGET_KERNEL_DIR ?= device/google/caimito-kernel -TARGET_BOARD_KERNEL_HEADERS := device/google/caimito-kernel/kernel-headers +ifdef RELEASE_GOOGLE_CAIMAN_KERNEL_DIR +TARGET_KERNEL_DIR ?= $(RELEASE_GOOGLE_CAIMAN_KERNEL_DIR) +TARGET_BOARD_KERNEL_HEADERS ?= $(RELEASE_GOOGLE_CAIMAN_KERNEL_DIR)/kernel-headers +else +TARGET_KERNEL_DIR ?= device/google/caimito-kernels/6.1/24D1 +TARGET_BOARD_KERNEL_HEADERS ?= device/google/caimito-kernels/6.1/24D1/kernel-headers +endif LOCAL_PATH := device/google/caimito diff --git a/device-komodo.mk b/device-komodo.mk index 0e5f9691..eca7b6db 100644 --- a/device-komodo.mk +++ b/device-komodo.mk @@ -14,8 +14,13 @@ # limitations under the License. # -TARGET_KERNEL_DIR ?= device/google/caimito-kernel -TARGET_BOARD_KERNEL_HEADERS := device/google/caimito-kernel/kernel-headers +ifdef RELEASE_GOOGLE_KOMODO_KERNEL_DIR +TARGET_KERNEL_DIR ?= $(RELEASE_GOOGLE_KOMODO_KERNEL_DIR) +TARGET_BOARD_KERNEL_HEADERS ?= $(RELEASE_GOOGLE_KOMODO_KERNEL_DIR)/kernel-headers +else +TARGET_KERNEL_DIR ?= device/google/caimito-kernels/6.1/24D1 +TARGET_BOARD_KERNEL_HEADERS ?= device/google/caimito-kernels/6.1/24D1/kernel-headers +endif LOCAL_PATH := device/google/caimito diff --git a/device-ripcurrent24.mk b/device-ripcurrent24.mk index 8cf2cfa1..4ee491d0 100644 --- a/device-ripcurrent24.mk +++ b/device-ripcurrent24.mk @@ -14,8 +14,13 @@ # limitations under the License. # -TARGET_KERNEL_DIR ?= device/google/caimito-kernel -TARGET_BOARD_KERNEL_HEADERS := device/google/caimito-kernel/kernel-headers +ifdef RELEASE_GOOGLE_RIPCURRENT24_KERNEL_DIR +TARGET_KERNEL_DIR ?= $(RELEASE_GOOGLE_RIPCURRENT24_KERNEL_DIR) +TARGET_BOARD_KERNEL_HEADERS ?= $(RELEASE_GOOGLE_RIPCURRENT24_KERNEL_DIR)/kernel-headers +else +TARGET_KERNEL_DIR ?= device/google/caimito-kernels/6.1/24D1 +TARGET_BOARD_KERNEL_HEADERS ?= device/google/caimito-kernels/6.1/24D1/kernel-headers +endif $(call inherit-product-if-exists, vendor/google_devices/caimito/prebuilts/device-vendor-ripcurrent24.mk) $(call inherit-product-if-exists, vendor/google_devices/zumapro/prebuilts/device-vendor.mk) diff --git a/device-ripcurrentpro.mk b/device-ripcurrentpro.mk index 4c6b4d5e..aeb147f9 100644 --- a/device-ripcurrentpro.mk +++ b/device-ripcurrentpro.mk @@ -14,8 +14,13 @@ # limitations under the License. # -TARGET_KERNEL_DIR ?= device/google/caimito-kernel -TARGET_BOARD_KERNEL_HEADERS := device/google/caimito-kernel/kernel-headers +ifdef RELEASE_GOOGLE_RIPCURRENTPRO_KERNEL_DIR +TARGET_KERNEL_DIR ?= $(RELEASE_GOOGLE_RIPCURRENTPRO_KERNEL_DIR) +TARGET_BOARD_KERNEL_HEADERS ?= $(RELEASE_GOOGLE_RIPCURRENTPRO_KERNEL_DIR)/kernel-headers +else +TARGET_KERNEL_DIR ?= device/google/caimito-kernels/6.1/24D1 +TARGET_BOARD_KERNEL_HEADERS ?= device/google/caimito-kernels/6.1/24D1/kernel-headers +endif USE_SWIFTSHADER := false BOARD_USES_SWIFTSHADER := false diff --git a/device-tokay.mk b/device-tokay.mk index 7473ccba..8442716c 100644 --- a/device-tokay.mk +++ b/device-tokay.mk @@ -14,8 +14,13 @@ # limitations under the License. # -TARGET_KERNEL_DIR ?= device/google/caimito-kernel -TARGET_BOARD_KERNEL_HEADERS := device/google/caimito-kernel/kernel-headers +ifdef RELEASE_GOOGLE_TOKAY_KERNEL_DIR +TARGET_KERNEL_DIR ?= $(RELEASE_GOOGLE_TOKAY_KERNEL_DIR) +TARGET_BOARD_KERNEL_HEADERS ?= $(RELEASE_GOOGLE_TOKAY_KERNEL_DIR)/kernel-headers +else +TARGET_KERNEL_DIR ?= device/google/caimito-kernels/6.1/24D1 +TARGET_BOARD_KERNEL_HEADERS ?= device/google/caimito-kernels/6.1/24D1/kernel-headers +endif $(call inherit-product-if-exists, vendor/google_devices/caimito/prebuilts/device-vendor-tokay.mk) $(call inherit-product-if-exists, vendor/google_devices/zumapro/prebuilts/device-vendor.mk) From 498ec2eb2ca2ed795641d09ee17c12db1656ce6e Mon Sep 17 00:00:00 2001 From: Robin Peng Date: Fri, 3 May 2024 04:06:24 +0000 Subject: [PATCH 2/2] Switch bootloader and radio directory to control by build flag Bug: 337163126 Change-Id: Ic342543ae53517febced03800af196d4c17ba390 Merged-In: I3f1688e6186cec4644f1d9a4cd80537c9672822f --- device-caiman.mk | 10 ++++++++++ device-komodo.mk | 10 ++++++++++ device-ripcurrent24.mk | 10 ++++++++++ device-ripcurrentpro.mk | 10 ++++++++++ device-tokay.mk | 10 ++++++++++ 5 files changed, 50 insertions(+) diff --git a/device-caiman.mk b/device-caiman.mk index 0dbca23d..eff9321b 100644 --- a/device-caiman.mk +++ b/device-caiman.mk @@ -14,6 +14,16 @@ # limitations under the License. # +ifdef RELEASE_GOOGLE_CAIMAN_RADIO_DIR +RELEASE_GOOGLE_PRODUCT_RADIO_DIR := $(RELEASE_GOOGLE_CAIMAN_RADIO_DIR) +endif +ifdef RELEASE_GOOGLE_CAIMAN_RADIOCFG_DIR +RELEASE_GOOGLE_PRODUCT_RADIOCFG_DIR := $(RELEASE_GOOGLE_CAIMAN_RADIOCFG_DIR) +endif +RELEASE_GOOGLE_BOOTLOADER_CAIMAN_DIR ?= 24D1# Keep this for pdk TODO: b/327119000 +RELEASE_GOOGLE_PRODUCT_BOOTLOADER_DIR := bootloader/$(RELEASE_GOOGLE_BOOTLOADER_CAIMAN_DIR) +$(call soong_config_set,caimito_bootloader,prebuilt_dir,$(RELEASE_GOOGLE_BOOTLOADER_CAIMAN_DIR)) + ifdef RELEASE_GOOGLE_CAIMAN_KERNEL_DIR TARGET_KERNEL_DIR ?= $(RELEASE_GOOGLE_CAIMAN_KERNEL_DIR) TARGET_BOARD_KERNEL_HEADERS ?= $(RELEASE_GOOGLE_CAIMAN_KERNEL_DIR)/kernel-headers diff --git a/device-komodo.mk b/device-komodo.mk index eca7b6db..2a8f957e 100644 --- a/device-komodo.mk +++ b/device-komodo.mk @@ -14,6 +14,16 @@ # limitations under the License. # +ifdef RELEASE_GOOGLE_KOMODO_RADIO_DIR +RELEASE_GOOGLE_PRODUCT_RADIO_DIR := $(RELEASE_GOOGLE_KOMODO_RADIO_DIR) +endif +ifdef RELEASE_GOOGLE_KOMODO_RADIOCFG_DIR +RELEASE_GOOGLE_PRODUCT_RADIOCFG_DIR := $(RELEASE_GOOGLE_KOMODO_RADIOCFG_DIR) +endif +RELEASE_GOOGLE_BOOTLOADER_KOMODO_DIR ?= 24D1# Keep this for pdk TODO: b/327119000 +RELEASE_GOOGLE_PRODUCT_BOOTLOADER_DIR := bootloader/$(RELEASE_GOOGLE_BOOTLOADER_KOMODO_DIR) +$(call soong_config_set,caimito_bootloader,prebuilt_dir,$(RELEASE_GOOGLE_BOOTLOADER_KOMODO_DIR)) + ifdef RELEASE_GOOGLE_KOMODO_KERNEL_DIR TARGET_KERNEL_DIR ?= $(RELEASE_GOOGLE_KOMODO_KERNEL_DIR) TARGET_BOARD_KERNEL_HEADERS ?= $(RELEASE_GOOGLE_KOMODO_KERNEL_DIR)/kernel-headers diff --git a/device-ripcurrent24.mk b/device-ripcurrent24.mk index 4ee491d0..998020cc 100644 --- a/device-ripcurrent24.mk +++ b/device-ripcurrent24.mk @@ -14,6 +14,16 @@ # limitations under the License. # +ifdef RELEASE_GOOGLE_RIPCURRENT24_RADIO_DIR +RELEASE_GOOGLE_PRODUCT_RADIO_DIR := $(RELEASE_GOOGLE_RIPCURRENT24_RADIO_DIR) +endif +ifdef RELEASE_GOOGLE_RIPCURRENT24_RADIOCFG_DIR +RELEASE_GOOGLE_PRODUCT_RADIOCFG_DIR := $(RELEASE_GOOGLE_RIPCURRENT24_RADIOCFG_DIR) +endif +RELEASE_GOOGLE_BOOTLOADER_RIPCURRENT24_DIR ?= 24D1# Keep this for pdk TODO: b/327119000 +RELEASE_GOOGLE_PRODUCT_BOOTLOADER_DIR := bootloader/$(RELEASE_GOOGLE_BOOTLOADER_RIPCURRENT24_DIR) +$(call soong_config_set,caimito_bootloader,prebuilt_dir,$(RELEASE_GOOGLE_BOOTLOADER_RIPCURRENT24_DIR)) + ifdef RELEASE_GOOGLE_RIPCURRENT24_KERNEL_DIR TARGET_KERNEL_DIR ?= $(RELEASE_GOOGLE_RIPCURRENT24_KERNEL_DIR) TARGET_BOARD_KERNEL_HEADERS ?= $(RELEASE_GOOGLE_RIPCURRENT24_KERNEL_DIR)/kernel-headers diff --git a/device-ripcurrentpro.mk b/device-ripcurrentpro.mk index aeb147f9..cfbf96f8 100644 --- a/device-ripcurrentpro.mk +++ b/device-ripcurrentpro.mk @@ -14,6 +14,16 @@ # limitations under the License. # +ifdef RELEASE_GOOGLE_RIPCURRENTPRO_RADIO_DIR +RELEASE_GOOGLE_PRODUCT_RADIO_DIR := $(RELEASE_GOOGLE_RIPCURRENTPRO_RADIO_DIR) +endif +ifdef RELEASE_GOOGLE_RIPCURRENTPRO_RADIOCFG_DIR +RELEASE_GOOGLE_PRODUCT_RADIOCFG_DIR := $(RELEASE_GOOGLE_RIPCURRENTPRO_RADIOCFG_DIR) +endif +RELEASE_GOOGLE_BOOTLOADER_RIPCURRENTPRO_DIR ?= 24D1# Keep this for pdk TODO: b/327119000 +RELEASE_GOOGLE_PRODUCT_BOOTLOADER_DIR := bootloader/$(RELEASE_GOOGLE_BOOTLOADER_RIPCURRENTPRO_DIR) +$(call soong_config_set,caimito_bootloader,prebuilt_dir,$(RELEASE_GOOGLE_BOOTLOADER_RIPCURRENTPRO_DIR)) + ifdef RELEASE_GOOGLE_RIPCURRENTPRO_KERNEL_DIR TARGET_KERNEL_DIR ?= $(RELEASE_GOOGLE_RIPCURRENTPRO_KERNEL_DIR) TARGET_BOARD_KERNEL_HEADERS ?= $(RELEASE_GOOGLE_RIPCURRENTPRO_KERNEL_DIR)/kernel-headers diff --git a/device-tokay.mk b/device-tokay.mk index 8442716c..8cfe560f 100644 --- a/device-tokay.mk +++ b/device-tokay.mk @@ -14,6 +14,16 @@ # limitations under the License. # +ifdef RELEASE_GOOGLE_TOKAY_RADIO_DIR +RELEASE_GOOGLE_PRODUCT_RADIO_DIR ?= $(RELEASE_GOOGLE_TOKAY_RADIO_DIR) +endif +ifdef RELEASE_GOOGLE_TOKAY_RADIOCFG_DIR +RELEASE_GOOGLE_PRODUCT_RADIOCFG_DIR ?= $(RELEASE_GOOGLE_TOKAY_RADIOCFG_DIR) +endif +RELEASE_GOOGLE_BOOTLOADER_TOKAY_DIR ?= 24D1# Keep this for pdk TODO: b/327119000 +RELEASE_GOOGLE_PRODUCT_BOOTLOADER_DIR := bootloader/$(RELEASE_GOOGLE_BOOTLOADER_TOKAY_DIR) +$(call soong_config_set,caimito_bootloader,prebuilt_dir,$(RELEASE_GOOGLE_BOOTLOADER_TOKAY_DIR)) + ifdef RELEASE_GOOGLE_TOKAY_KERNEL_DIR TARGET_KERNEL_DIR ?= $(RELEASE_GOOGLE_TOKAY_KERNEL_DIR) TARGET_BOARD_KERNEL_HEADERS ?= $(RELEASE_GOOGLE_TOKAY_KERNEL_DIR)/kernel-headers