diff --git a/device.mk b/device.mk index 3709c5a1..958e82d9 100644 --- a/device.mk +++ b/device.mk @@ -758,29 +758,8 @@ PRODUCT_PACKAGES += \ libopenvx-opencl endif -GPS_CHIPSET := 47765 - -PRODUCT_COPY_FILES += \ - frameworks/native/data/etc/android.hardware.location.gps.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.location.gps.xml \ - device/google/gs101/gnss/${GPS_CHIPSET}/config/gps.xml:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml \ - device/google/gs101/gnss/${GPS_CHIPSET}/config/lhd.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/lhd.conf \ - device/google/gs101/gnss/${GPS_CHIPSET}/config/scd.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/scd.conf \ - device/google/gs101/gnss/${GPS_CHIPSET}/config/gps.cer:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.cer \ - device/google/gs101/gnss/${GPS_CHIPSET}/firmware/SensorHub.patch:$(TARGET_COPY_OUT_VENDOR)/firmware/SensorHub.patch - -PRODUCT_SOONG_NAMESPACES += \ - device/google/gs101/gnss/$(GPS_CHIPSET) - -PRODUCT_PACKAGES += \ - android.hardware.gnss@2.1-impl-google \ - gps.default \ - flp.default \ - gpsd \ - lhd \ - scd \ - android.hardware.gnss@2.1-service-brcm -PRODUCT_PACKAGES_DEBUG += \ - init.gps_log.rc +# GPS HAL +include device/google/gs101/gnss/device-gnss.mk # Trusty (KM, GK, Storage) $(call inherit-product, system/core/trusty/trusty-storage.mk) diff --git a/gnss/47765/config/gps.xml b/gnss/47765/config/gps.xml index 868c0e74..03aaae9f 100644 --- a/gnss/47765/config/gps.xml +++ b/gnss/47765/config/gps.xml @@ -1,13 +1,13 @@ - + + + + + + + + + diff --git a/gnss/47765/config/gps.xml.raven b/gnss/47765/config/gps.xml.raven new file mode 100644 index 00000000..3a37ec01 --- /dev/null +++ b/gnss/47765/config/gps.xml.raven @@ -0,0 +1,92 @@ + + + + + + + + + + diff --git a/gnss/47765/config/gps2.xml b/gnss/47765/config/gps2.xml new file mode 100644 index 00000000..6ad0e653 --- /dev/null +++ b/gnss/47765/config/gps2.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/gnss/47765/config/lhd.conf b/gnss/47765/config/lhd.conf index bd13ca15..a24ed136 100644 --- a/gnss/47765/config/lhd.conf +++ b/gnss/47765/config/lhd.conf @@ -5,9 +5,9 @@ GpioNStdbyPath=/sys/devices/platform/10940000.spi/spi_master/spi5/spi5.0/nstandb LhePatch=/vendor/firmware/SensorHub.patch Lhe477xDebugFlags=RPC:FACILITY=65535-dKP+CUST+LHE:STDOUT_PUTS:STDOUT_LOG -LheConsole=/data/vendor/gps/LheConsole +# LheConsole=/data/vendor/gps/LheConsole -LogEnabled=true +LogEnabled=false Log=JAVA LogDirectory=/sdcard/gps/broadcom/storage @@ -17,7 +17,7 @@ LheBbdControl=/dev/bbd_control # LheBbdSensor=/dev/bbd_sensor -LheFailSafe=/data/vendor/gps/esw-crash-dump.txt +# LheFailSafe=/data/vendor/gps/esw-crash-dump.txt NvStorageDir=/data/vendor/gps/ @@ -26,3 +26,5 @@ NvStorageDir=/data/vendor/gps/ LheAutoBaudDelayMS=10 TrafficLogEnabled=false +SecondaryConfigPath=/vendor/etc/gnss/lhd2.conf + diff --git a/gnss/47765/config/lhd2.conf b/gnss/47765/config/lhd2.conf new file mode 100644 index 00000000..c075cb7e --- /dev/null +++ b/gnss/47765/config/lhd2.conf @@ -0,0 +1,5 @@ +LheConsole=/data/vendor/gps/LheConsole +LogEnabled=true +Log=JAVA +LheFailSafe=/data/vendor/gps/esw-crash-dump.txt + diff --git a/gnss/47765/config/scd.conf b/gnss/47765/config/scd.conf index f6305c38..b7c9b754 100644 --- a/gnss/47765/config/scd.conf +++ b/gnss/47765/config/scd.conf @@ -1,5 +1,6 @@ -LogEnabled=true +LogEnabled=false Log=JAVA LogDirectory=/sdcard/gps/broadcom/storage NvStorageDir=/data/vendor/gps/ TcpConnectionTimeout=20 +SecondaryConfigPath=/vendor/etc/gnss/scd2.conf diff --git a/gnss/47765/config/scd2.conf b/gnss/47765/config/scd2.conf new file mode 100644 index 00000000..65e6ffba --- /dev/null +++ b/gnss/47765/config/scd2.conf @@ -0,0 +1,2 @@ +LogEnabled=true +Log=JAVA diff --git a/gnss/device-gnss.mk b/gnss/device-gnss.mk new file mode 100644 index 00000000..18965d75 --- /dev/null +++ b/gnss/device-gnss.mk @@ -0,0 +1,37 @@ +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.hardware.location.gps.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.location.gps.xml \ + device/google/gs101/gnss/47765/config/lhd.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/lhd.conf \ + device/google/gs101/gnss/47765/config/scd.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/scd.conf \ + device/google/gs101/gnss/47765/config/gps.cer:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.cer \ + device/google/gs101/gnss/47765/firmware/SensorHub.patch:$(TARGET_COPY_OUT_VENDOR)/firmware/SensorHub.patch + +ifneq (,$(filter raven, $(TARGET_PRODUCT))) +PRODUCT_COPY_FILES += device/google/gs101/gnss/47765/config/gps.xml.raven:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml +else ifneq (,$(filter oriole, $(TARGET_PRODUCT))) +PRODUCT_COPY_FILES += device/google/gs101/gnss/47765/config/gps.xml.oriole:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml +else +PRODUCT_COPY_FILES += device/google/gs101/gnss/47765/config/gps.xml:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml +endif + +ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) +# userdebug specific +PRODUCT_COPY_FILES += \ + device/google/gs101/gnss/47765/config/lhd2.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/lhd2.conf \ + device/google/gs101/gnss/47765/config/scd2.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/scd2.conf \ + device/google/gs101/gnss/47765/config/gps2.xml:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps2.xml +endif + +PRODUCT_SOONG_NAMESPACES += \ + device/google/gs101/gnss/47765 + +PRODUCT_PACKAGES += \ + android.hardware.gnss@2.1-impl-google \ + gps.default \ + flp.default \ + gpsd \ + lhd \ + scd \ + android.hardware.gnss@2.1-service-brcm + +PRODUCT_PACKAGES_DEBUG += \ + init.gps_log.rc