Permalink
Browse files

adjust camera HAL source to build with our setup

  * need to copy prebuilt libcamera to :obj/lib/ and :system/lib/
  • Loading branch information...
MongooseHelix committed Jan 23, 2012
1 parent 3fb54dc commit c63e35e751fe437cc910de57fc09392c2578b306
Showing with 8 additions and 10 deletions.
  1. +6 −8 Android.mk
  2. +0 −1 README
  3. +2 −1 cameraHal.cpp
  4. BIN libcamera-nexus.so
View
@@ -1,23 +1,21 @@
LOCAL_PATH := $(call my-dir)
-LIBCAMERA_BUILD := nexus
+
include $(call all-subdir-makefiles)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
LOCAL_MODULE := camera.$(TARGET_BOARD_PLATFORM)
-LOCAL_SRC_FILES := cameraHal.cpp
-LOCAL_PRELINK_MODULE := false
-CAMERA_LIB := camera-inc
-ifeq ($(LIBCAMERA_BUILD),nexus)
-CAMERA_LIB := camera-nexus
-endif
+LOCAL_SRC_FILES := cameraHal.cpp
-TARGET_GLOBAL_LD_DIRS += -L$(LOCAL_PATH) -l${CAMERA_LIB}
+TARGET_GLOBAL_LD_DIRS += -L$(LOCAL_PATH)
LOCAL_SHARED_LIBRARIES := liblog libdl libutils libcamera_client libbinder libcutils libhardware
+LOCAL_SHARED_LIBRARIES += libcamera
LOCAL_C_INCLUDES := frameworks/base/services/ frameworks/base/include
LOCAL_C_INCLUDES += hardware/libhardware/include/ hardware/libhardware/modules/gralloc/
+LOCAL_PRELINK_MODULE := false
+
include $(BUILD_SHARED_LIBRARY)
View
1 README
@@ -1 +0,0 @@
-This directory contains code for the ICS Camera HAL
View
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#define LOG_NDEBUG 0
#define LOG_TAG "CameraHAL"
#include <CameraHardwareInterface.h>
@@ -124,7 +125,7 @@ CameraHAL_CopyBuffers_Hw(int srcFd, int destFd,
LOGV("CameraHAL_CopyBuffers_Hw: srcFD:%d destFD:%d srcOffset:%#x"
" destOffset:%#x x:%d y:%d w:%d h:%d\n", srcFd, destFd, srcOffset,
- dstOffset, x, y, w, h);
+ destOffset, x, y, w, h);
memset(&blit, 0, sizeof(blit));
blit.count = 1;
View
Binary file not shown.

3 comments on commit c63e35e

@mantera

This comment has been minimized.

Show comment Hide comment
@mantera

mantera Jan 29, 2012

When you build with your setup with these HAL camera files, do you get errors such as this?

prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/triumph/obj/SHARED_LIBRARIES/camera.msm7x30_intermediates/cameraHal.o: in function qcamera_device_open(hw_module_t const_, char const_, hw_device_t**):hardware/qcom/camera/cameraHal.cpp:589: error: undefined reference to 'openCameraHardware'

If so, how did you fix it? Thanks for your help.

When you build with your setup with these HAL camera files, do you get errors such as this?

prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/triumph/obj/SHARED_LIBRARIES/camera.msm7x30_intermediates/cameraHal.o: in function qcamera_device_open(hw_module_t const_, char const_, hw_device_t**):hardware/qcom/camera/cameraHal.cpp:589: error: undefined reference to 'openCameraHardware'

If so, how did you fix it? Thanks for your help.

@MongooseHelix

This comment has been minimized.

Show comment Hide comment
@MongooseHelix

MongooseHelix Jan 29, 2012

Member

Since it looks like you are building for a msm7x30 device, you will most likely want to use the following hacked up camera HAL:
http://forum.xda-developers.com/showthread.php?t=1448303

Also see these posts:
http://forum.xda-developers.com/showpost.php?p=21728373&postcount=122
http://forum.xda-developers.com/showpost.php?p=21734698&postcount=125

I imagine the error you are getting is due to the libcamera.so you are using to build with but not positive about that.

Member

MongooseHelix replied Jan 29, 2012

Since it looks like you are building for a msm7x30 device, you will most likely want to use the following hacked up camera HAL:
http://forum.xda-developers.com/showthread.php?t=1448303

Also see these posts:
http://forum.xda-developers.com/showpost.php?p=21728373&postcount=122
http://forum.xda-developers.com/showpost.php?p=21734698&postcount=125

I imagine the error you are getting is due to the libcamera.so you are using to build with but not positive about that.

@mantera

This comment has been minimized.

Show comment Hide comment
@mantera

mantera Jan 29, 2012

Please sign in to comment.