From 443b449e023042f650a661b657efb4bf5a58bc39 Mon Sep 17 00:00:00 2001 From: Pawan Wagh Date: Wed, 15 May 2024 21:09:22 +0000 Subject: [PATCH] 16kb: Setup 16k OTA config for [husky|shiba] targets Enabling developer option based on trunk stable flags - RELEASE_GOOGLE_HUSKY_16K_DEVELOPER_OPTION - RELEASE_GOOGLE_SHIBA_16K_DEVELOPER_OPTION This change includes - conditional config for 16kb developer option in [husky|shiba] targets. - Path setup required for OTA generation for 16kB developer options. Test: $ source build/envsetup.sh $ lunch husky-trunk_staging-userdebug $ get_build_var TARGET_KERNEL_DIR_16K device/google/shusky-kernels/5.15/trunk-11828503/16kb $ get_build_var RELEASE_KERNEL_HUSKY_DIR device/google/shusky-kernels/5.15/trunk-11828503 $ m Bug: 295035851 Change-Id: Ie88f22b9cd2fb8ba233683650fcdb4e79810e564 --- BoardConfig-shusky-common.mk | 30 ++++++++++++++++++++++++++++++ device-husky.mk | 2 ++ device-shiba.mk | 2 ++ husky/BoardConfig.mk | 1 + shiba/BoardConfig.mk | 1 + 5 files changed, 36 insertions(+) create mode 100644 BoardConfig-shusky-common.mk diff --git a/BoardConfig-shusky-common.mk b/BoardConfig-shusky-common.mk new file mode 100644 index 0000000..5226b7f --- /dev/null +++ b/BoardConfig-shusky-common.mk @@ -0,0 +1,30 @@ +# +# Copyright (C) 2024 The Android Open-Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +ifeq ($(PRODUCT_16K_DEVELOPER_OPTION),true) +# Configures the 16kb kernel and modules for OTA updates. +TARGET_KERNEL_DIR_16K := $(RELEASE_KERNEL_HUSKY_DIR)/16kb +BOARD_KERNEL_PATH_16K := $(TARGET_KERNEL_DIR_16K)/Image.lz4 + +BOARD_KERNEL_MODULES_16K += $(file < $(TARGET_KERNEL_DIR_16K)/vendor_kernel_boot.modules.load) +BOARD_KERNEL_MODULES_16K += $(file < $(TARGET_KERNEL_DIR_16K)/system_dlkm.modules.load) +BOARD_KERNEL_MODULES_16K += $(file < $(TARGET_KERNEL_DIR_16K)/vendor_dlkm.modules.load) +BOARD_KERNEL_MODULES_16K := $(foreach module,$(BOARD_KERNEL_MODULES_16K),$(TARGET_KERNEL_DIR_16K)/$(notdir $(module))) + +# Shusky targets use exynos-bcm_dbg.ko module instead of bcm_dbg.ko. +BOARD_KERNEL_MODULES_16K := $(filter-out %/bcm_dbg.ko,$(BOARD_KERNEL_MODULES_16K)) +BOARD_KERNEL_MODULES_LOAD_16K := $(foreach module,$(BOARD_KERNEL_MODULES_16K),$(notdir $(module))) +endif \ No newline at end of file diff --git a/device-husky.mk b/device-husky.mk index baa151b..f8dcae2 100644 --- a/device-husky.mk +++ b/device-husky.mk @@ -37,6 +37,8 @@ ifeq ($(DEVICE_PAGE_AGNOSTIC),true) TARGET_USERDATAIMAGE_FILE_SYSTEM_TYPE := ext4 TARGET_KERNEL_DIR := $(RELEASE_KERNEL_HUSKY_DIR)/16kb TARGET_RW_FILE_SYSTEM_TYPE := ext4 +else +PRODUCT_16K_DEVELOPER_OPTION := $(RELEASE_GOOGLE_SHIBA_16K_DEVELOPER_OPTION) endif $(call inherit-product-if-exists, vendor/google_devices/shusky/prebuilts/device-vendor-husky.mk) diff --git a/device-shiba.mk b/device-shiba.mk index bc95cb8..daaa4a4 100644 --- a/device-shiba.mk +++ b/device-shiba.mk @@ -30,6 +30,8 @@ ifeq ($(DEVICE_PAGE_AGNOSTIC),true) TARGET_USERDATAIMAGE_FILE_SYSTEM_TYPE := ext4 TARGET_KERNEL_DIR := $(RELEASE_KERNEL_SHIBA_DIR)/16kb TARGET_RW_FILE_SYSTEM_TYPE := ext4 +else +PRODUCT_16K_DEVELOPER_OPTION := $(RELEASE_GOOGLE_SHIBA_16K_DEVELOPER_OPTION) endif $(call inherit-product-if-exists, vendor/google_devices/shusky/prebuilts/device-vendor-shiba.mk) diff --git a/husky/BoardConfig.mk b/husky/BoardConfig.mk index f387ff9..31915d2 100644 --- a/husky/BoardConfig.mk +++ b/husky/BoardConfig.mk @@ -47,6 +47,7 @@ BOARD_KERNEL_CMDLINE += disable_dma32=on WIFI_FEATURE_REAR_CAMERA_SAR := true $(call soong_config_set,wifi,feature_rear_camera_sar,$(WIFI_FEATURE_REAR_CAMERA_SAR)) +include device/google/shusky/BoardConfig-shusky-common.mk include device/google/shusky/device-shusky-common.mk include device/google/zuma/BoardConfig-common.mk diff --git a/shiba/BoardConfig.mk b/shiba/BoardConfig.mk index 8a5fb4b..2368ec1 100644 --- a/shiba/BoardConfig.mk +++ b/shiba/BoardConfig.mk @@ -43,6 +43,7 @@ USES_DEVICE_GOOGLE_SHUSKY := true BOARD_KERNEL_CMDLINE += swiotlb=noforce BOARD_KERNEL_CMDLINE += disable_dma32=on +include device/google/shusky/BoardConfig-shusky-common.mk include device/google/shusky/device-shusky-common.mk include device/google/zuma/BoardConfig-common.mk