Integration Steps in Android for 4750/4751

Overview

For 47511 or 4752 GPS chip please consult the Android separate documentation

For 4750/4751 GPS chip this section will

  • Provide some assistance to integrate Broadcom 4750/4751 GPS chip to customer's Android platforms (may apply to other chip versions)
  • Serve as a step-by-step tutorial on integration process for non-Unix and non-Android users/programmers (please note that the exact steps may change due to rapidly changing and growing Android interface system in Broadcom)

In this document, we will assume that the company's name in low case is "xyz" and the project name is "Proj" for the sake of brevity. For Android-specific information, please refer to Android Software Package for 4750/4751 page.

Self (customer) Test for GPS Standalone

  • [For AE] Ask these questions to the customer to ensure that the evaluation device/board is ready for GPS standalone.
    • Is ADB is stable enough?
    • What's the UART device path? Is the UART serial port accessible via normal Unix API?
    • What's the GPIO for nStandby and nReset pins? Is is possible to "echo '1' >" to the port and get the GPIO signal high?
    • Has the UART's flow control feature been tested?
  • These questions should be all answered yes before going into GPS Standalone porting process.

[Optional] Cross-compiler Binary Testing

  • Usually, you don't have to check this compatibility because Android SDK comes with cross compiler.
  • If you can obtain a glgps_app binary for Android, please proceed with this early binary compliance testing. If you don't pass this test, it means it will require an extra effort to build the cross compiler or modify the CFLAG setting.
  • If you cannot perform "adb" command
    • Install Android SDK to your system (http://developer.android.com/sdk/index.html).
    • For Windows: The "adb.exe" executable file will be placed under <your_path>/android-sdk-windows/tools/ directory.
    • Make sure that your customer has their ADB USB driver and install the driver to your system.
  • If you cannot obtain a glgps_app binary, we cannot test this compatibility and please proceed with the next major section (currently it's Initial Bass Box Testing).
          > adb shell
          # mkdir /data/gps_test
          # mkdir /data/gps_test/log
          # exit
    
          ## Extract the GPS binary package and locate the files glgps_xyzProjandroid and gpsconfig.xml.
          ## Update gpsconfig.xml per 4750/4751 HAL settings \ref subsec475x.
          > adb push glgps_xyzProjandroid /data/gps_test
          > adb push gpsconfig.xml /data/gps_test
          > adb chmod 777 /data/gps_test/glgps_xyzProjandroid
    
          > adb shell
          ## Periodic is the job name, which is case sensitive.
          # /data/gps_test/glgps_xyzProjandroid /data/gps_test/gpsconfig.xml Periodic
    
  • [Note] Please note that you may change "/data/gps_test" path to your favored directory later (ex. /system/gps/) and this root path must match what's written in gpsconfig.xml and init.rc we will change later. For current binary compatibility testing, you might not have to concern these issues. Usually, /data directory is NVRAM part where 3rd party can access freely. "Period" is a test mode of periodic position fixes. See GL XML Config file description for details about how to run other jobs.
  • [Note] Please note that this is binary testing so we are not expecting a valid fix from this result. Just getting any GLLOG would be good enough for this section.
  • Getting the log can be done like following
          > adb pull /data/gps/log/. .
    
  • If you get any type of log, then this means there is binary compatibility.

BRCM 4750 and 4751

  • For binary compatibility testing with BCM4750 and BCM4751, please proceed in this subsection.
  • Use the following code in the XML hal configuration for BCM4750/4751, note that your TCXO may have a different frequency that 16.8Mhz. The conf file we used is "gpsconfig.xml" in the previous code example.
            FrqPlan="FRQ_PLAN_16_8MHZ_2PPM"   // 16.8MHz TCXO without modem
            RfType="GL_RF_BARRACUDA_EXT_LNA"  // 4750 with external LNA 
    
  • This is a sample XML gll configuration for BCM4751.
             FrqPlan="FRQ_PLAN_26MHZ_2PPM_26MHZ_300PPB"  // 26MHz TCXO with modem's CNTIN support
             RfType="GL_RF_4751_DANUBE"                  // 4751 without external LNA 
    
    You may want to apply different TCXO frequency, apply modem/modemless setting, different BCM4750/4751 setting and with/without external LNA to your hardware. Please read GL XML Config file description for more information and ask your local (F)AE about the correct FrqPlan and RfType setting. Incorrect setting may lead to cut off of GPS signal.

Sample XML Config File

  • XML configuration will change and evolve as we progress forward, however this is the recommended configuration setting to kickstart the first standalone setting. Note that this sample configuration is configured for BCM4751.
    <?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 Confguration: Please make sure to split the hal configuration when it's bigger than 1K bytes. -->
        <hal 
            acPortName="/dev/tty<your_device>" 
            lBaudRate="115200"  
            cLogEnabled="true" 
            acLogDirectory="/data/gps/log" 
            ltoFileName="lto.dat" 
            enhanced-assisted="false" 
            cp-enhanced-assisted="true" 
            TISEnabled="false" 
            RILEnabled="false" 
            arp-supl-enable="false" 
            arp-supl-cap-msb="true" 
            arp-supl-cap-msa="true" 
            arp-supl-cap-ecid="false"
            acSuplServer="glsupltls.glpals.com" 
            SuplPort="7275"
            LbsEnable="false" 
            LbsLocal="true" 
            LbsServer="bcmls.glpals.com" 
            LbsPort="7275" 
            LbsSyncTimeSec = "60" 
            LbsSyncLto="true" 
            LbsSyncCells="true"
        />
        <hal 
            acNtpServer="10.21.116.63" 
            acUtc2GpsOff="13"
            AsicIP="127.0.0.1" 
            AsicPort="2375"
            acNmeaOutName="/data/gpspipe"  
            ResetOnStart="false"
            gpioDelayMs="80"
            ctrlPipe="/data/gps/glgpsctrl"
            lcsApiSockName="/data/lcs.socket" 
            acNvStoDir="/data/gps/"
        />
    
        <gll 
            LogPriMask="LOG_DEBUG"
            LogFacMask="LOG_GLLAPI | LOG_NMEA | LOG_RAWDATA"
            FrqPlan="FRQ_PLAN_26MHZ_2PPM_26MHZ_300PPB"   
            RfType="GL_RF_4751_DANUBE"   
        />
    
        <job id="Periodic">
            <task >
                <req_pos/>
            </task>
        </job>
    
    </glgps>
    
    In this configuration, ensure that directories /data, /data/gps and /data/gps/log are all writable. Also ensure that acPortName in gpsconfig.xml is set to the actual UART serial device in the Linux system. For more information on how to configure hal and gll section of the XML, please refer to GL XML Config file description page.

Initial Bass Box Testing

  • Sometimes we call the Bass box (BCM4750) as "Evaluation board" (EV). Note that the BCM4751 EV is called Piranha or Thames. For more information on Bass board, please read How to connect evaluation board to your platform HW.
  • Since your initial stage will work with a Bass box, make sure that the target box is stable enough. Usually we test the Bass box with Windows GPS SDK. Please ask your (F)AE about the latest Windows GPS SDK available from docSafe of Customer Support website.
  • Make sure that USB-only test works well with Bass. Please acquire several valid GPS fixes from Windows GPS SDK solution.
  • [Optional] Make sure that Serial-only and USB-powered test works well with Bass in Windows SDK.
  • Make sure to change to the external antenna setting when testing in indoor.

Initial Kickstart with the Customer if you are a Broadcom (F)AE.

  • Create two Makefiles in a customer directory such as
          //depot/client/core/rel/v16/customers/xyz/Makefile.xyzProjandroid
          //depot/client/core/rel/v16/customers/xyz/Makefile.Proj
    
  • You might want to copy these files from the same set of files from the same customer's folder.
  • If your customer do not already have any files like these, please refer to Appendix A. Setting up Broadcom GPS daemon compile environment from customer's side for examples.
  • Please, make sure that the one does not directly compile GLL and GLNET in Makefile.Proj. For example, this is a sample file which does not build GLL and GLNET.
        export CUST=xyz
        export PLATF=Projandroid
        TARGET = $(CUST)$(PLATF)
        SOURCE_TOPDIR=../../
        DELIVERABLES_DIR=$(SOURCE_TOPDIR)/allPartners/deliverables
        PROPRIETARY_DIR=$(SOURCE_TOPDIR)/proprietary/deliverables
        GLCT_DIR=$(DELIVERABLES_DIR)/glct
        GLGPS_DIR=$(DELIVERABLES_DIR)/glgpsapp
        GLHAL_DIR=$(DELIVERABLES_DIR)/glhal
        GLL_DIR=$(PROPRIETARY_DIR)/gll_dev
        GLNET_DIR=$(PROPRIETARY_DIR)/glnet_dev
        GLLBS_DIR=$(PROPRIETARY_DIR)/gllbs_dev
        all:
        #   $(MAKE) -C $(GLL_DIR)/project/make all
        #   $(MAKE) -C $(GLNET_DIR)/project/make all
            $(MAKE) -C $(GLLBS_DIR)/project/make all
            $(MAKE) -C $(GLCT_DIR)/project all
            $(MAKE) -C $(GLHAL_DIR)/unix all
            $(MAKE) -C $(GLGPS_DIR)/unix all
        clean:
            $(MAKE) -C $(GLGPS_DIR)/unix clean
            $(MAKE) -C $(GLHAL_DIR)/unix clean 
            $(MAKE) -C $(GLCT_DIR)/project clean 
            $(MAKE) -C $(GLLBS_DIR)/project/make clean
        #   $(MAKE) -C $(GLNET_DIR)/project/make clean 
        #   $(MAKE) -C $(GLL_DIR)/project/make clean
    
  • After this, an AE should explicitly ask the Broadcom SDK Release Engineer to include these makefiles to release service.
  • After acquiring a proper Android GPS SDK from the Release Engineer, proceed to the next steps.
  • Copy GLL and GLNET static library to your local build directories. For example, these are Windows commands to copy.
        copy $(SDK_DIR)\customers\xyz\gll_distr\lib\libgll_xyzProjandroid.a $(WORKSPACE)\customers\xyz\gll_distr\lib
        copy $(SDK_DIR)\customers\xyz\glnet_distr\lib\libglnet_xyzProjandroid.a $(WORKSPACE)\customers\xyz\glnet_distr\lib
        copy $(SDK_DIR)\customers\xyz\gll_distr\lib\libgll_xyzProjandroid.a $(WORKSPACE)\customers\xyz\\build_out\target\product\generic\obj\STATIC_LIBRARIES\libgll_intermediates\libgll.a
        copy $(SDK_DIR)\customers\xyz\glnet_distr\lib\libglnet_xyzProjandroid.a $(WORKSPACE)\customers\xyz\\build_out\target\product\generic\obj\STATIC_LIBRARIES\libglnet_intermediates\libglnet.a
    
  • This ensures that the building time will be faster and properly providing to the customers. Usually you won't get a good support from a customer/AE built GLL engine, so please make sure that your customer is using a proper GLL engine created by the Broadcom SDK Release engineer.
  • If you are a Broadcom GPS AE:
    • Ask the Release Engineer to build the given binary.
    • After receiving the proper SDK package from the Release Engineer you can distribute the package to the customer. The package includes the manual, binary, the code files from allPartners, and etc.
    • Use docSafe to release the software SDK.
    • Theoretically, you can rely on Release Engineer's released SDK instead of building the daemon by yourself. However, it is strongly adviced to have your own daemon compile Linux environment set up to your system. If you want to have your local Linux Android development environment, please proceed with following.
    • If you want to compile Broadcom GPS Android solution from your local Linux machine, try these.
      • First get an Android git repository.
                    # mkdir $your_Android_path
                    # cd $your_Android_path
                    # repo init -u git://android.git.kernel.org/platform/manifest.git -b android-2.1_r2
                    # repo sync
        
      • Then get the latest P4 release and compile like this.
                    # cd $(WORKSPACE)/customers/xyz
                    # make -f Makefile.Proj SHOW_COMMANDS=yes
        
  • This will build a customer-specific Android GPS daemon in your local system.
  • If you are a customer: Ask the Broadcom GPS AE to setup build environment in your Android system after receiving the SDK package, or you can setup the environment by following the steps in Appendix A. Setting up Broadcom GPS daemon compile environment from customer's side.
  • Provide "$(SDK_DIR)/hardware/broadcom/gps/Android/gps_jni" to the customer
  • For Android Gingerbread (2.3.x) and later, edit the Android.mk and add the following:
          LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
    
  • Also, modify the LOCAL_MODULE_TAGS to 'eng', to ensure the binary is built:
          LOCAL_MODULE_TAGS := eng
    
  • Or, you can compile the middleware with the following command:
          > make -C /usr/local/cross/android ONE_SHOT_MAKEFILE="<your_path>/allPartners/deliverables/middleware_connectors/unix/Android/gps_jni/Android.mk"
    
  • The daemon binary should be in /bin directory.
  • Make sure that we know the device path for UART serial communication.
  • Test the binary with following command
          > glgps_xyzProjandroid <config_name>.xml <job_name>
    
    For more information on how to setup and fine tune your job read GL XML Config file description.
  • Daemonize our binary in Linux shell environment
          > glgps_xyzProjandroid -d <config_name>.xml -p <pid_file_name>
    
  • Daemonize our binary in Android init.rc file. The init.rc is typically located in the root directory of the Android system. You might want to ask your customer to edit $ANDROID_HOME/system/core/rootdir/init.rc directly. After the successfull Android image make, the image will contain the edited init.rc file. Note in the example below the service has root permissions. Before finalizing the permissions should be changed to non-root.
          service glgps /system/bin/gpsd/glgps_xyzProjandroid -c gpsconfig.xml
            user root
            group root
    
    Since we are calling our GPS engine via Android service, we need to reboot the Android device completely whenever we update the new daemon to the device. Note that we should use "-c" option because init.rc doesn't like our separate daemonizing effort. Also note that Android doesn't use "-p" option since it's not using "-d" daemon option.
  • Build the GPS daemon binary. Please refer to Appendix A. Setting up Broadcom GPS daemon compile environment from customer's side for more information.
    • The build configuration is located in /customers/xyz/Makefile.xyzProjandroid.
    • Make sure to use CONFIG_HAL_NO_GPIO and disable CONFIG_HAL_GPIO_SYSFS
    • Compile with CONFIG_HAL_LOG_ANDROID commented out. This will enable log saving to our designated log folder. (ex. "#CONFIG_HAL_LOG_ANDROID=yes")
    • If you are a Broadcom AE: Do not distribute our /proprietary code part and other customer's copyrighted code part. Make sure all the non-Android code we distribute has the right BRCM copyright header.

Hardware Development-Stage Connection

  • Make hardware connection with the Bass and the device by this setting.
        [The device] <- UART -> [Level converter board (LT v8.0)] <- RS232 -> [4751 Bass Box]
    
  • Build the serial_test from /glhal/unix/serialTest and definitely make sure that UART serial communication is working. Sometimes, Linux kernel version will let some talk or some don't talk. So look at how the mainline is doing and serial.c is doing. There is some difference between those two.
  • Difference between 4750 and 4751: Unlike 4750, 4751 goes to deep sleep mode if it was idling for more than 1 minute. Otherwise, REGPU pin should be high. Therefore, you might want to test the chip within 1 minute of power up or want to use paper clip to reset the chip. Also the different gll XML conf parameters are used.

Troubleshooting

  • If the log shows outgoing packets from AP but the scope shows no physical signals, then it may mean that tty serial port was given at the wrong position. Double check the serial port path.
  • If the log and the physical signals are going to the chip and chip is not talking back, it could mean that CTS/RTS are not connected correctly. For UART, the four lines must be connected to the chip. For example, one might expect grounding CTS/RTS should work well, but it will not work.
  • If there is MEIF_GARBAGE problem or some other problems, it could mean that serial port initiation has been changed due to Linux kernel's driver update. Ask the expert AE about what's causing the garbage serial communication.
  • The initial starting procedures of 4750 and 4751 are different. Try the other Bass box when the one isn't working well.

Standalone with Bass box

  • When UART serial communication is done, the standalone mode should work well.
  • When you can get a decent report from the GLLOG or NMEA string from ADB shell like this,
          # cat /cache/nmea
    
    it proves that you implemented this Standalone correctly. Search for "PGLOR,NET" NMEA string from the /cache/nmea port or GLLOG. This proves that steps above this section went fine.
    • If somehow things are not working well, expose the device to open-sky or connect the GPS RF input to simulator output. After about 5 mintues, stop the test by IRM command described in Standalone with Bass box.
    • If you are still having an error from this stage without proper "PGLOR,NET" string, please report this error to (F)AE.
  • If you are a customer: At this stage, it is recommended that there is a separate Android GPS test application to test (or factory test) various modes of our GPS solution.
  • Make sure that JNI socket path is same from middleware_connectors and XML's path.
  • Make sure to remove makefile definition about SUPL and LBS. Please refer to Android Software Package for 4750/4751 for more information.
  • If you want to quit the GPS session gracefully, try this.
          # echo '$pglirm,stop,all' > /cache/glgpsctrl
    
    Please refer to Interactive Request Manager (IRM) Commands for more information.
  • [Troubleshoot] Should you provided the SUPL Android patch before the Standalone integration, do this.
    • Make sure that set_id acquisition checks NULL return value, if the customer didn't implement set_id java function.

Standalone with 4750/4751 integrated board

  • By this time, the customer might have successfully integrated our 4750/4751 chips to their PCB board.
  • The big difference between this setting and Hardware Development-Stage Connection is that in this stage GPIO signals must work correctly.
  • An AE should enable this by disabling NO_GPIO and enabling GPIO_SYSFS like this in the Makefile.xyzProjandroid file.
        CONFIG_HAL_GPIO_SYSFS=yes
        #CONFIG_HAL_NO_GPIO=yes
    
  • After enabling GPIO, our daemon will try to access UNIX path of GPIO ports which are defined in the XML configuration.
  • Ask the customer to expose GPIO ports like these, so that XML configuration can simply use those ports.
        gpioNStdbyPath="<your_path>/nstandby"
        gpioNResetPath="<your_path>/nreset"
    
  • Ask the customer to set RESET signal high all the time. (even the default value should be high from the start) The full control of RESET signal should be on customer's side and should be maintained high all the time when they want to take full advantage of the warm start setting. Please be careful about active high or active low settings of your customer's GPIO in order to control them correctly. Double checking them with an oscilloscope is a good idea.
  • You can make sure that customer system's GPIO is working by ADB like this.
        # cd sys/devices/platform/<your_customer's_gpio>
        # cat nreset
        0
        # echo 1 > nreset
        # cat nreset
        1
    

SUPL SI Integration

  • Set Initiated (SI): This tests making a SUPL request from the device itself.
  • The Android device is ready for SUPL SI when
    • Make sure that GPS Standalone is stable enough. (Self (customer) Test for GPS Standalone)
    • The display is stable enough (so that we can change Android settings).
    • We can have a call and receive a call with a public telephone network.
    • We can web browse internet with the device.
    • Time set should be kept and not reset with reboot. (Otherwise, we will get TLS certificate failure)
  • Above infra features should be tested before we port SUPL feature to the Android device. [For AE] Stress the importance of these infra features to the customer, these should be working well in order for our SUPL to work well.
  • [BCM->CUS] Supply the Android framework patch to customer. (Not needed for Android Gingerbread (2.3) or later)
    • [For AE] The patch is available from //depot/import/android/eclair2.1_r2/rel/brcm/ P4 directory. If the patch is for frameworks/base let's say, go to that folder and execute "git am":
                > cd $ANDROID_HOME/frameworks/base
                > git am /my/path/to/my/patch/*patch
      
    • The java side patch will enable SUPL. You don't need this patch to get the standalone result.
    • Provide those patch files to the customer when they are ready for SUPL.
  • [CUS] The customer should comment out following code in $ANDROID_HOME/packages/apps/Settings/res/xml/security_settings.xml
                      <CheckBoxPreference 
                          android:key="location_gps" 
                          android:title="@string/location_gps"
                          android:summaryOn="@string/location_street_level"
                          android:summaryOff="@string/location_gps_disabled"/>
              
                      <CheckBoxPreference
                          android:key="assisted_gps"
                          android:title="@string/assisted_gps"
                          android:summaryOn="@string/assisted_gps_enabled"
                          android:summaryOff="@string/assisted_gps_disabled"/>
              
                  </PreferenceCategory>
              
              </PreferenceScreen>
    
    • This enables SUPL SI MSB in Android setting "Location & security" screen.
      android_agps_set.png
  • [For AE] Sample GPS C/Java applications are in //depot/import/android/utils/.

SUPL NI integration.

  • Network Initiated (NI): This tests making a SUPL request from somewhere remote and trying to find the location of the device (SET).
  • On top of the infra requirements from SUPL SI, SUPL NI needs SMS texting to work. (SUPL SI Integration)
  • We can test SUPL NI via actually using the webpage from glpals.
  • However, this sometimes may not work well due to several issues (AT&T does not allow SUPL NI packet to pass through)
  • On that case, you can use our test_client.c
          allPartners/deliverables/middleware_connectors/unix/lcsapi/test_client/test_client.c
    

TCXO Calibration

Finalizing

Appendix A. Setting up Broadcom GPS daemon compile environment from customer's side

  • Your xyz company might want to tweak the open-source code surrounding the Broadcom GLL engine. Then these are the steps they should take to build Broadcom GPS solution by themselves.
  • If you are an AE, you don't have to follow this and simply compile from /customer/xyz directory as explained in Initial Kickstart with the Customer if you are a Broadcom (F)AE..
  • Get the file Makefile.xyzProjandroid in /customers/xyz folder in the unzipped SDK folder.
  • For example, this is a sample Makefile.
        TARGET_ARCH_VARIANT:=armv7-a
        SHOW_COMMANDS:=y
        CONFIG_HAL_SERIAL_TYPE=UART
        CONFIG_HAL_SERIAL_DEV=/dev/ttyS0
        CONFIG_HAL_CMD=yes
        CONFIG_HAL_CMD_FILE=/cache/glgpsctrl
        CONFIG_HAL_LTO=yes
        CONFIG_HAL_LTO_DIR=/data/gps/
        CONFIG_HAL_LTO_FILE=lto.dat
        CONFIG_HAL_NMEA_PIPE=yes
        CONFIG_HAL_NMEA_FILE=/cache/gpspipe
        CONFIG_HAL_NV=yes
        CONFIG_HAL_NV_DIR=/data/gps/
        CONFIG_HAL_NV_FILE=gldata.sto
        CONFIG_HAL_RRC=no
        CONFIG_HAL_GPIO_SYSFS=yes
        CONFIG_HAL_CATCH_SIGNALS=yes
        CONFIG_HAL_EE_DIR=./gps/
        CONFIG_HAL_EE_FILE=cbee.cbee
        CONFIG_HAL_LCS_API=yes
        #CONFIG_HAL_LOG_ANDROID=yes
        CONFIG_HAL_TIME_MONOTONIC=yes
        
        CONFIG_HAL_SUPL=true
        ENABLE_TLS=yes
    
  • Note that SHOW_COMMANDS:=y will printout compile commands during daemon compilation.
  • Name/rename it buildspec.mk and put it in the Android root directory. Don't forget to remove the OUT_DIR and ANDROIDPATH vars in buildspec.mk file.
  • Copy vendor/broadcom/gps/allPartners folder to $ANDROID_HOME/vendor/broadcom/gps *OR* $ANDROID_HOME/hardware/broadcom/gps. If the directories do not exist, create them.
  • Create following Android.mk file in $ANDROID_HOME/prebuilt/android-arm/gps/
        LOCAL_PATH := $(call my-dir)
        include $(CLEAR_VARS)
        
        LOCAL_SRC_FILES := libgll.a
        LOCAL_MODULE := libgll 
        LOCAL_MODULE_CLASS := STATIC_LIBRARIES 
        LOCAL_MODULE_TAGS := user 
        LOCAL_MODULE_SUFFIX := .a
        include $(BUILD_PREBUILT)
        include $(CLEAR_VARS)
        LOCAL_SRC_FILES := libglnet.a
        LOCAL_MODULE := libglnet 
        LOCAL_MODULE_CLASS := STATIC_LIBRARIES 
        LOCAL_MODULE_TAGS := user 
        LOCAL_MODULE_SUFFIX := .a
        include $(BUILD_PREBUILT)
    
  • Copy libgll.a and libglnet.a on prebuilt/android-arm/gps/ too
  • [Optional] If you already provided middleware_connectors directory to the customer and they succeeded with compilation, remove or disable Android.mk by renaming like Android.mk___. This Android.mk file should be in "/allPartners/deliverables/middleware_connectors/unix/Android/gps_jni".
  • Remove the "/allPartners/deliverables/middleware_connectors/unix/lcsapi/test_client" directory.
  • [Optional] If your customer only need Android-related files and demand other files to be removed tell them to execute "\allPartners\deliverables\make.targets\clear_non_android.bat" in Windows so that non-Android files will be removed.
  • Goto the Android root directory and type "make".
  • [Troubleshoot] If you have a include path trouble it's likely that middleware_connectors header is missing.
    • Move all the include files in the following directory to any of your designated directory. /allPartners/deliverables/middleware_connectors/unix/lcsapi/include
    • And add the include path in the following files.
              allPartners/deliverables/glhal/unix/Android.mk:                $(SOURCE_TOPDIR)/allPartners/deliverables/middleware_connectors/unix/lcsapi/include
              allPartners/deliverables/glhal/unix/Makefile:                -I$(SOURCE_TOPDIR)/allPartners/deliverables/middleware_connectors/unix/lcsapi/include
      
  • When you build everything it will create the binary glgps, because Android searches the makefile and builds it when it's there.
  • The DEBUG stripped should be in out/target/product..../system/bin/glgps
  • The DEBUG unstripped should be in out/target/product.../obj/EXECUTABLES/glgps_intermediates/LINKED....
  • [Optional] If you don't want buildspec.mk at the top of the Android root.
    • You will have to modify $ANDROID_ROOT/build/core/config.mk like this.
              # ---------------------------------------------------------------
              # Try to include buildspec.mk, which will try to set stuff up.
              # If this file doesn't exist, the environemnt variables will
              # be used, and if that doesn't work, then the default is an
              # arm build
              -include $(TOPDIR)buildspec.mk
              
              -include $(TOPDIR)hardware/broadcom/gps/buildspec.mk
      
    • And move $ANDROID_ROOT/buildspec.mk to $ANDROID_ROOT/hardware/broadcom/gps/buildspec.mk
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines