Android7.1 transplant GPS Ublox HAL

  • Ublox find the driver package.

    Internet looking for a long time did not find, behind just the Internet search a 3.1 version.
    Into the Android source hardware directory

  • Add files in the Android board-level file which adds GPS driver.

    Mainly the following two files
    device / rockchip / common / BoardConfig.mk

    310 BOARD_HAS_GPS ?= true
    311 BOARD_GPS_TYPE ?= ublox
    

    device/rockchip/rk3288/system.prop

    persist.sys.gpsTTY=/dev/ttyS1
    
  • Ublox modify configuration files.

    hardware/u-blox/gps/u-blox.conf

    39 SERIAL_DEVICE                    /dev/ttyS1
    
  • Compile ublox

    cd hardware/u-blox/gps/
    mm -B
    

    The Android version of which, directly translated a small error, similar to the DATA value can not be found, the two have the wrong line commented out just fine.
    Roughly hardware / u-blox / gps / supl / suplSMmanager.cpp this file
    after the compilation is complete, copy the files

    cp out/target/product/rk3288/obj/lib/gps.default.so out/target/product/rk3288/system/lib/hw/ -rf
    cp hardware/u-blox/gps/gps.conf  out/target/product/rk3288/system/etc/ -rf
    cp hardware/u-blox/gps/u-blox.conf  out/target/product/rk3288/system/etc/ -rf
    

    Then recompile Android
    burn a new system, install u-center

Guess you like

Origin www.cnblogs.com/chenfulin5/p/12580356.html