HTC Nexus One

This is building passion's memo :-)
IMPORTANT: I don't know it's work or not. OK, it's work fine!

Referer sites

Gingerbread Build Tips

Quick resolved linking error building 'gingerbread' for passion.
Camera HAL has been changed since gingerbread for multi-camera support.

  • undefined reference to 'HAL_openCameraHardware'
  • undefined reference to 'HAL_getCameraInfo'

How to ?

  1. mkdir -p gingerbread/myapp/libpassioncameraif
  2. copy cameraif.cpp and
  3. cd gingerbread/myapp/libpassioncameraif
  4. mm
  5. cd gingerbread/frameworks/base/services/camera/libcameraservice
  6. edit
LOCAL_SHARED_LIBRARIES += libpassioncameraif  <<< add this line


//  passion-cameraif/cameraif.cpp
//    passion(froyo) '' wrapper for gingerbread
#include <camera/CameraHardwareInterface.h>
#include <binder/MemoryBase.h>
#include <binder/MemoryHeapBase.h>
using namespace android;
// passion(froyo)
extern "C" sp<CameraHardwareInterface> openCameraHardware();
static CameraInfo sCameraInfo[] = {
        90,  /* orientation */
extern "C" int HAL_getNumberOfCameras()
    return sizeof(sCameraInfo) / sizeof(sCameraInfo[0]);
extern "C" void HAL_getCameraInfo(int cameraId, struct CameraInfo *cameraInfo)
    memcpy(cameraInfo, &sCameraInfo[cameraId], sizeof(CameraInfo));
extern "C" sp<CameraHardwareInterface> HAL_openCameraHardware(int /*cameraId*/)
    return openCameraHardware();

LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= cameraif.cpp
LOCAL_SHARED_LIBRARIES:= libcamera libutils liblog libcutils
LOCAL_MODULE:= libpassioncameraif
android/nexusone.txt · 最終更新: 2010/12/22 02:29 by ldr Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0