rockchip rk3368(px5) vehicle development road 5, enabling GPS module UC6226 (2.HAL layer and above)

This series records the author's journey to a new car aftermarket company, which is responsible for maintaining a set of codes from the beginning. The system uses RSM's rk3368 chip, version is px5 Android 8.0 release 20180726, and every patch modification and thinking from scratch. The key point is that the driver is related to the system. Due to the company's confidentiality, the APP does not post too much code for the time being, but records system bug s.

2020_02_14
After the adb shell, ps found that there was no android.hardware.gnss@1.0-service process. And there is no gps.default.so Library in / vendor/lib/hw, indicating that the system is not debugging for GPS. ok, do it by yourself.
1. Find the hal library provided by the third party's 6226, and it will be compiled into GPS. $(target \board \\\\\\\\\\.
2. Due to the introduction of binder HAL mechanism, you need to add permissions in manifest.xml. Otherwise, the corresponding process cannot be started
3. After modification, the satellite can be opened and searched through zdevicetest.
Amend to read:
1.ttyS0 related permission issues

HEAD detached at refs/heads/master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   init.connectivity.rc
        modified:   ueventd.rockchip.rc

no changes added to commit (use "git add" and/or "git commit -a")
kelland@kelland-System-Product-Name:~/bankup/PX5/origin_code/px5-sync/device/rockchip/common$ git diff .
diff --git a/init.connectivity.rc b/init.connectivity.rc
index 8a25877..576c762 100755
--- a/init.connectivity.rc
+++ b/init.connectivity.rc
@@ -19,7 +19,6 @@ on boot
     chown bluetooth net_bt_stack /data/misc/bluetooth
     setprop ro.bt.bdaddr_path "/data/misc/bluetooth/bdaddr"

-    chmod 0660 /dev/ttyS0
     chmod 0660 /dev/ttyS1
     chmod 0660 /dev/vflash
     chmod 0664 /dev/vendor_storage
diff --git a/ueventd.rockchip.rc b/ueventd.rockchip.rc
index 54dc6e9..4663aaf 100755
--- a/ueventd.rockchip.rc
+++ b/ueventd.rockchip.rc
@@ -51,10 +51,10 @@
 # for GPS
 #/dev/ttyS3                0600   gps        gps
 /dev/gps                  0660   gps        gps
+/dev/ttyS0                0660   gps        gps

 # for BT
 /dev/vflash               0660   bluetooth  net_bt_stack
-/dev/ttyS0                0660   bluetooth  net_bt_stack
 /dev/ttyS1                0660   bluetooth  net_bt_stack
 #/dev/ttyS2                0660   bluetooth  net_bt_stack
 /dev/rtk_btusb            0660   bluetooth  net_bt_stack

2.gnss permission support and participate in compilation

device/rockchip/px5/device.mk
diff --git a/device.mk b/device.mk
index d9a0218..f2831af 100644
--- a/device.mk
+++ b/device.mk
@@ -19,6 +19,11 @@ PRODUCT_PACKAGES += \
     WallpaperPicker \
     Launcher3

+PRODUCT_PACKAGES += \
+    android.hardware.gnss@1.0-impl \
+    android.hardware.gnss@1.0-service \
+    gps.$(TARGET_BOARD_HARDWARE)
+
 #$_rbox_$_modify_$_zhengyang: add displayd
 PRODUCT_PACKAGES += \
     displayd \
diff --git a/manifest.xml b/manifest.xml
index 5b58219..937cecd 100755
--- a/manifest.xml
+++ b/manifest.xml
@@ -184,6 +184,15 @@
             <instance>default</instance>
         </interface>
     </hal>
+    <hal format="hidl">
+        <name>android.hardware.gnss</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>IGnss</name>
+            <instance>default</instance>
+        </interface>
+    </hal>

3.hardware/rockchip/gps/
This directory is GPS related hal layer code, which will be compiled into gps.rk30board.so, and then copied to vendor/lib64/hw /. As it is a third-party code, there is no paste here. This code modifies the serial port node path

What needs to be improved later is the power control related to GPS. It is necessary to read the code of gps hal layer (at present, the GPS module spits out data as the system starts)

18 original articles published, 3 praised, 10000 visitors+
Private letter follow

Tags: git Android xml shell

Posted on Fri, 14 Feb 2020 01:56:20 -0500 by Steven_belfast