From 06b08f2a8bcad48e9bf913a638bcba5dd272fbab Mon Sep 17 00:00:00 2001 From: Yabin Cui Date: Wed, 28 Feb 2024 10:13:56 -0800 Subject: [PATCH] caiman: add etm modules in userdebug/eng builds Since etm modules are not in the normal kernel prebuilts, they get left out of modules.load. So also import rc file to load them. Bug: 321061072 Test: build and run caiman Change-Id: Iaf41244bc1135b7528d3a3ec3e92a4e644f5ee53 --- caiman/BoardConfig.mk | 4 ++++ conf/init.caiman.rc | 7 +++++++ device-caiman.mk | 5 +++++ 3 files changed, 16 insertions(+) diff --git a/caiman/BoardConfig.mk b/caiman/BoardConfig.mk index ca29fa5b..5cf44521 100644 --- a/caiman/BoardConfig.mk +++ b/caiman/BoardConfig.mk @@ -27,3 +27,7 @@ include device/google/zumapro/BoardConfig-common.mk -include vendor/google_devices/caiman/proprietary/BoardConfigVendor.mk include device/google/caimito-sepolicy/caiman-sepolicy.mk include device/google/caimito/wifi/BoardConfig-wifi.mk + +ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) +-include device/google/common/etm/6_1/BoardUserdebugModules.mk +endif diff --git a/conf/init.caiman.rc b/conf/init.caiman.rc index d33ed77c..2ef3673a 100644 --- a/conf/init.caiman.rc +++ b/conf/init.caiman.rc @@ -71,3 +71,10 @@ on property:sys.boot_completed=1 chown system input /dev/touch_offload chmod 660 /dev/touch_offload start twoshay + +# ETM +on init && property:ro.build.flavor=caiman-userdebug + import /vendor/etc/init/hw/init.etm.rc + +on init && property:ro.build.flavor=caiman-eng + import /vendor/etc/init/hw/init.etm.rc diff --git a/device-caiman.mk b/device-caiman.mk index fabe766b..1aaf2191 100644 --- a/device-caiman.mk +++ b/device-caiman.mk @@ -379,3 +379,8 @@ SUPPORT_RIL_DOMAIN_SELECTION := true # Thread HAL PRODUCT_PACKAGES += \ com.google.caimito.hardware.threadnetwork + +# ETM +ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) +$(call inherit-product-if-exists, device/google/common/etm/device-userdebug-modules.mk) +endif