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
# 去掉了选中
编译libyuv和usbcamera
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$
09-29 12:48:59.801 120-765/? E/Cam-V4l2Device: No available resolutions found, aborting
09-29 12:48:59.801 120-765/? E/Camera2-Parameters: Error finding static metadata entry 'android.scaler.availableProcessedSizes' (d0006)
09-29 12:48:59.802 120-765/? E/Camera2Client: initialize: Camera 0: unable to build defaults: Invalid argument (-22)
09-29 12:48:59.802 120-765/? E/CameraService: connectFinishUnsafe: Could not initialize client from HAL module.
09-30 02:17:56.380 120-588/? D/Cam-V4l2Device: New resolution: 1280x720
09-30 02:17:56.380 120-588/? E/Cam-Camera: Could not start streaming
09-30 02:17:56.380 120-588/? E/Camera3-Device: Camera 0: configureStreamsLocked: Unable to configure streams with HAL: No such device (-19)
09-30 02:17:56.380 120-588/? E/Camera2ClientBase: Error condition 1 reported by HAL, requestId -1
09-30 02:17:56.559 1145-1431/? E/SQLiteLog: (284) automatic index on view_events(_id)
09-30 02:17:56.592 120-588/? D/CameraTraces: Process trace saved. Use dumpsys media.camera to view.
09-30 02:17:56.592 120-588/? E/Camera3-Device: Camera 0: setUpRequestLocked: Can't set up streams: No such device (-19)
09-30 02:17:56.592 120-588/? E/Camera3-Device: Camera 0: convertMetadataListToRequestListLocked: Can't create capture request
09-30 02:17:56.592 120-588/? E/Camera2-StreamingProcessor: startStream: Camera 0: Unable to set preview request to start preview: Invalid argument (-22)
09-30 02:17:56.592 120-588/? E/Camera2Client: startPreviewL: Camera 0: Unable to start streaming preview: Invalid argument (-22)
09-30 02:52:53.553 1564-1564/? D/h: surfaceChanged
09-30 02:52:53.920 122-1690/? E/Cam-Camera: Unknown pixel format 17 in buffer 0xb3c37cc4 (stream 0xb3c43a24), ignoring
09-30 02:52:53.957 1564-1598/? I/Unity: <color=cyan>[UIWindowType.Normal] maxDepth is 2 , WindowID_Loading.</color>
参考文档:
1. iTOP4418-Android系统摄像头移植文档.-2015-11-04
2. []