This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Problems building libsensors library

Hi, 

I have developped a new sensor support for the AM335xevm_sk board, but I have problem trying to build the corresponding library (sensors.am335xevm.so) .

The thing is, I don't want to make all of the android filesystem. ST Micro has published an application note on how to build only the sensor library. You can find it here :http://www.st.com/st-web-ui/static/active/jp/resource/technical/document/application_note/DM00063297.pdf). Look for section 3 : How to build and install the Android sensor HAL.

Roughfly, they state that we should be able to lunch our target platform, and then use the standard mm command in the appropriate directory to build our new modules.

[Root Android Sources]$ source build/envsetup.sh
[Root Android Sources]$ lunch [target board]

But there is no mention of the am335xevm_sk in the available lunch configurations. Therefore, I have tried to mm with  TARGET_PRODUCT=am335xevm_sk as an option, both in the libsensor directory and the board directory itself (under [Root Android Sources]/device/ti/am335xevm_sk).

[Root Android Sources]/device/ti/am335xevm_sk/libsensors/$ mm TARGET_PRODUCT = am335x
[Root Android Sources]/device/ti/am335xevm_sk/libsensors/$ mm TARGET_PRODUCT = am335x

In both cases, the different files are compiled, but this error comes up :

make: *** No rule to make target `out/target/product/am335xevm_sk/obj/lib/liblog.so', needed by `out/target/product/am335xevm_sk/obj/SHARED_LIBRARIES/sensors.am335xevm_intermediates/LINKED/sensors.am335xevm.so'. Stop.

It seems it cannot link with the shared libraries (liblog is one of them)

Is there a way to overcome this ? Or is the only alternative to build the full filesystem?

Thanks !

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

OH : And here is the makefile (Android.mk) :

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

LOCAL_PATH := $(call my-dir)

ifeq ($(TARGET_PRODUCT),am335xevm_sk)

# HAL module implemenation, not prelinked, and stored in
# hw/<SENSORS_HARDWARE_MODULE_ID>.<ro.product.board>.so
include $(CLEAR_VARS)

LOCAL_MODULE := sensors.am335xevm

LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw

LOCAL_MODULE_TAGS := optional

LOCAL_SRC_FILES := \
sensors.cpp \
SensorBase.cpp \
AccelSensor.cpp \
MVSensor.cpp \
InputEventReader.cpp

LOCAL_SHARED_LIBRARIES := liblog libcutils libdl
LOCAL_PRELINK_MODULE := false

include $(BUILD_SHARED_LIBRARY)

endif #TARGET_PRODUCT

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%