From 38562b32f86e6c444ed3b9d3f775cf8bb8e637d8 Mon Sep 17 00:00:00 2001 From: Cyan_Hsieh Date: Tue, 2 Apr 2024 16:52:15 +0800 Subject: [PATCH] Switch kernel directory to control by build flag Bug: 309749142 Change-Id: If82fdbbd87cccba0763479e075289efd739e7e34 --- device-husky.mk | 14 +++----------- device-ripcurrent.mk | 14 +++----------- device-shiba.mk | 14 +++----------- 3 files changed, 9 insertions(+), 33 deletions(-) diff --git a/device-husky.mk b/device-husky.mk index 6738ebb..0859770 100644 --- a/device-husky.mk +++ b/device-husky.mk @@ -17,18 +17,10 @@ # Restrict the visibility of Android.bp files to improve build analysis time $(call inherit-product-if-exists, vendor/google/products/sources_pixel.mk) -ifdef RELEASE_GOOGLE_HUSKY_KERNEL_VERSION -TARGET_LINUX_KERNEL_VERSION := $(RELEASE_GOOGLE_HUSKY_KERNEL_VERSION) -endif - -ifdef RELEASE_GOOGLE_HUSKY_KERNEL_DIR +TARGET_LINUX_KERNEL_VERSION := $(RELEASE_KERNEL_HUSKY_VERSION) # Keeps flexibility for kasan and ufs builds -TARGET_KERNEL_DIR ?= $(RELEASE_GOOGLE_HUSKY_KERNEL_DIR) -TARGET_BOARD_KERNEL_HEADERS ?= $(RELEASE_GOOGLE_HUSKY_KERNEL_DIR)/kernel-headers -else -TARGET_KERNEL_DIR ?= device/google/shusky-kernel -TARGET_BOARD_KERNEL_HEADERS ?= device/google/shusky-kernel/kernel-headers -endif +TARGET_KERNEL_DIR ?= $(RELEASE_KERNEL_HUSKY_DIR) +TARGET_BOARD_KERNEL_HEADERS ?= $(RELEASE_KERNEL_HUSKY_DIR)/kernel-headers LOCAL_PATH := device/google/shusky diff --git a/device-ripcurrent.mk b/device-ripcurrent.mk index 39e892d..40a9900 100644 --- a/device-ripcurrent.mk +++ b/device-ripcurrent.mk @@ -17,17 +17,9 @@ # Restrict the visibility of Android.bp files to improve build analysis time $(call inherit-product-if-exists, vendor/google/products/sources_pixel.mk) -TARGET_KERNEL_DIR ?= device/google/shusky-kernel -TARGET_BOARD_KERNEL_HEADERS ?= device/google/shusky-kernel/kernel-headers - -ifdef RELEASE_GOOGLE_RIPCURRENT_KERNEL_VERSION -TARGET_LINUX_KERNEL_VERSION := $(RELEASE_GOOGLE_RIPCURRENT_KERNEL_VERSION) -endif - -ifdef RELEASE_GOOGLE_RIPCURRENT_KERNEL_DIR -TARGET_KERNEL_DIR := $(RELEASE_GOOGLE_RIPCURRENT_KERNEL_DIR) -TARGET_BOARD_KERNEL_HEADERS := $(RELEASE_GOOGLE_RIPCURRENT_KERNEL_DIR)/kernel-headers -endif +TARGET_LINUX_KERNEL_VERSION := $(RELEASE_KERNEL_RIPCURRENT_VERSION) +TARGET_KERNEL_DIR := $(RELEASE_KERNEL_RIPCURRENT_DIR) +TARGET_BOARD_KERNEL_HEADERS := $(RELEASE_KERNEL_RIPCURRENT_DIR)/kernel-headers ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) USE_UWBFIELDTESTQM := true diff --git a/device-shiba.mk b/device-shiba.mk index 55f2d6b..0b8e4a7 100644 --- a/device-shiba.mk +++ b/device-shiba.mk @@ -17,18 +17,10 @@ # Restrict the visibility of Android.bp files to improve build analysis time $(call inherit-product-if-exists, vendor/google/products/sources_pixel.mk) -ifdef RELEASE_GOOGLE_SHIBA_KERNEL_VERSION -TARGET_LINUX_KERNEL_VERSION := $(RELEASE_GOOGLE_SHIBA_KERNEL_VERSION) -endif - -ifdef RELEASE_GOOGLE_SHIBA_KERNEL_DIR +TARGET_LINUX_KERNEL_VERSION := $(RELEASE_KERNEL_SHIBA_VERSION) # Keeps flexibility for kasan and ufs builds -TARGET_KERNEL_DIR ?= $(RELEASE_GOOGLE_SHIBA_KERNEL_DIR) -TARGET_BOARD_KERNEL_HEADERS ?= $(RELEASE_GOOGLE_SHIBA_KERNEL_DIR)/kernel-headers -else -TARGET_KERNEL_DIR ?= device/google/shusky-kernel -TARGET_BOARD_KERNEL_HEADERS ?= device/google/shusky-kernel/kernel-headers -endif +TARGET_KERNEL_DIR ?= $(RELEASE_KERNEL_SHIBA_DIR) +TARGET_BOARD_KERNEL_HEADERS ?= $(RELEASE_KERNEL_SHIBA_DIR)/kernel-headers LOCAL_PATH := device/google/shusky