From fa60355a21dc6bdc9fc38a7651f33115b152bd50 Mon Sep 17 00:00:00 2001 From: Cheng Chang Date: Tue, 25 Jun 2024 05:36:24 +0000 Subject: [PATCH] gps: Set configuration by kernel version Bug: 258364350 Test: Verification at b/258364350. Test: Function verification at b/258364350. Test: Compile and verify the configuration is correct. Change-Id: I7d6521bef3605dc725c9a9e34f27217ccae42d4e --- device-husky.mk | 21 +++++-- device-shiba.mk | 21 +++++-- location/gps.6.1.xml.hk3 | 108 ++++++++++++++++++++++++++++++++++ location/gps.6.1.xml.sb3 | 108 ++++++++++++++++++++++++++++++++++ location/gps_user.6.1.xml.hk3 | 107 +++++++++++++++++++++++++++++++++ location/gps_user.6.1.xml.sb3 | 107 +++++++++++++++++++++++++++++++++ location/lhd.conf | 1 + location/lhd_user.conf | 1 + 8 files changed, 466 insertions(+), 8 deletions(-) create mode 100644 location/gps.6.1.xml.hk3 create mode 100644 location/gps.6.1.xml.sb3 create mode 100644 location/gps_user.6.1.xml.hk3 create mode 100644 location/gps_user.6.1.xml.sb3 diff --git a/device-husky.mk b/device-husky.mk index eb94b55..ee3abc2 100644 --- a/device-husky.mk +++ b/device-husky.mk @@ -304,16 +304,29 @@ include device/google/gs-common/gps/brcm/device.mk PRODUCT_COPY_FILES += \ device/google/shusky/location/gps.cer:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.cer +# Location ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) + PRODUCT_COPY_FILES += \ + device/google/shusky/location/lhd.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/lhd.conf \ + device/google/shusky/location/scd.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/scd.conf + ifneq (,$(filter 6.1, $(TARGET_LINUX_KERNEL_VERSION))) + PRODUCT_COPY_FILES += \ + device/google/shusky/location/gps.6.1.xml.hk3:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml + else PRODUCT_COPY_FILES += \ - device/google/shusky/location/lhd.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/lhd.conf \ - device/google/shusky/location/scd.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/scd.conf \ device/google/shusky/location/gps.xml.hk3:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml + endif else + PRODUCT_COPY_FILES += \ + device/google/shusky/location/lhd_user.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/lhd.conf \ + device/google/shusky/location/scd_user.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/scd.conf + ifneq (,$(filter 6.1, $(TARGET_LINUX_KERNEL_VERSION))) + PRODUCT_COPY_FILES += \ + device/google/shusky/location/gps_user.6.1.xml.hk3:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml + else PRODUCT_COPY_FILES += \ - device/google/shusky/location/lhd_user.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/lhd.conf \ - device/google/shusky/location/scd_user.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/scd.conf \ device/google/shusky/location/gps_user.xml.hk3:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml + endif endif # Set zram size diff --git a/device-shiba.mk b/device-shiba.mk index 23a587a..a026d4d 100644 --- a/device-shiba.mk +++ b/device-shiba.mk @@ -287,16 +287,29 @@ include device/google/gs-common/gps/brcm/device.mk PRODUCT_COPY_FILES += \ device/google/shusky/location/gps.cer:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.cer +# Location ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) + PRODUCT_COPY_FILES += \ + device/google/shusky/location/lhd.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/lhd.conf \ + device/google/shusky/location/scd.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/scd.conf + ifneq (,$(filter 6.1, $(TARGET_LINUX_KERNEL_VERSION))) + PRODUCT_COPY_FILES += \ + device/google/shusky/location/gps.6.1.xml.sb3:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml + else PRODUCT_COPY_FILES += \ - device/google/shusky/location/lhd.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/lhd.conf \ - device/google/shusky/location/scd.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/scd.conf \ device/google/shusky/location/gps.xml.sb3:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml + endif else + PRODUCT_COPY_FILES += \ + device/google/shusky/location/lhd_user.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/lhd.conf \ + device/google/shusky/location/scd_user.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/scd.conf + ifneq (,$(filter 6.1, $(TARGET_LINUX_KERNEL_VERSION))) + PRODUCT_COPY_FILES += \ + device/google/shusky/location/gps_user.6.1.xml.sb3:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml + else PRODUCT_COPY_FILES += \ - device/google/shusky/location/lhd_user.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/lhd.conf \ - device/google/shusky/location/scd_user.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/scd.conf \ device/google/shusky/location/gps_user.xml.sb3:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml + endif endif # Set zram size diff --git a/location/gps.6.1.xml.hk3 b/location/gps.6.1.xml.hk3 new file mode 100644 index 0000000..beba2bb --- /dev/null +++ b/location/gps.6.1.xml.hk3 @@ -0,0 +1,108 @@ + + + + + + + + + + diff --git a/location/gps.6.1.xml.sb3 b/location/gps.6.1.xml.sb3 new file mode 100644 index 0000000..fe5065b --- /dev/null +++ b/location/gps.6.1.xml.sb3 @@ -0,0 +1,108 @@ + + + + + + + + + + diff --git a/location/gps_user.6.1.xml.hk3 b/location/gps_user.6.1.xml.hk3 new file mode 100644 index 0000000..a6ddbce --- /dev/null +++ b/location/gps_user.6.1.xml.hk3 @@ -0,0 +1,107 @@ + + + + + + + + + + diff --git a/location/gps_user.6.1.xml.sb3 b/location/gps_user.6.1.xml.sb3 new file mode 100644 index 0000000..4248a7b --- /dev/null +++ b/location/gps_user.6.1.xml.sb3 @@ -0,0 +1,107 @@ + + + + + + + + + + diff --git a/location/lhd.conf b/location/lhd.conf index c430b93..a0183a4 100644 --- a/location/lhd.conf +++ b/location/lhd.conf @@ -31,3 +31,4 @@ SecondaryConfigPath=/data/vendor/gps/overlay/lhd_overlay.conf SkipSensorWakeLock=true LoggerWakeLockEnable=false +PpsEnable=true diff --git a/location/lhd_user.conf b/location/lhd_user.conf index 73e03bc..d861fec 100644 --- a/location/lhd_user.conf +++ b/location/lhd_user.conf @@ -29,3 +29,4 @@ TrafficLogEnabled=false SkipSensorWakeLock=true LoggerWakeLockEnable=false +PpsEnable=true