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
This commit is contained in:
Cheng Chang 2024-06-25 05:36:24 +00:00
parent fa4b16ffb9
commit fa60355a21
8 changed files with 466 additions and 8 deletions

View file

@ -304,16 +304,29 @@ include device/google/gs-common/gps/brcm/device.mk
PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \
device/google/shusky/location/gps.cer:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.cer device/google/shusky/location/gps.cer:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.cer
# Location
ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) 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 += \ 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 device/google/shusky/location/gps.xml.hk3:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml
endif
else 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 += \ 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 device/google/shusky/location/gps_user.xml.hk3:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml
endif
endif endif
# Set zram size # Set zram size

View file

@ -287,16 +287,29 @@ include device/google/gs-common/gps/brcm/device.mk
PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \
device/google/shusky/location/gps.cer:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.cer device/google/shusky/location/gps.cer:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.cer
# Location
ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) 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 += \ 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 device/google/shusky/location/gps.xml.sb3:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml
endif
else 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 += \ 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 device/google/shusky/location/gps_user.xml.sb3:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml
endif
endif endif
# Set zram size # Set zram size

108
location/gps.6.1.xml.hk3 Normal file
View file

@ -0,0 +1,108 @@
<?xml version="1.0" encoding="utf-8"?>
<glgps xmlns="http://www.glpals.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.glpals.com/ glconfig.xsd" >
<hal
PortName="/dev/ttyBCM"
BaudRate="921600"
GpioNStdbyPath="/sys/devices/platform/111e0000.spi/spi_master/spi21/spi21.0/nstandby"
CustGpioDelayMs="250"
LogEnabled="true"
Log="JAVA"
SecondaryConfigPath="/data/vendor/gps/overlay/gps_overlay.xml"
LogDirectory="/sdcard/gps/broadcom/storage/"
CtrlPipe="/data/vendor/gps/glgpsctrl"
NmeaOutName="/data/vendor/gps/nmea_out"
acSuplServer="supl.google.com"
SuplPort="7275"
SuplLogEnable="true"
SuplLogFullName="/data/vendor/gps/suplflow.txt"
tlsEnable="true"
SuplSslMethod="SSLv23_NO_TLSv1_2"
SuplEnable="true"
SuplUseApn="false"
SuplUseApnNI="true"
SuplUseFwCellInfo="false"
SuplDummyCellInfo ="true"
SuplTlsCertDirPath="/etc/security/cacerts"
SuplTlsCertPath="/vendor/etc/gnss/gps.cer"
SuplUT1Seconds="20"
SuplUT2Seconds="20"
SuplUT3Seconds="20"
TcpConnectionTimeout="20"
SuplLppCapable="true"
SuplEcidCapable="true"
SuplVersion="2"
SuplMinorVersion="0"
SuplOtdoaCapable="true"
SuplOtdoaCapable2="true"
SuplGlonassCapable = "true"
SuplGalileoCapable = "true"
SuplBdsCapable = "true"
SuplMgpsCapable = "true"
RtoEnable="true"
RtiEnable="true"
HttpSyncLto="true"
LtoFileName="lto2.dat"
LtoDir="/data/vendor/gps/"
LtoSyncThresholdDays="1"
GnssYearOfHardware="2020"
CpGuardTimeSec="2"
CpLppGuardTimeSec="2"
IgnoreInjectedSystemTime="true"
AttributionAppPkgName="com.google.android.carrierlocation"
AssertEnabled="true"
CpLppeCancelDbhOnAgnssProvideLoc="true"
CpLppeUseAgnssLocForEmptyDbh="true"
CpLppHighAccuracyShapeMode="1"
ReAidingOnHotStart="false"
ReAidingIntervalSec="3600"
RuntimeSwLteFilterEnable="true"
PpsDevice="/sys/devices/platform/bbd_pps/pps_assert"
MaxThreadNum="13"
SensorsMask="0x244"
/>
<gll
PpsEnable="true"
LogPriMask="LOG_INFO"
LogFacMask="LOG_NMEA | LOG_GLLIOS | LOG_GLLAPI"
FrqPlan="FRQ_PLAN_26MHZ_2PPM_49_152MHZ_300PPB"
MultiCarrRFMode="GL_MULTI_CARR_RF_MODE_L1_L5"
MultiCarrLnaMask="L1_EXT_ON|L5_EXT_ON"
RfType="GL_RF_4776_BRCM"
ExtL5Bias="10.5"
WarmStandbyTimeout1Seconds="10"
WarmStandbyTimeout2Seconds="15"
EnableGnssPropagateInStandby="true"
RfPathLossDb_Ap="3.51"
RfPathLossDb_Cp="3.51"
RfPathLossDb_Ap_L5="4.01"
RfPathLossDb_Cp_L5="4.01"
OnChipGpsCarrierType="3,2,3,3,2,3,2,3,3,3,1,2,1,3,2,1,2,3,1,1,1,1,3,3,3,3,3,1,2,3,2,3"
EnableOnChipStopNotification="2"
PowerMode="3"
MinGpsWeekNumber="2216"
OnChipAccMask="50"
EnableB1C="false"
EnableCoex="true"
RTICacheTimeoutSec="3600"
/>
<gll_features
EnableNicAutoSwitch="true"
EnableNavic="true"
/>
</glgps>

108
location/gps.6.1.xml.sb3 Normal file
View file

@ -0,0 +1,108 @@
<?xml version="1.0" encoding="utf-8"?>
<glgps xmlns="http://www.glpals.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.glpals.com/ glconfig.xsd" >
<hal
PortName="/dev/ttyBCM"
BaudRate="921600"
GpioNStdbyPath="/sys/devices/platform/111e0000.spi/spi_master/spi21/spi21.0/nstandby"
CustGpioDelayMs="250"
LogEnabled="true"
Log="JAVA"
SecondaryConfigPath="/data/vendor/gps/overlay/gps_overlay.xml"
LogDirectory="/sdcard/gps/broadcom/storage/"
CtrlPipe="/data/vendor/gps/glgpsctrl"
NmeaOutName="/data/vendor/gps/nmea_out"
acSuplServer="supl.google.com"
SuplPort="7275"
SuplLogEnable="true"
SuplLogFullName="/data/vendor/gps/suplflow.txt"
tlsEnable="true"
SuplSslMethod="SSLv23_NO_TLSv1_2"
SuplEnable="true"
SuplUseApn="false"
SuplUseApnNI="true"
SuplUseFwCellInfo="false"
SuplDummyCellInfo ="true"
SuplTlsCertDirPath="/etc/security/cacerts"
SuplTlsCertPath="/vendor/etc/gnss/gps.cer"
SuplUT1Seconds="20"
SuplUT2Seconds="20"
SuplUT3Seconds="20"
TcpConnectionTimeout="20"
SuplLppCapable="true"
SuplEcidCapable="true"
SuplVersion="2"
SuplMinorVersion="0"
SuplOtdoaCapable="true"
SuplOtdoaCapable2="true"
SuplGlonassCapable = "true"
SuplGalileoCapable = "true"
SuplBdsCapable = "true"
SuplMgpsCapable = "true"
RtoEnable="true"
RtiEnable="true"
HttpSyncLto="true"
LtoFileName="lto2.dat"
LtoDir="/data/vendor/gps/"
LtoSyncThresholdDays="1"
GnssYearOfHardware="2020"
CpGuardTimeSec="2"
CpLppGuardTimeSec="2"
IgnoreInjectedSystemTime="true"
AttributionAppPkgName="com.google.android.carrierlocation"
AssertEnabled="true"
CpLppeCancelDbhOnAgnssProvideLoc="true"
CpLppeUseAgnssLocForEmptyDbh="true"
CpLppHighAccuracyShapeMode="1"
ReAidingOnHotStart="false"
ReAidingIntervalSec="3600"
RuntimeSwLteFilterEnable="true"
PpsDevice="/sys/devices/platform/bbd_pps/pps_assert"
MaxThreadNum="13"
SensorsMask="0x244"
/>
<gll
PpsEnable="true"
LogPriMask="LOG_INFO"
LogFacMask="LOG_NMEA | LOG_GLLIOS | LOG_GLLAPI"
FrqPlan="FRQ_PLAN_26MHZ_2PPM_49_152MHZ_300PPB"
MultiCarrRFMode="GL_MULTI_CARR_RF_MODE_L1_L5"
MultiCarrLnaMask="L1_EXT_ON|L5_EXT_ON"
RfType="GL_RF_4776_BRCM"
ExtL5Bias="11.3"
WarmStandbyTimeout1Seconds="10"
WarmStandbyTimeout2Seconds="15"
EnableGnssPropagateInStandby="true"
RfPathLossDb_Ap="3.4"
RfPathLossDb_Cp="3.4"
RfPathLossDb_Ap_L5="4"
RfPathLossDb_Cp_L5="4"
OnChipGpsCarrierType="3,2,3,3,2,3,2,3,3,3,1,2,1,3,2,1,2,3,1,1,1,1,3,3,3,3,3,1,2,3,2,3"
EnableOnChipStopNotification="2"
PowerMode="3"
MinGpsWeekNumber="2216"
OnChipAccMask="50"
EnableB1C="false"
EnableCoex="true"
RTICacheTimeoutSec="3600"
/>
<gll_features
EnableNicAutoSwitch="true"
EnableNavic="true"
/>
</glgps>

View file

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
<glgps xmlns="http://www.glpals.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.glpals.com/ glconfig.xsd" >
<hal
PortName="/dev/ttyBCM"
BaudRate="921600"
GpioNStdbyPath="/sys/devices/platform/111e0000.spi/spi_master/spi21/spi21.0/nstandby"
CustGpioDelayMs="250"
LogEnabled="false"
Log="JAVA"
LogDirectory="/sdcard/gps/broadcom/storage/"
CtrlPipe="/data/vendor/gps/glgpsctrl"
NmeaOutName="/data/vendor/gps/nmea_out"
acSuplServer="supl.google.com"
SuplPort="7275"
SuplLogEnable="false"
SuplLogFullName="/data/vendor/gps/suplflow.txt"
tlsEnable="true"
SuplSslMethod="SSLv23_NO_TLSv1_2"
SuplEnable="true"
SuplUseApn="false"
SuplUseApnNI="true"
SuplUseFwCellInfo="false"
SuplDummyCellInfo ="true"
SuplTlsCertDirPath="/etc/security/cacerts"
SuplTlsCertPath="/vendor/etc/gnss/gps.cer"
SuplUT1Seconds="20"
SuplUT2Seconds="20"
SuplUT3Seconds="20"
TcpConnectionTimeout="20"
SuplLppCapable="true"
SuplEcidCapable="true"
SuplVersion="2"
SuplMinorVersion="0"
SuplOtdoaCapable="true"
SuplOtdoaCapable2="true"
SuplGlonassCapable = "true"
SuplGalileoCapable = "true"
SuplBdsCapable = "true"
SuplMgpsCapable = "true"
RtoEnable="true"
RtiEnable="true"
HttpSyncLto="true"
LtoFileName="lto2.dat"
LtoDir="/data/vendor/gps/"
LtoSyncThresholdDays="1"
GnssYearOfHardware="2020"
CpGuardTimeSec="2"
CpLppGuardTimeSec="2"
IgnoreInjectedSystemTime="true"
AttributionAppPkgName="com.google.android.carrierlocation"
AssertEnabled="false"
CpLppeCancelDbhOnAgnssProvideLoc="true"
CpLppeUseAgnssLocForEmptyDbh="true"
CpLppHighAccuracyShapeMode="1"
ReAidingOnHotStart="false"
ReAidingIntervalSec="3600"
RuntimeSwLteFilterEnable="true"
PpsDevice="/sys/devices/platform/bbd_pps/pps_assert"
MaxThreadNum="13"
SensorsMask="0x244"
/>
<gll
PpsEnable="true"
LogPriMask="LOG_INFO"
LogFacMask="LOG_NMEA | LOG_GLLIOS | LOG_GLLAPI"
FrqPlan="FRQ_PLAN_26MHZ_2PPM_49_152MHZ_300PPB"
MultiCarrRFMode="GL_MULTI_CARR_RF_MODE_L1_L5"
MultiCarrLnaMask="L1_EXT_ON|L5_EXT_ON"
RfType="GL_RF_4776_BRCM"
ExtL5Bias="10.5"
WarmStandbyTimeout1Seconds="10"
WarmStandbyTimeout2Seconds="15"
EnableGnssPropagateInStandby="true"
RfPathLossDb_Ap="3.51"
RfPathLossDb_Cp="3.51"
RfPathLossDb_Ap_L5="4.01"
RfPathLossDb_Cp_L5="4.01"
OnChipGpsCarrierType="3,2,3,3,2,3,2,3,3,3,1,2,1,3,2,1,2,3,1,1,1,1,3,3,3,3,3,1,2,3,2,3"
EnableOnChipStopNotification="0"
PowerMode="3"
MinGpsWeekNumber="2216"
OnChipAccMask="50"
EnableB1C="false"
EnableCoex="true"
RTICacheTimeoutSec="3600"
/>
<gll_features
EnableNicAutoSwitch="true"
EnableNavic="true"
/>
</glgps>

View file

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
<glgps xmlns="http://www.glpals.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.glpals.com/ glconfig.xsd" >
<hal
PortName="/dev/ttyBCM"
BaudRate="921600"
GpioNStdbyPath="/sys/devices/platform/111e0000.spi/spi_master/spi21/spi21.0/nstandby"
CustGpioDelayMs="250"
LogEnabled="false"
Log="JAVA"
LogDirectory="/sdcard/gps/broadcom/storage/"
CtrlPipe="/data/vendor/gps/glgpsctrl"
NmeaOutName="/data/vendor/gps/nmea_out"
acSuplServer="supl.google.com"
SuplPort="7275"
SuplLogEnable="false"
SuplLogFullName="/data/vendor/gps/suplflow.txt"
tlsEnable="true"
SuplSslMethod="SSLv23_NO_TLSv1_2"
SuplEnable="true"
SuplUseApn="false"
SuplUseApnNI="true"
SuplUseFwCellInfo="false"
SuplDummyCellInfo ="true"
SuplTlsCertDirPath="/etc/security/cacerts"
SuplTlsCertPath="/vendor/etc/gnss/gps.cer"
SuplUT1Seconds="20"
SuplUT2Seconds="20"
SuplUT3Seconds="20"
TcpConnectionTimeout="20"
SuplLppCapable="true"
SuplEcidCapable="true"
SuplVersion="2"
SuplMinorVersion="0"
SuplOtdoaCapable="true"
SuplOtdoaCapable2="true"
SuplGlonassCapable = "true"
SuplGalileoCapable = "true"
SuplBdsCapable = "true"
SuplMgpsCapable = "true"
RtoEnable="true"
RtiEnable="true"
HttpSyncLto="true"
LtoFileName="lto2.dat"
LtoDir="/data/vendor/gps/"
LtoSyncThresholdDays="1"
GnssYearOfHardware="2020"
CpGuardTimeSec="2"
CpLppGuardTimeSec="2"
IgnoreInjectedSystemTime="true"
AttributionAppPkgName="com.google.android.carrierlocation"
AssertEnabled="false"
CpLppeCancelDbhOnAgnssProvideLoc="true"
CpLppeUseAgnssLocForEmptyDbh="true"
CpLppHighAccuracyShapeMode="1"
ReAidingOnHotStart="false"
ReAidingIntervalSec="3600"
RuntimeSwLteFilterEnable="true"
PpsDevice="/sys/devices/platform/bbd_pps/pps_assert"
MaxThreadNum="13"
SensorsMask="0x244"
/>
<gll
PpsEnable="true"
LogPriMask="LOG_INFO"
LogFacMask="LOG_NMEA | LOG_GLLIOS | LOG_GLLAPI"
FrqPlan="FRQ_PLAN_26MHZ_2PPM_49_152MHZ_300PPB"
MultiCarrRFMode="GL_MULTI_CARR_RF_MODE_L1_L5"
MultiCarrLnaMask="L1_EXT_ON|L5_EXT_ON"
RfType="GL_RF_4776_BRCM"
ExtL5Bias="11.3"
WarmStandbyTimeout1Seconds="10"
WarmStandbyTimeout2Seconds="15"
EnableGnssPropagateInStandby="true"
RfPathLossDb_Ap="3.4"
RfPathLossDb_Cp="3.4"
RfPathLossDb_Ap_L5="4"
RfPathLossDb_Cp_L5="4"
OnChipGpsCarrierType="3,2,3,3,2,3,2,3,3,3,1,2,1,3,2,1,2,3,1,1,1,1,3,3,3,3,3,1,2,3,2,3"
EnableOnChipStopNotification="0"
PowerMode="3"
MinGpsWeekNumber="2216"
OnChipAccMask="50"
EnableB1C="false"
EnableCoex="true"
RTICacheTimeoutSec="3600"
/>
<gll_features
EnableNicAutoSwitch="true"
EnableNavic="true"
/>
</glgps>

View file

@ -31,3 +31,4 @@ SecondaryConfigPath=/data/vendor/gps/overlay/lhd_overlay.conf
SkipSensorWakeLock=true SkipSensorWakeLock=true
LoggerWakeLockEnable=false LoggerWakeLockEnable=false
PpsEnable=true

View file

@ -29,3 +29,4 @@ TrafficLogEnabled=false
SkipSensorWakeLock=true SkipSensorWakeLock=true
LoggerWakeLockEnable=false LoggerWakeLockEnable=false
PpsEnable=true