NanoPC-T2 Android对USB Camera (UVC)的支持

NanoPC-T2 去掉OV5640后启动不起来
内核中把OV5640去掉后,就启动不起来了。如下:

I/DEBUG   (  115): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG   (  115): Build fingerprint: 'Android/aosp_nanopi2/nanopi2:5.1.1/LMY48G/tony07101306:userdebug/dev-keys'
I/DEBUG   (  115): Revision: '1'
I/DEBUG   (  115): ABI: 'arm'
I/DEBUG   (  115): pid: 11321, tid: 11321, name: surfaceflinger  >>> /system/bin/surfaceflinger <<<
I/DEBUG   (  115): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x574
I/DEBUG   (  115):     r0 00000668  r1 00000020  r2 00000020  r3 00000030
I/DEBUG   (  115):     r4 00000668  r5 00000020  r6 00000548  r7 b6c1ac84
I/DEBUG   (  115):     r8 00000000  r9 b64a7148  sl 00000001  fp b6c18303
I/DEBUG   (  115):     ip b58ebf0c  sp bef0b7e8  lr b58e71bb  pc b58e71d4  cpsr 00010030
I/DEBUG   (  115): 
I/DEBUG   (  115): backtrace:
I/DEBUG   (  115):     #00 pc 000031d4  /system/lib/libv4l2-nexell.so (V4l2NexellPrivate::link(int, int)+67)
I/DEBUG   (  115):     #01 pc 000095fd  /system/lib/hw/hwcomposer.slsiap.so (android::HDMIUseOnlyGLImpl::enable()+28)
I/DEBUG   (  115):     #02 pc 00007c59  /system/lib/hw/hwcomposer.slsiap.so
I/DEBUG   (  115):     #03 pc 000219e7  /system/lib/libsurfaceflinger.so
I/DEBUG   (  115):     #04 pc 0002171f  /system/lib/libsurfaceflinger.so
I/DEBUG   (  115):     #05 pc 00017981  /system/lib/libsurfaceflinger.so (android::SurfaceFlinger::init()+104)
I/DEBUG   (  115):     #06 pc 00000af1  /system/bin/surfaceflinger
I/DEBUG   (  115):     #07 pc 00012df9  /system/lib/libc.so (__libc_init+44)
I/DEBUG   (  115):     #08 pc 00000c08  /system/bin/surfaceflinger
I/DEBUG   (  115): 
I/DEBUG   (  115): Tombstone written to: /data/tombstones/tombstone_08
I/ServiceManager(  110): service 'media.audio_flinger' died
Device Drivers  --->
 <*> Multimedia support  --->
  [*]   Video capture adapters  --->
   Encoders, decoders, sensors and other helper chips  --->
    < > ov5640 camera support
    # 去掉了选中
tony@tony-E431:~/Work/ex_sd/source/20_NanoPi2/android$ mmm external/libyuv/
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=5.1.1
TARGET_PRODUCT=aosp_nanopi2
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a9
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.4.0-96-generic-x86_64-with-Ubuntu-14.04-trusty
HOST_BUILD_TYPE=release
BUILD_ID=LMY48G
OUT_DIR=out
============================================
No private recovery resources for TARGET_DEVICE nanopi2
make: Entering directory `/home/tony/Work/ex_sd/source/20_NanoPi2/android'
Import includes file: out/target/product/nanopi2/obj/STATIC_LIBRARIES/libyuv_static_intermediates/import_includes
target thumb C++: libyuv_static <= external/libyuv/files/source/compare.cc
target thumb C++: libyuv_static <= external/libyuv/files/source/convert.cc
target thumb C++: libyuv_static <= external/libyuv/files/source/convert_argb.cc
target thumb C++: libyuv_static <= external/libyuv/files/source/convert_from.cc
target thumb C++: libyuv_static <= external/libyuv/files/source/cpu_id.cc
target thumb C++: libyuv_static <= external/libyuv/files/source/format_conversion.cc
target thumb C++: libyuv_static <= external/libyuv/files/source/planar_functions.cc
target thumb C++: libyuv_static <= external/libyuv/files/source/rotate.cc
target thumb C++: libyuv_static <= external/libyuv/files/source/rotate_argb.cc
target thumb C++: libyuv_static <= external/libyuv/files/source/row_common.cc
target thumb C++: libyuv_static <= external/libyuv/files/source/row_posix.cc
target thumb C++: libyuv_static <= external/libyuv/files/source/scale.cc
target thumb C++: libyuv_static <= external/libyuv/files/source/scale_argb.cc
target thumb C++: libyuv_static <= external/libyuv/files/source/video_common.cc
target thumb C++: libyuv_static <= external/libyuv/files/source/compare_neon.cc
target thumb C++: libyuv_static <= external/libyuv/files/source/rotate_neon.cc
target thumb C++: libyuv_static <= external/libyuv/files/source/row_neon.cc
target thumb C++: libyuv_static <= external/libyuv/files/source/scale_neon.cc
Export includes file: external/libyuv/Android.mk -- out/target/product/nanopi2/obj/STATIC_LIBRARIES/libyuv_static_intermediates/export_includes
target StaticLib: libyuv_static (out/target/product/nanopi2/obj/STATIC_LIBRARIES/libyuv_static_intermediates/libyuv_static.a)
make: Leaving directory `/home/tony/Work/ex_sd/source/20_NanoPi2/android'

#### make completed successfully (7 seconds) ####

tony@tony-E431:~/Work/ex_sd/source/20_NanoPi2/android$ mmm hardware/libhardware/modules/android-camera-hal
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=5.1.1
TARGET_PRODUCT=aosp_nanopi2
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a9
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.4.0-96-generic-x86_64-with-Ubuntu-14.04-trusty
HOST_BUILD_TYPE=release
BUILD_ID=LMY48G
OUT_DIR=out
============================================
make: Entering directory `/home/tony/Work/ex_sd/source/20_NanoPi2/android'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/nanopi2/system/etc/media_profiles.xml'
build/core/base_rules.mk:550: warning: ignoring old commands for target `out/target/product/nanopi2/system/etc/media_profiles.xml'
No private recovery resources for TARGET_DEVICE nanopi2
Import includes file: out/target/product/nanopi2/obj/SHARED_LIBRARIES/camera.slsiap_intermediates/import_includes
target thumb C++: camera.slsiap <= hardware/libhardware/modules/android-camera-hal/HalModule.cpp
target thumb C++: camera.slsiap <= hardware/libhardware/modules/android-camera-hal/Camera.cpp
target thumb C++: camera.slsiap <= hardware/libhardware/modules/android-camera-hal/V4l2Device.cpp
target thumb C++: camera.slsiap <= hardware/libhardware/modules/android-camera-hal/ImageConverter.cpp
target thumb C++: camera.slsiap <= hardware/libhardware/modules/android-camera-hal/Workers.cpp
target thumb C++: camera.slsiap <= hardware/libhardware/modules/android-camera-hal/Yuv422UyvyToJpegEncoder.cpp
target SharedLib: camera.slsiap (out/target/product/nanopi2/obj/SHARED_LIBRARIES/camera.slsiap_intermediates/LINKED/camera.slsiap.so)
target Symbolic: camera.slsiap (out/target/product/nanopi2/symbols/system/lib/hw/camera.slsiap.so)
Export includes file: hardware/libhardware/modules/android-camera-hal/Android.mk -- out/target/product/nanopi2/obj/SHARED_LIBRARIES/camera.slsiap_intermediates/export_includes
target Strip: camera.slsiap (out/target/product/nanopi2/obj/lib/camera.slsiap.so)
Install: out/target/product/nanopi2/system/lib/hw/camera.slsiap.so
target Prebuilt: media_profiles.xml (out/target/product/nanopi2/obj/ETC/media_profiles.xml_intermediates/media_profiles.xml)
Copy xml: out/target/product/nanopi2/system/etc/media_profiles.xml
make: Leaving directory `/home/tony/Work/ex_sd/source/20_NanoPi2/android'

#### make completed successfully (4 seconds) ####

tony@tony-E431:~/Work/ex_sd/source/20_NanoPi2/android$ 

小结一下:根据https://github.com/antmicro/android-camera-hal这里,搞到能够预览和拍照了。使用系统自带的相机。没有时间再往下搞了。暂时先放这里了。

参考文档:
1. iTOP4418-Android系统摄像头移植文档.-2015-11-04
2. []

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

袁保康

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值