-
gc2145_tinav2.1验证完成20170523_1648.7z下载
资源介绍
UNICODE 全志R16平台TINAV2.1下的CSI接口摄像头ov5640的配置v1.2.txt
R16_Camera模块开发说明文档_V1.8.pdf 所有步骤请按照这个说明书执行
1、驱动的编译配置:
R:\wyb\gc2145_tinav2.1\lichee\linux-3.4\drivers\media\video\sunxi-vfe\device\gc2145.c
R:\wyb\gc2145_tinav2.1\lichee\linux-3.4\drivers\media\video\sunxi-vfe\device\Makefile
(可选操作,除了gc2145之外,其它的摄像头驱动都关闭,肯定可以减小最终生成的IMG的大小!)
obj-m += ov5640.o
obj-m += ov2640.o
#obj-m += ov7736.o
#obj-m += s5k4ec.o
#obj-m += s5k4ec_mipi.o
#obj-m += gc2035.o
#obj-m += gt2005.o
#obj-m += gc0307.o
obj-m += gc0308.o
#obj-m += gc0328.o
#obj-m += gc0328c.o
#obj-m += gc0329.o
#obj-m += gc0311.o
#obj-m += hi253.o
#obj-m += sp2518.o
#obj-m += sp2519.o
#obj-m += sp0718.o
#obj-m += sp0838.o
#obj-m += ov16825.o
#obj-m += ov5650.o
#obj-m += ov5647.o
#obj-m += ov5647_mipi.o
#obj-m += t8et5.o
#obj-m += s5k4e1.o
#obj-m += s5k4e1_mipi.o
#obj-m += sp2518.o
#obj-m += sp0718.o
#obj-m += gc5004.o
#obj-m += gc5004_mipi.o
#obj-m += ov5648.o
#obj-m += ar0330.o
#obj-m += ov5648.o
#obj-m += sp5408.o
#obj-m += ov12830.o
#obj-m += ov8825.o
#obj-m += ov8850.o
#obj-m += gc2155.o
obj-m += gc2145.o
obj-m += gc2145d.o
#obj-m += ov8858.o
#obj-m += ov13850.o
#obj-m += imx214.o
#obj-m += ov8858_4lane.o
#obj-m += sp5409.o
#obj-m += s5k5e2yx.o
#obj-m += ov2710_mipi.o
#obj-m += siv121d.o
#obj-m += ov2710_mipi.o
#obj-m += bg0703.o
#obj-m += gc1014_mipi.o
#obj-m += imx219.o
#obj-m += imx224.o
#obj-m += imx322.o
#obj-m += ov8858_r2a_4lane.o
#obj-m += ov8865_4lane.o
#obj-m += ps1210.o
#obj-m += imx291.o
2、R:\wyb\gc2145_tinav2.1\lichee\linux-3.4\drivers\media\video\sunxi-vfe\vfe.c
这里修正之后就一切正常了。不然摄像头在系统启动之后就永远休眠了。
static void probe_work_handle(struct work_struct *work)
{
……
#ifdef CONFIG_ES
dev->early_suspend.level = EARLY_SUSPEND_LEVEL_DISABLE_FB + 1;
dev->early_suspend.suspend = vfe_early_suspend;
dev->early_suspend.resume = vfe_late_resume;
// [hawkview_err]xxxxcan't open /dev/video0(Resource temporarily unavailable)
// 2016/10/25 14:33 wenyuanbo cloase suspend.
// register_early_suspend(&dev->early_suspend);
vfe_print("register_early_suspend @ probe handle!\n");
#endif
……
}
3、请严重注意:全志原生提供的cameratest有点错误(和tinav1.0对比得知:保存获取图片的文件名有小错误)
R:\wyb\gc2145_tinav2.1\package\allwinner\cameratest\src\common\hawkview.c
int fetch_sub_cmd(const char* buf,int buf_len,char** cmd,int* cmd_num,int lenght)
{
int i = 0,j = 0,n = 0;
while(buf[i] != '#'){ //the sub cmd end by '#'
while(buf[i] != 'x' && buf[i] != ':' && buf[i] != '#') {
if((i+1) > buf_len) return 0;
*((char*)cmd + n*lenght + j++) = buf[i++];
……
}
R:\wyb\gc2145_tinav2.1\package\allwinner\cameratest\src\common\video.c
static int capture_frame(void* capture,int (*set_disp_addr)(int,int,unsigned int*),pthread_mutex_t* mutex)
{
……
//sync capture info perp x second
#define M_SECOND 200
if(is_x_msec(M_SECOND,(long long)(buf.timestamp.tv_sec),(long long)(buf.timestamp.tv_usec))){
getExifInfo(&(cap->frame.exif));
(建议关闭这里)
// set_cap_info((void*)cap);
}
……
}
R:\wyb\gc2145_tinav2.1\package\allwinner\cameratest\src\common\video_helper.c
int set_cap_info(void* capture)
{
……
(修改这里)
//strcpy(file_path, "dev/info");
sprintf(file_path, "%s/%s.info", PATH, cap->picture.path_name);
……
}
int do_save_sub_image(void* capture,int buf_index)
{
……
(增加这里)
set_cap_info(capture);
set_exif_info(capture);
hv_dbg("--------set_exif_info end\n");
……
}
4、配置为在系统启动的时候加载gc2145.ko(SDK默认加载的是gc0308.ko)
R:\wyb\gc2145_tinav2.1\target\allwinner\astar-common\modules.mk
define KernelPackage/sunxi-vfe
SUBMENU:=$(VIDEO_MENU)
TITLE:=sunxi-vfe support
FILES:=$(LINUX_DIR)/drivers/media/video/videobuf-core.ko
FILES+=$(LINUX_DIR)/drivers/media/video/videobuf-dma-contig.ko
FILES+=$(LINUX_DIR)/drivers/media/video/sunxi-vfe/csi_cci/cci.ko
FILES+=$(LINUX_DIR)/drivers/media/video/sunxi-vfe/vfe_os.ko
FILES+=$(LINUX_DIR)/drivers/media/video/sunxi-vfe/vfe_subdev.ko
(修改这里)
FILES+=$(LINUX_DIR)/drivers/media/video/sunxi-vfe/device/gc2145.ko
FILES+=$(LINUX_DIR)/drivers/media/video/sunxi-vfe/vfe_v4l2.ko
(修改这里)
AUTOLOAD:=$(call AutoLoad,90,videobuf-core videobuf-dma-contig cci vfe_os vfe_subdev gc2145 vfe_v4l2)
endef
5、直接使用了tinav1.0上调通ov5640后的sys_config.fex
(请注意:这里修改的电源部分,其他没有用到的设备都请关闭掉。请参照您的原理图修改摄像头的供电部分!!!!)
R:\wyb\gc2145_tinav2.1\target\allwinner\astar-parrot\configs\sys_config.fex
[power_sply]
dcdc1_vol = 3000
dcdc2_vol = 1100
dcdc3_vol = 1200
dcdc4_vol = 0
dcdc5_vol = 1500
aldo2_vol = 2500
aldo3_vol = 3000
(这里是增加的电源部分:)
dldo3_vol = 2800
;gpio0_vol = 2800
ldoio0_vol = 2800
[csi0]
vip_used = 1
vip_mode = 0
vip_dev_qty = 1
vip_define_sensor_list = 0
vip_csi_pck = port:PE00<2>
vip_csi_mck = port:PE01<2>
vip_csi_hsync = port:PE02<2>
vip_csi_vsync = port:PE03<2>
vip_csi_d0 = port:PE04<2>
vip_csi_d1 = port:PE05<2>
vip_csi_d2 = port:PE06<2>
vip_csi_d3 = port:PE07<2>
vip_csi_d4 = port:PE08<2>
vip_csi_d5 = port:PE09<2>
vip_csi_d6 = port:PE10<2>
vip_csi_d7 = port:PE11<2>
;vip_csi_sck = port:PE12<2>
;vip_csi_sda = port:PE13<2>
;vip_dev0_mname = "gc0308"
;vip_dev0_mname = "ov5640"
vip_dev0_mname = "gc2145"
vip_dev0_pos = "rear"
vip_dev0_lane = 1
vip_dev0_twi_id = 2
;vip_dev0_twi_addr = 0x42
vip_dev0_twi_addr = 0x78
vip_dev0_isp_used = 0
vip_dev0_fmt = 0
(2017/4/6 11:41 wenyuanbo 调试的时候这里设置为0方便测量摄像头的供电部分^_)
;vip_dev0_stby_mode = 1
vip_dev0_stby_mode = 0
vip_dev0_vflip = 0
vip_dev0_hflip = 0
vip_dev0_iovdd = "axp22_dldo3"
vip_dev0_iovdd_vol = 2800000
vip_dev0_avdd = ""
vip_dev0_avdd_vol = 2800000
vip_dev0_dvdd = ""
vip_dev0_dvdd_vol = 1800000
vip_dev0_afvdd = ""
vip_dev0_afvdd_vol = 2800000
vip_dev0_power_en =
vip_dev0_reset = port:PE14<1><0>
vip_dev0_pwdn = port:PE15<1><1>
vip_dev0_flash_en =
vip_dev0_flash_mode =
vip_dev0_af_pwdn =
(这个可以不改。不需要支持OTG功能。)
;usb_port_type: usb mode: 0-device, 1-host, 2-otg
……
[usbc0]
usb_used = 1
;usb_port_type = 2
usb_port_type = 0
(!!!!解决重启的问题)
[pmu1_para]
……
;power_start = 0
power_start = 3
pmu_temp_enable = 0
6、第一次编译之后,再次配置:
10、在menuconfig中打开sunxi-vfe support
rootroot@rootroot-E400:~/wyb/gc2145_tinav2.1$ pwd
/home/rootroot/wyb/gc2145_tinav2.1
rootroot@rootroot-E400:~/wyb/gc2145_tinav2.1$ source build/envsetup.sh
including target/allwinner/tulip-d1/vendorsetup.sh
including target/allwinner/octopus-dev/vendorsetup.sh
including target/allwinner/azalea-perf3/vendorsetup.sh
including target/allwinner/octopus-sch/vendorsetup.sh
including target/allwinner/azalea-evb/vendorsetup.sh
including target/allwinner/azalea-perf2/vendorsetup.sh
including target/allwinner/astar-parrot/vendorsetup.sh
including target/allwinner/generic/vendorsetup.sh
including target/allwinner/astar-spk/vendorsetup.sh
including target/allwinner/azalea-perf1/vendorsetup.sh
including target/allwinner/astar-evb/vendorsetup.sh
rootroot@rootroot-E400:~/wyb/gc2145_tinav2.1$ lunch
You're building on Linux
Lunch menu... pick a combo:
1. tulip_d1-tina
2. tulip_d1-dragonboard
3. octopus_dev-tina
4. octopus_dev-dragonboard
5. azalea_perf3-tina
6. azalea_perf3-dragonboard
7. octopus_sch-tina
8. octopus_sch-dragonboard
9. azalea_evb-tina
10. azalea_evb-dragonboard
11. azalea_perf2-tina
12. azalea_perf2-dragonboard
13. astar_parrot-tina
14. astar_parrot-dragonboard
15. astar_spk-tina
16. astar_spk-dragonboard
17. azalea_perf1-tina
18. azalea_perf1-dragonboard
19. astar_evb-tina
Which would you like?13
============================================
PLATFORM_VERSION_CODENAME=Neptune
PLATFORM_VERSION=2.0.0
TARGET_PRODUCT=astar_parrot
TARGET_BUILD_VARIANT=tina
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a7
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.13.0-24-generic-x86_64-with-Ubuntu-14.04-trusty
HOST_BUILD_TYPE=release
BUILD_ID=57513AA3
OUT_DIR=
============================================
rootroot@rootroot-E400:~/wyb/gc2145_tinav2.1$ make -j8
rootroot@rootroot-E400:~/wyb/gc2145_tinav2.1$ make menuconfig
Kernel modules --->
Video Support --->
<*> kmod-sunxi-vfe......................................... sunxi-vfe support
7、编译打包刷机之后的串口(debug口的)打印信息::
rootroot@cm-System-Product-Name:/home/rediron/r16/gc2145_tinav2.1$ cp .config bak2_vfe.config
rootroot@rootroot-virtual-machine:~/wyb/opencv3.1_r16_tinav2.1$ make -j8
rootroot@rootroot-virtual-machine:~/wyb/opencv3.1_r16_tinav2.1$ pack -d
验证gc2145的驱动是否正常加载:
Xshell 5 (Build 0964)
Copyright (c) 2002-2016 NetSarang Computer, Inc. All rights reserved.
Type `help' to learn how to use Xshell prompt.
[c:\~]$
Connecting to COM3...
Connected.
BusyBox v1.24.1 () built-in shell (ash)
_____ _ __ _
|_ _||_| ___ _ _ | | |_| ___ _ _ _ _
| | _ | || | | |__ | || || | ||_'_|
| | | || | || _ | |_____||_||_|_||___||_,_|
|_| |_||_|_||_|_| Tina is Based on OpenWrt!
----------------------------------------------
Tina Linux (Neptune, 57513AA3)
----------------------------------------------
root@TinaLinux:/#
root@TinaLinux:/# cd /dev
root@TinaLinux:/dev# ll v*
crw-r--r-- 1 root root 7, 0 Jan 2 08:02 vcs
crw-r--r-- 1 root root 7, 1 Jan 2 08:02 vcs1
crw-r--r-- 1 root root 7, 128 Jan 2 08:02 vcsa
crw-r--r-- 1 root root 7, 129 Jan 2 08:02 vcsa1
crw-r--r-- 1 root root 10, 54 Jan 2 08:02 vhci
crw-r--r-- 1 root root 81, 0 Jan 2 08:02 video0
root@TinaLinux:/# lsmod
bcmdhd 534841 0
cci 19880 2 gc2145
gc2145 11234 0
snd_mixer_oss 11252 1 snd_pcm_oss
snd_pcm_oss 29795 0
snd_seq_device 3927 0
vfe_os 3065 2 vfe_v4l2
vfe_subdev 3941 2 vfe_v4l2
vfe_v4l2 335707 0
videobuf_core 12030 2 vfe_v4l2
videobuf_dma_contig 2553 1 vfe_v4l2
root@TinaLinux:/#
root@TinaLinux:/dev# cd /sys/class/i2c-adapter/i2c-
i2c-0/ i2c-1/ i2c-2/
root@TinaLinux:/dev# cd /sys/class/i2c-adapter/i2c-2
root@TinaLinux:/sys/devices/platform/twi.2/i2c-2# ll
drwxr-xr-x 4 root root 0 Jan 2 08:02 .
drwxr-xr-x 4 root root 0 Jan 2 08:02 ..
drwxr-xr-x 3 root root 0 Jan 2 08:04 2-003c
--w------- 1 root root 4096 Jan 2 08:04 delete_device
lrwxrwxrwx 1 root root 0 Jan 2 08:04 device -> ../../twi.2
-r--r--r-- 1 root root 4096 Jan 2 08:04 name
--w------- 1 root root 4096 Jan 2 08:04 new_device
drwxr-xr-x 2 root root 0 Jan 2 08:04 power
lrwxrwxrwx 1 root root 0 Jan 2 08:04 subsystem -> ../../../../bus/i2c
-rw-r--r-- 1 root root 4096 Jan 2 08:04 uevent
root@TinaLinux:/sys/devices/platform/twi.2/i2c-2# cd 2-003c
root@TinaLinux:/sys/devices/platform/twi.2/i2c-2/2-003c# ll
drwxr-xr-x 3 root root 0 Jan 2 08:04 .
drwxr-xr-x 4 root root 0 Jan 2 08:02 ..
lrwxrwxrwx 1 root root 0 Jan 2 08:04 driver -> ../../../../../bus/i2c/drivers/ov5640
-r--r--r-- 1 root root 4096 Jan 2 08:04 modalias
-r--r--r-- 1 root root 4096 Jan 2 08:04 name
drwxr-xr-x 2 root root 0 Jan 2 08:04 power
lrwxrwxrwx 1 root root 0 Jan 2 08:04 subsystem -> ../../../../../bus/i2c
-rw-r--r-- 1 root root 4096 Jan 2 08:04 uevent
root@TinaLinux:/sys/devices/platform/twi.2/i2c-2/2-003c# cat name
gc2145
root@TinaLinux:/sys/devices/platform/twi.2/i2c-2/2-003c#
获取YUV格式的图片:
[ 19.184637] dhd_open: Exit ret=0
[ 22.716117] sndpcm_startup,l:1688,pa_vol:40
BusyBox v1.24.1 () built-in shell (ash)
_____ _ __ _
|_ _||_| ___ _ _ | | |_| ___ _ _ _ _
| | _ | || | | |__ | || || | ||_'_|
| | | || | || _ | |_____||_||_|_||___||_,_|
|_| |_||_|_||_|_| Tina is Based on OpenWrt!
----------------------------------------------
Tina Linux (Neptune, 57513AA3)
----------------------------------------------
root@TinaLinux:/#
root@TinaLinux:/#
root@TinaLinux:/# pwd
/
root@TinaLinux:/#
root@TinaLinux:/#
root@TinaLinux:/#
root@TinaLinux:/# cameratest
[hawkview_dbg]hawkview_init set_w 1280
[hawkview_msg]----sunxi9iw1p1 capture register sucessfully!
[hawkview_dbg]hawkview_init 2
[hawkview_dbg]video pthread_create ret:0
[hawkview_dbg]video thread status 0 --> 101
[hawkview_dbg]command pthread_create ret:0
(等待输入需要获取的YUV图片的分辨率:)
[hawkview_dbg]read cmd [ 181.303764] [VFE]vfe_open
146:0:1:1600x1200#
[hawkview_[ 181.308582] [VFE]..........................vfe clk open!.......................
dbg]cmd 0: 146
[hawkview_dbg]cm[ 181.319592] [VFE]vfe_open ok
d 1: 0
[hawkview_dbg]cmd 2: 1
[hawkview_dbg]cmd 3: 1600
[hawkview_dbg]cmd 4: 1200
[hawkview_dbg]send command 146
[hawkview_dbg]video thread cmd: 0 --> 146
[hawkview_dbg]reset video capture
[hawkview_msg]----open /dev/video0
[hawkview_msg]----get sensor type: 0
[ 182.325602] [VFE_ERR]set input i(1)>dev_qty(1)-1 error!
[hawkview_err]xxxxVIDIOC_S_INPUT[ 182.331594] [VFE]Set vfe core clk = 108000000, after Set vfe core clk = 99000000
failed! s_input: 1
[ 182.366903] [VFE]mclk on
[ 182.393862] [CSI][GC2145]enable oe!
[ 182.398584] [CSI][GC2145]V4L2_IDENT_SENSOR=2145[hawkview_msg]----the tried size
[ 182.875861] [VFE]buffer_setup, buffer count=10, size=2884096
is 1600x1200,the supported size is 1600x1200!
[hawkview_dbg]map buffer index: 0, mem: b6bc8000, len: 2c0200, offset: 0
[hawkview_dbg]map buffer index: 1, mem: b6907000, len: 2c0200, offset: 2c1000
[hawkview_dbg]map buffer index: 2, mem: b6646000, len: 2c0200, offset: 582000
[hawkview_dbg]map buffer index: 3, mem: b6385000, len: 2c0200, offset: 843000
[hawkview_dbg]map buffer index: 4, mem: b60c4000, len: 2c0200, offset: b04000
[hawkview_dbg]map buffer index: 5, mem: b5e03000, len: 2c0200, offset: dc5000
[hawkview_dbg]map buffer index: 6, mem: b5b42000, len: 2c0200, offset: 1086000
[hawkview_dbg]map buffer index: 7, mem: b5881000, len: 2c0200, offset: 1347000
[hawkview_dbg]map buffer index: 8, mem: b55c0000, len: 2c0200, offset: 1608000
[hawkview_dbg]map buffer index: 9, mem: b52ff000, len: 2c0200, offset: 18c9000
[hawkview_dbg]video thread status 101 --> 102
[hawkview_dbg]capture frame command -1 --> 161
[hawkview_dbg]capture frame status -1 --> 0
[hawkview_dbg]capture start streaming
[hawkview_dbg]capture frame command 161 --> 0
[hawkview_dbg]capture frame status 0 --> 1
[ 183.030025] [VFE]capture video mode!
[ 183.132659] [VFE]capture video first frame done!
(等待输入希望获取的YUV图片的文件名:)
[hawkview_dbg]read cmd 149:color1013.yuv#
[hawkview_dbg]cmd 0: 149
[hawkview_dbg]cmd 1: color1013.yuv
[hawkview_dbg]send command 149
[hawkview_dbg]index: 3 buffers[buf.index].start = 0xb6385000
[hawkview_dbg]image_name: /tmp/color1013.yuv
[hawkview_err]xxxxOpen sync file error[hawkview_dbg]image exif info:
image_name = color1013.yuv
width = 1600
height = 1200
exp_time_num = 0
exp_time_den = 0
sht_speed_num = 0
sht_speed_den = 0
fnumber = 0
exp_bias = 0
foc_length = 0
iso_speed = 0
flash_fire = 0
brightness = 0
#
[hawkview_dbg]--------set_exif_info end
(全志没有设置结束按键,只有按ctrl+C组合按键结束程序)
^C[ 270.859423] [VFE]vfe_close
[ 270.862589] [CSI][GC2145]disalbe oe!
[ 270.878791] [VFE]mclk off
[ 270.893865] [VFE]..........................vfe clk close!.......................
[ 270.902299] [VFE]vfe_close end
root@TinaLinux:/#
8、在电脑的命令行中使用adb shell:
Microsoft Windows [版本 6.1.7600]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
C:\Users\Administrator>adb shell
BusyBox v1.24.1 () built-in shell (ash)
_____ _ __ _
|_ _||_| ___ _ _ | | |_| ___ _ _ _ _
| | _ | || | | |__ | || || | ||_'_|
| | | || | || _ | |_____||_||_|_||___||_,_|
|_| |_||_|_||_|_| Tina is Based on OpenWrt!
----------------------------------------------
Tina Linux (Neptune, 57513AA3)
----------------------------------------------
root@TinaLinux:/# cd tmp
cd tmp
root@TinaLinux:/tmp# ll
ll
drwxrwxrwt 9 root root 300 Jan 2 20:15 .
drwxr-xr-x 1 root root 1024 Jan 2 20:15 ..
drwx------ 2 root root 40 Jan 2 20:15 .uci
-rw-r--r-- 1 root root 6 Jan 2 20:15 TZ
-rw-r--r-- 1 root root 5 Jan 2 20:15 booting_state
drwxrwxrwx 2 root root 40 Jan 2 20:15 lock
drwxr-xr-x 2 root root 80 Jan 2 20:15 log
lrwxrwxrwx 1 root root 21 Jan 2 20:15 resolv.conf -> /tmp/res
olv.conf.auto
-rw-r--r-- 1 root root 0 Jan 2 20:15 resolv.conf.auto
drwxrwxrwx 2 root root 100 Jan 2 20:15 run
drwxrwxrwt 2 root root 40 Jan 2 20:15 shm
drwxrwxrwx 2 root root 60 Jan 2 20:15 state
drwxr-xr-x 2 root root 40 Jan 2 20:15 tmp
srwxr-xr-x 1 root root 0 Jan 2 20:15 wpa_ctrl_254-32
srwxr-xr-x 1 root root 0 Jan 2 20:15 wpa_ctrl_254-33
root@TinaLinux:/tmp#
root@TinaLinux:/tmp#
(1600x1200为您所希望获取的图片的分辨率,请根据您的需要来设置)
root@TinaLinux:/tmp# echo "146:0:1:1600x1200#" > command
echo "146:0:1:1600x1200#" > command
(color1013.yuv为您希望保存yuv图像的文件名)
root@TinaLinux:/tmp# echo "149:color1013.yuv#" > command
echo "149:color1013.yuv#" > command
root@TinaLinux:/tmp# ll
ll
drwxrwxrwt 9 root root 360 Jan 2 20:19 .
drwxr-xr-x 1 root root 1024 Jan 2 20:15 ..
drwx------ 2 root root 40 Jan 2 20:15 .uci
-rw-r--r-- 1 root root 6 Jan 2 20:15 TZ
-rw-r--r-- 1 root root 5 Jan 2 20:15 booting_state
-rw-r--r-- 1 root root 1000 Jan 2 20:19 color1013.yuv.exif
-rw-rw-rw- 1 root root 19 Jan 2 20:19 command
drwxrwxrwx 2 root root 40 Jan 2 20:15 lock
drwxr-xr-x 2 root root 80 Jan 2 20:15 log
lrwxrwxrwx 1 root root 21 Jan 2 20:15 resolv.conf -> /tmp/res
olv.conf.auto
-rw-r--r-- 1 root root 0 Jan 2 20:15 resolv.conf.auto
drwxrwxrwx 2 root root 100 Jan 2 20:15 run
drwxrwxrwt 2 root root 40 Jan 2 20:15 shm
drwxrwxrwx 2 root root 60 Jan 2 20:15 state
drwxr-xr-x 2 root root 40 Jan 2 20:15 tmp
srwxr-xr-x 1 root root 0 Jan 2 20:15 wpa_ctrl_254-32
srwxr-xr-x 1 root root 0 Jan 2 20:15 wpa_ctrl_254-33
-rw-r--r-- 1 root root 2880000 Jan 2 20:19 yuvcolor1013.yuv
可以再开一个adb窗口,adb可以开很多个的^_
Microsoft Windows [版本 6.1.7600]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
C:\Users\Administrator>cd C:\tmp_gc2145
C:\tmp_gc2145>dir
驱动器 C 中的卷是 WIN7B64
卷的序列号是 C43E-FFB3
C:\tmp_gc2145 的目录
2017/05/23 17:04 .
2017/05/23 17:04 ..
0 个文件 0 字节
2 个目录 21,963,571,200 可用字节
获取图片:(这里使用了简单粗暴的方法,全部拿出来了。)
C:\tmp_gc2145>adb pull /tmp/ .
pull: building file list...
skipping special file 'wpa_ctrl_254-33'
skipping special file 'wpa_ctrl_254-32'
skipping special file 'resolv.conf'
skipping special file 'ubus.sock'
pull: /tmp/log/wtmp -> ./log/wtmp
pull: /tmp/log/lastlog -> ./log/lastlog
pull: /tmp/state/network -> ./state/network
pull: /tmp/run/config.md5 -> ./run/config.md5
pull: /tmp/run/ntpd.pid -> ./run/ntpd.pid
pull: /tmp/booting_state -> ./booting_state
pull: /tmp/resolv.conf.auto -> ./resolv.conf.auto
pull: /tmp/TZ -> ./TZ
pull: /tmp/command -> ./command
pull: /tmp/color1013.yuv.exif -> ./color1013.yuv.exif
pull: /tmp/yuvcolor1013.yuv -> ./yuvcolor1013.yuv
11 files pulled. 0 files skipped.
8820 KB/s (2881342 bytes in 0.319s)
C:\tmp_gc2145>
(可选操作:)
C:\tmp_gc2145>adb pull /tmp/yuvcolor1013.yuv c:\
现在激动人心的时刻到来了,你可以使用yuv看图工具:yuvplayer.exe
来查看你所获取的YUV格式的图片:yuvtest1013.yuv
请注意需要设置:
YUV的格式设置:(NV12)
分辨率设置(1600x1200):请以您的实际分辨率为准。
9、可能会用到的调试命令:
dmesg
ps -aux
ps -e
10、可选的改进(可以不修改的):
R:\wyb\gc2145_tinav2.1\target\allwinner\generic\configs\env-3.4.cfg
(uboot启动的时候延迟3秒钟)
bootdelay=3
(SDK中已经修改了。调低打印等级,以便尽可能多的看到打印信息)
loglevel=8