raviole: control the kernel by release configuration
Bug: 317784824
Change-Id: I4aec167fcec9e04590b18fa2bb64a42934b041aa
Signed-off-by: Aaron Ding <aaronding@google.com>
diff --git a/device-oriole.mk b/device-oriole.mk
index edac624..7218b2b 100644
--- a/device-oriole.mk
+++ b/device-oriole.mk
@@ -20,6 +20,15 @@
TARGET_KERNEL_DIR ?= device/google/raviole-kernel
TARGET_BOARD_KERNEL_HEADERS := device/google/raviole-kernel/kernel-headers
+ifdef RELEASE_GOOGLE_ORIOLE_KERNEL_VERSION
+TARGET_LINUX_KERNEL_VERSION := $(RELEASE_GOOGLE_ORIOLE_KERNEL_VERSION)
+endif
+
+ifdef RELEASE_GOOGLE_ORIOLE_KERNEL_DIR
+TARGET_KERNEL_DIR := $(RELEASE_GOOGLE_ORIOLE_KERNEL_DIR)
+TARGET_BOARD_KERNEL_HEADERS := $(RELEASE_GOOGLE_ORIOLE_KERNEL_DIR)/kernel-headers
+endif
+
$(call inherit-product-if-exists, vendor/google_devices/raviole/prebuilts/device-vendor-oriole.mk)
$(call inherit-product-if-exists, vendor/google_devices/gs101/prebuilts/device-vendor.mk)
$(call inherit-product-if-exists, vendor/google_devices/gs101/proprietary/device-vendor.mk)
diff --git a/device-raven.mk b/device-raven.mk
index 1850ba1..44853db 100644
--- a/device-raven.mk
+++ b/device-raven.mk
@@ -20,6 +20,15 @@
TARGET_KERNEL_DIR ?= device/google/raviole-kernel
TARGET_BOARD_KERNEL_HEADERS := device/google/raviole-kernel/kernel-headers
+ifdef RELEASE_GOOGLE_RAVEN_KERNEL_VERSION
+TARGET_LINUX_KERNEL_VERSION := $(RELEASE_GOOGLE_RAVEN_KERNEL_VERSION)
+endif
+
+ifdef RELEASE_GOOGLE_RAVEN_KERNEL_DIR
+TARGET_KERNEL_DIR := $(RELEASE_GOOGLE_RAVEN_KERNEL_DIR)
+TARGET_BOARD_KERNEL_HEADERS := $(RELEASE_GOOGLE_RAVEN_KERNEL_DIR)/kernel-headers
+endif
+
$(call inherit-product, device/google/raviole/uwb/uwb_calibration_country.mk)
$(call inherit-product-if-exists, vendor/google_devices/raviole/prebuilts/device-vendor-raven.mk)
$(call inherit-product-if-exists, vendor/google_devices/gs101/prebuilts/device-vendor.mk)