Merge "gps: refine gps build system" into main

This commit is contained in:
Wayne Lin 2023-10-31 05:35:19 +00:00 committed by Android (Google) Code Review
commit d11bf74374
12 changed files with 261 additions and 16 deletions

View file

@ -189,20 +189,15 @@ PRODUCT_SOONG_NAMESPACES += \
$(call soong_config_set, include_libsitril-gps-wifi, board_without_radio, $(BOARD_WITHOUT_RADIO))
include device/google/gs-common/gps/brcm/device.mk
PRODUCT_COPY_FILES += \
device/google/comet/location/gps.cer:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.cer
ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
PRODUCT_COPY_FILES += \
device/google/comet/location/lhd.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/lhd.conf \
device/google/comet/location/scd.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/scd.conf \
device/google/comet/location/gps.xml:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml
else
PRODUCT_COPY_FILES += \
device/google/comet/location/lhd_user.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/lhd.conf \
device/google/comet/location/scd_user.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/scd.conf \
device/google/comet/location/gps_user.xml:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml
endif
PRODUCT_SOONG_NAMESPACES += device/google/comet/location
SOONG_CONFIG_NAMESPACES += gpssdk
SOONG_CONFIG_gpssdk += gpsconf
SOONG_CONFIG_gpssdk_gpsconf ?= $(TARGET_BUILD_VARIANT)
PRODUCT_PACKAGES += \
gps.cer \
gps.xml \
scd.conf \
lhd.conf
# Display LBE
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += vendor.display.lbe.supported=1

View file

@ -33,10 +33,15 @@ PRODUCT_PROPERTY_OVERRIDES += \
# Override to factory SDK
SOONG_CONFIG_NAMESPACES += gpssdk
SOONG_CONFIG_gpssdk += sdkv1
override SOONG_CONFIG_gpssdk_sdkv1 := true
SOONG_CONFIG_gpssdk_sdkv1 := true
SOONG_CONFIG_NAMESPACES += gpssdk
SOONG_CONFIG_gpssdk += gpsmcuversion
override SOONG_CONFIG_gpssdk_gpsmcuversion := gpsv1_$(TARGET_BUILD_VARIANT)
SOONG_CONFIG_gpssdk_gpsmcuversion := gpsv1_$(TARGET_BUILD_VARIANT)
SOONG_CONFIG_NAMESPACES += gpssdk
SOONG_CONFIG_gpssdk += gpsconf
SOONG_CONFIG_gpssdk_gpsconf := factory
# Factory binary of camera
PRODUCT_PACKAGES += fatp_ct3_wide_hat_tool fatp_ct3_tele_hat_tool fatp_ct3_ultrawide_hat_tool

99
location/Android.bp Normal file
View file

@ -0,0 +1,99 @@
soong_namespace {}
package {
default_applicable_licenses: ["device_google_comet_license"],
}
soong_config_module_type {
name: "gps_prebuilt_etc",
module_type: "prebuilt_etc",
config_namespace: "gpssdk",
variables: [
"gpsconf",
],
properties: [
"src",
],
}
soong_config_string_variable {
name: "gpsconf",
values: [
"userdebug",
"user",
"factory",
],
}
prebuilt_etc {
name: "gps.cer",
src: "gps.cer",
relative_install_path: "gnss",
vendor: true,
}
gps_prebuilt_etc {
name: "gps.xml",
soong_config_variables: {
gpsconf: {
user: {
src: "user/gps.xml",
},
userdebug: {
src: "userdebug/gps.xml",
},
factory: {
src: "factory/gps.xml",
},
conditions_default: {
src: "user/gps.xml",
}
},
},
relative_install_path: "gnss",
vendor: true,
}
gps_prebuilt_etc {
name: "lhd.conf",
soong_config_variables: {
gpsconf: {
user: {
src: "user/lhd.conf",
},
userdebug: {
src: "userdebug/lhd.conf",
},
factory: {
src: "factory/lhd.conf",
},
conditions_default: {
src: "user/lhd.conf",
}
},
},
relative_install_path: "gnss",
vendor: true,
}
gps_prebuilt_etc {
name: "scd.conf",
soong_config_variables: {
gpsconf: {
user: {
src: "user/scd.conf",
},
userdebug: {
src: "userdebug/scd.conf",
},
factory: {
src: "factory/scd.conf",
},
conditions_default: {
src: "user/scd.conf",
}
},
},
relative_install_path: "gnss",
vendor: true,
}

View file

@ -57,9 +57,12 @@
AssertEnabled="false"
CpLppeCancelDbhOnAgnssProvideLoc="true"
CpLppeUseAgnssLocForEmptyDbh="true"
CpLppHighAccuracyShapeMode="2"
ReAidingOnHotStart="false"
ReAidingIntervalSec="1200"
RuntimeSwLteFilterEnable="true"
MaxThreadNum="13"
SensorsMask="0x244"
/>
<gll

104
location/userdebug/gps.xml Normal file
View file

@ -0,0 +1,104 @@
<?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="2"
ReAidingOnHotStart="false"
ReAidingIntervalSec="1200"
RuntimeSwLteFilterEnable="true"
MaxThreadNum="13"
SensorsMask="0x244"
/>
<gll
LogPriMask="LOG_INFO"
LogFacMask="LOG_NMEA | LOG_GLLIOS | LOG_GLLAPI | LOG_MEASAPI"
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"
/>
<gll_features
EnableNicAutoSwitch="true"
EnableNavic="true"
/>
</glgps>

View file

@ -0,0 +1,33 @@
LheName=bbd
LheRsmResetTimeoutMS=10000
GpioNStdbyPath=/sys/devices/platform/111e0000.spi/spi_master/spi21/spi21.0/nstandby
LhePatch=/vendor/firmware/SensorHub.patch
Lhe477xDebugFlags=RPC:FACILITY=65535-dKP+CUST+LHE:STDOUT_PUTS:STDOUT_LOG
LheConsole=/data/vendor/gps/LheConsole
LogEnabled=true
Log=JAVA
LogDirectory=/sdcard/gps/broadcom/storage
LheBbdPacket=/dev/ttyBCM
LheBbdControl=/dev/bbd_control
# LheBbdSensor=/dev/bbd_sensor
LheFailSafe=/data/vendor/gps/logs/esw-crash-dump.txt
LogLevel=*:I
NvStorageDir=/data/vendor/gps/
# Enable BBD debugging at these stages:
# LheDriverDebugFlags=PATCH_BBD:LHE_BBD:FSC_BBD
LheAutoBaudDelayMS=10
TrafficLogEnabled=false
SecondaryConfigPath=/data/vendor/gps/overlay/lhd_overlay.conf
SkipSensorWakeLock=true
LoggerWakeLockEnable=false

View file

@ -0,0 +1,6 @@
LogEnabled=true
Log=JAVA
LogDirectory=/sdcard/gps/broadcom/storage
NvStorageDir=/data/vendor/gps/
TcpConnectionTimeout=20
SecondaryConfigPath=/data/vendor/gps/overlay/scd_overlay.conf