move bootloader and radio build flag to device mk

Flag: build.RELEASE_GOOGLE_PRODUCT_RADIO_DIR, build.RELEASE_GOOGLE_PRODUCT_BOOTLOADER_DIR
Bug: 362618412
Change-Id: Id584497948d5ceb854c5f65a076815c5589ec1c8
Signed-off-by: Pindar Yang <pindaryang@google.com>
diff --git a/device-oriole.mk b/device-oriole.mk
index e22fb6e..65bff71 100644
--- a/device-oriole.mk
+++ b/device-oriole.mk
@@ -17,6 +17,14 @@
 # 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_ORIOLE_RADIO_DIR
+RELEASE_GOOGLE_PRODUCT_RADIO_DIR := $(RELEASE_GOOGLE_ORIOLE_RADIO_DIR)
+endif
+RELEASE_GOOGLE_BOOTLOADER_ORIOLE_DIR ?= pdk# Keep this for pdk TODO: b/327119000
+RELEASE_GOOGLE_PRODUCT_BOOTLOADER_DIR := bootloader/$(RELEASE_GOOGLE_BOOTLOADER_ORIOLE_DIR)
+$(call soong_config_set,raviole_bootloader,prebuilt_dir,$(RELEASE_GOOGLE_BOOTLOADER_ORIOLE_DIR))
+
+
 TARGET_LINUX_KERNEL_VERSION := $(RELEASE_KERNEL_ORIOLE_VERSION)
 # Keeps flexibility for kasan and ufs builds
 TARGET_KERNEL_DIR ?= $(RELEASE_KERNEL_ORIOLE_DIR)
diff --git a/device-raven.mk b/device-raven.mk
index e1c2b1b..4ada8b4 100644
--- a/device-raven.mk
+++ b/device-raven.mk
@@ -17,6 +17,14 @@
 # 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_RAVEN_RADIO_DIR
+RELEASE_GOOGLE_PRODUCT_RADIO_DIR := $(RELEASE_GOOGLE_RAVEN_RADIO_DIR)
+endif
+RELEASE_GOOGLE_BOOTLOADER_RAVEN_DIR ?= pdk# Keep this for pdk TODO: b/327119000
+RELEASE_GOOGLE_PRODUCT_BOOTLOADER_DIR := bootloader/$(RELEASE_GOOGLE_BOOTLOADER_RAVEN_DIR)
+$(call soong_config_set,raviole_bootloader,prebuilt_dir,$(RELEASE_GOOGLE_BOOTLOADER_RAVEN_DIR))
+
+
 TARGET_LINUX_KERNEL_VERSION := $(RELEASE_KERNEL_RAVEN_VERSION)
 # Keeps flexibility for kasan and ufs builds
 TARGET_KERNEL_DIR ?= $(RELEASE_KERNEL_RAVEN_DIR)
diff --git a/device-slider.mk b/device-slider.mk
index 09eb645..9a51f6f 100644
--- a/device-slider.mk
+++ b/device-slider.mk
@@ -14,6 +14,10 @@
 # limitations under the License.
 #
 
+RELEASE_GOOGLE_BOOTLOADER_ORIOLE_DIR ?= pdk# Keep this for pdk TODO: b/327119000
+RELEASE_GOOGLE_PRODUCT_BOOTLOADER_DIR := bootloader/$(RELEASE_GOOGLE_BOOTLOADER_ORIOLE_DIR)
+$(call soong_config_set,raviole_bootloader,prebuilt_dir,$(RELEASE_GOOGLE_BOOTLOADER_ORIOLE_DIR))
+
 # Keeps flexibility for kasan and ufs builds
 TARGET_KERNEL_DIR ?= $(RELEASE_KERNEL_ORIOLE_DIR)
 TARGET_BOARD_KERNEL_HEADERS ?= $(RELEASE_KERNEL_ORIOLE_DIR)/kernel-headers
diff --git a/device-whitefin.mk b/device-whitefin.mk
index f7e19c3..c9be012 100644
--- a/device-whitefin.mk
+++ b/device-whitefin.mk
@@ -14,6 +14,10 @@
 # limitations under the License.
 #
 
+RELEASE_GOOGLE_BOOTLOADER_ORIOLE_DIR ?= pdk# Keep this for pdk TODO: b/327119000
+RELEASE_GOOGLE_PRODUCT_BOOTLOADER_DIR := bootloader/$(RELEASE_GOOGLE_BOOTLOADER_ORIOLE_DIR)
+$(call soong_config_set,raviole_bootloader,prebuilt_dir,$(RELEASE_GOOGLE_BOOTLOADER_ORIOLE_DIR))
+
 # Keeps flexibility for kasan and ufs builds
 TARGET_KERNEL_DIR ?= $(RELEASE_KERNEL_ORIOLE_DIR)
 TARGET_BOARD_KERNEL_HEADERS ?= $(RELEASE_KERNEL_ORIOLE_DIR)/kernel-headers
diff --git a/oriole/BoardConfig.mk b/oriole/BoardConfig.mk
index 757ee50..36affb6 100644
--- a/oriole/BoardConfig.mk
+++ b/oriole/BoardConfig.mk
@@ -24,11 +24,6 @@
 BOARD_KERNEL_CMDLINE += pcie-exynos-core.load_sequential=1
 BOARD_KERNEL_CMDLINE += g2d.load_sequential=1
 
-RELEASE_GOOGLE_PRODUCT_RADIO_DIR := $(RELEASE_GOOGLE_ORIOLE_RADIO_DIR)
-RELEASE_GOOGLE_BOOTLOADER_ORIOLE_DIR ?= pdk# Keep this for pdk TODO: b/327119000
-RELEASE_GOOGLE_PRODUCT_BOOTLOADER_DIR := bootloader/$(RELEASE_GOOGLE_BOOTLOADER_ORIOLE_DIR)
-$(call soong_config_set,raviole_bootloader,prebuilt_dir,$(RELEASE_GOOGLE_BOOTLOADER_ORIOLE_DIR))
-
 ifdef AUTOMOTIVE_PRODUCT_PATH
   #RBC# include_top device/google/auto_tcu
   #RBC# include_top device/google/pixel_tcu
diff --git a/raven/BoardConfig.mk b/raven/BoardConfig.mk
index 06f97ae..eb1a5c8 100644
--- a/raven/BoardConfig.mk
+++ b/raven/BoardConfig.mk
@@ -24,11 +24,6 @@
 BOARD_KERNEL_CMDLINE += pcie-exynos-core.load_sequential=1
 BOARD_KERNEL_CMDLINE += g2d.load_sequential=1
 
-RELEASE_GOOGLE_PRODUCT_RADIO_DIR := $(RELEASE_GOOGLE_RAVEN_RADIO_DIR)
-RELEASE_GOOGLE_BOOTLOADER_RAVEN_DIR ?= pdk# Keep this for pdk TODO: b/327119000
-RELEASE_GOOGLE_PRODUCT_BOOTLOADER_DIR := bootloader/$(RELEASE_GOOGLE_BOOTLOADER_RAVEN_DIR)
-$(call soong_config_set,raviole_bootloader,prebuilt_dir,$(RELEASE_GOOGLE_BOOTLOADER_RAVEN_DIR))
-
 ifdef AUTOMOTIVE_PRODUCT_PATH
   #RBC# include_top device/google/auto_tcu
   #RBC# include_top device/google/pixel_tcu
diff --git a/slider/BoardConfig.mk b/slider/BoardConfig.mk
index 917b79a..82425d2 100644
--- a/slider/BoardConfig.mk
+++ b/slider/BoardConfig.mk
@@ -15,9 +15,6 @@
 #
 TARGET_BOARD_INFO_FILE := device/google/raviole/board-info.txt
 TARGET_BOOTLOADER_BOARD_NAME := slider
-RELEASE_GOOGLE_BOOTLOADER_ORIOLE_DIR ?= pdk# Keep this for pdk TODO: b/327119000
-RELEASE_GOOGLE_PRODUCT_BOOTLOADER_DIR := bootloader/$(RELEASE_GOOGLE_BOOTLOADER_ORIOLE_DIR)
-$(call soong_config_set,raviole_bootloader,prebuilt_dir,$(RELEASE_GOOGLE_BOOTLOADER_ORIOLE_DIR))
 TARGET_SCREEN_DENSITY := 560
 USES_DEVICE_GOOGLE_RAVIOLE := true
 
diff --git a/whitefin/BoardConfig.mk b/whitefin/BoardConfig.mk
index e28f7bf..5b5a07a 100644
--- a/whitefin/BoardConfig.mk
+++ b/whitefin/BoardConfig.mk
@@ -15,9 +15,6 @@
 #
 TARGET_BOARD_INFO_FILE := device/google/raviole/board-info.txt
 TARGET_BOOTLOADER_BOARD_NAME := whitefin
-RELEASE_GOOGLE_BOOTLOADER_ORIOLE_DIR ?= pdk# Keep this for pdk TODO: b/327119000
-RELEASE_GOOGLE_PRODUCT_BOOTLOADER_DIR := bootloader/$(RELEASE_GOOGLE_BOOTLOADER_ORIOLE_DIR)
-$(call soong_config_set,raviole_bootloader,prebuilt_dir,$(RELEASE_GOOGLE_BOOTLOADER_ORIOLE_DIR))
 TARGET_SCREEN_DENSITY := 440
 USES_DEVICE_GOOGLE_RAVIOLE := true