HI Luo: Thank you for your reply. I have made the libgps.so by gps_freerunner.c, gps.h and also add the "BOARD_GPS_LIBRARIES := libgps" in BoardConfig.mk for linking to libhardware_legacy.so . And I have load the driver of my gps in android os, and I got the ttyUSB0. But I met another question. The question is : When I test gps module by gpstest program, I got the message below.
libhardware_legacy: no gps hardware on this device. Could not get gps interface. I don't know what's happen about it. Could you give me some suggestion? Thanks in advance. ehung 2009/5/14 Daliang Luo <luodali...@gmail.com> > > Hi ehung,for the issue you can pull the whole directory of gps out of the > directory of /hardware. It can't build another so file in one so file.So the > directory shows like: > android > hardware -> libhardware.so > gps -> libgps.so > ril ->ril.so > > good luck! > > 2009/4/27 ehung <ehung1...@gmail.com> > > >> Hi Nio >> I got the same problem with you. >> Do you have any good solution about it? >> Maybe we can discuss that question together? >> >> Thanks in advance. >> ehung >> >> >> On 3月20日, 下午10時24分, Nio <luodali...@gmail.com> wrote: >> > Hi David, it is not works. I think why I can't build a so namedlibgps.so >> because there is already a libhardware.so in the parent >> > directory of gps(hardware/libhardware/gps/). If so, I think I can't >> > build a so like unless I change something refer to that. Ah, do you >> > know how qualcomm build itslibgps.so? >> > >> > On 3月20日, 下午10时53分, David Turner <di...@android.com> wrote: >> > >> > > Ah, another reason is to generate libfoo.so, you must name use >> "LOCAL_MODULE >> > > := foo" + "include $(BUILD_SHARED_LIBRARY)" >> > > using "LOCAL_MODULE := libfoo" will probably result in the generate of >> > > "liblibfoo.so" or something, and the build system might not like it. >> > >> > > I'm just speculating though. >> > >> > > 2009/3/20 David Turner <di...@android.com> >> > >> > > > It might be that there is already another module named gps_hardware >> > > > somewhere in the build process, and that the error message is >> related to >> > > > that. You should really try to call it "gps_fnord.c", assuming >> "fnord" is a >> > > > name related to your specific hardware. >> > >> > > > Or just name it "libgps.so" (LOCAL_MODULE := gps) and don't build >> another >> > > > one. >> > >> > > > 2009/3/20 Nio <luodali...@gmail.com> >> > >> > > >> Thanks David, in fact I new a file called gps_hardware.c instead of >> > > >> gps_qemu.c and i try to build a so called gps_hardware.so.but when >> I >> > > >> try to make, >> > > >> it reminds errors: >> > > >> build/core/shared_library.mk:20:*** hardware/libhardware/gps: >> > > >> Illegal use of OVERRIDE_BUILT_MODULE_PATH. >> > > >> I don't know what was happenning here. >> > > >> what i have done: >> > > >> 1.add to Android.mk as follow: >> > > >> LOCAL_PATH := $(call my-dir) >> > > >> include $(CLEAR_VARS) >> > > >> ... >> > > >> LOCAL_SRC_FILES += gps/gps_hardware.c >> > > >> LOCAL_SRC_FILES += gps/gps_hardware.c >> > > >> LOCAL_MODULE := libgps_hardware >> > > >> include $(BUILD_SHARED_LIBRARY) >> > >> > > >> 2.add to vendor/marvell/littleton/BoardConfig.mk >> > > >> BOARD_GPS_LIBRARIES := libgps_hardware >> > >> > > >> I have no idea what is wrong with my code. Is there any advices? >> > > >> Best Regards, >> > > >> Nio >> > >> > > >> On 3月20日, 下午2时00分, David Turner <di...@android.com> wrote: >> > > >> > You should not need to modify gps_qemu.c at all, and this source >> file >> > > >> > doesn't correspond to a stand-alone library; >> > > >> > instead, it is part of libhardware.so. >> > >> > > >> > What you should do is write your ownlibgps.so that provides the >> > > >> following >> > > >> > function: >> > >> > > >> > const GpsInterface* gps_get_interface(); >> > >> > > >> > which shall return an interface pointer to your custom >> implementation. >> > > >> > that's about it. >> > >> > > >> > On Sun, Mar 15, 2009 at 8:37 PM, Nio <luodali...@gmail.com> >> wrote: >> > >> > > >> > > Hi there, >> > > >> > > I change the file gps_qemu.c as to integrate with my GPS. But I >> dont >> > > >> > > know how to build a libgps_qemu.so. I have added >> > > >> > > BOARD_GPS_LIBRARIES := libgps_qemu in the file BoardConfig.mk >> and >> > > >> > > added LOCAL_SHARD_LIBRARIES +=$(BOARD_GPS_LIBRARIES) in the >> file gps/ >> > > >> > > Android.mk. But when I make, it still tells me there are no >> rules to >> > > >> > > create out/target/product/littleton/obj/SHARD_LIBRERIES/ >> > > >> > > libhardware_intermediates/LINKED/libgps_qemu.so. >> > > >> > > Can any one give some help? Thanks in advance. >> > >> > > >> > > Best Regards, >> > > >> > > Nio >> >> > > > > > --~--~---------~--~----~------------~-------~--~----~ unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting -~----------~----~----~----~------~----~------~--~---