A33双摄的驱动调试

1、先在lichee\tools\pack\chips\config\sys_config.fex 里面的[csi0]节点下,配置双摄

;vip (video input port) configuration
;vip_used: 0:disable 1:enable
;vip_mode: 0:sample one interface to one buffer 1:sample two interface to one buffer
;vip_dev_qty: The quantity of devices linked to capture bus
;
;vip_define_sensor_list: If you want use sensor detect function, please set vip_define_sensor_list = 1, and
;                                    verify that file /system/etc/hawkview/sensor_list_cfg.ini is properly configured!
;
;vip_dev(x)_pos: sensor position, "rear" or "front", if vip_define_sensor_list = 1,vip_dev(x)_pos must be configured!
;
;vip_dev(x)_isp_used 0:not use isp 1:use isp
;vip_dev(x)_fmt: 0:yuv 1:bayer raw rgb
;vip_dev(x)_stby_mode: 0:not shut down power at standby 1:shut down power at standby
;vip_dev(x)_vflip: flip in vertical direction 0:disable 1:enable
;vip_dev(x)_hflip: flip in horizontal direction 0:disable 1:enable
;vip_dev(x)_iovdd: camera module io power handle string, pmu power supply
;vip_dev(x)_iovdd_vol: camera module io power voltage, pmu power supply
;vip_dev(x)_avdd: camera module analog power handle string, pmu power supply
;vip_dev(x)_avdd_vol: camera module analog power voltage, pmu power supply
;vip_dev(x)_dvdd: camera module core power handle string, pmu power supply
;vip_dev(x)_dvdd_vol: camera module core power voltage, pmu power supply
;vip_dev(x)_afvdd: camera module vcm power handle string, pmu power supply
;vip_dev(x)_afvdd_vol: camera module vcm power voltage, pmu power supply
;x indicates the index of the devices which are linked to the same capture bus
;fill voltage in uV, e.g. iovdd = 2.8V, vip_devx_iovdd_vol = 2800000
;fill handle string as below:
;axp22_eldo3
;axp22_dldo4
;axp22_eldo2
;fill handle string "" when not using any pmu power supply

[csi0]

 

vip_used                 = 1  ;是否使用摄像头 0:disable 1:enable
vip_mode                 = 0 ;one interface to one buffer
vip_dev_qty              = 2 ;link to capture bus的设备数量,双摄
vip_define_sensor_list     = 0 ;是否使用了sensor detect功能

;原理图上引脚定义(vip_csi_XX)对应的gpio口(以SOC上的对应的gpio为准,有些小公司硬件出图不严谨)

; port configuration:
; port_name = port:GPIO<mux><pull up/down><driver level><default value>
; mux: GPIO function configuration, 0-input, 1-output, 2+: special funciton for modules
; pull up/down: 1-pull up, 2-pull down
; driver level: 0,1,2,3. 2 is recommended
; default value: default output value when this IO is configured as an output IO


vip_csi_pck              = port:PE00<2><default><default><default>
vip_csi_mck              = port:PE01<2><default><default><default>
vip_csi_hsync            = port:PE02<2><default><default><default>
vip_csi_vsync            = port:PE03<2><default><default><default>
vip_csi_d0               = port:PE04<2><default><default><default>
vip_csi_d1               = port:PE05<2><default><default><default>
vip_csi_d2               = port:PE06<2><default><default><default>
vip_csi_d3               = port:PE07<2><default><default><default>
vip_csi_d4               = port:PE08<2><default><default><default>
vip_csi_d5               = port:PE09<2><default><default><default>
vip_csi_d6               = port:PE10<2><default><default><default>
vip_csi_d7               = port:PE11<2><default><default><default>

 

vip_dev0_mname           = "gc2145r" ;与drive.c中进行匹配的名字
vip_dev0_pos             = "rear" ;.前摄还是后摄
vip_dev0_lane            = 1 ;camera sensor使用的是8 or 10bit的RGB ROW,1lane指只具有一组8bit的RGB ROW 即CSI-D0-D7
vip_dev0_twi_id          = 2 ;原理图上CSI-SCK对应gpio对应的 I2C 组号,sysconfig.fex中的 I2C_CONFIG下的 i2c组号下的used 必须为1 即enable, 该组号下的 I2C_CLK、SDA必须与原理图上的gpio口对应,否则 I2C 无法通信
vip_dev0_twi_addr        = 0x78  ;I2C ADDR
vip_dev0_isp_used        = 0  ;是否使用 ISP
vip_dev0_fmt             = 0 ;输出格式 0:yuv 1:bayer raw rgb
vip_dev0_stby_mode       = 0 ;0:not shut down power at standby 1:shut down power at standby
vip_dev0_vflip           = 0 ;垂直翻转
vip_dev0_hflip           = 0 ;水平翻转
vip_dev0_iovdd           = "axp22_dldo3"
vip_dev0_iovdd_vol       = 2800000 ;
vip_dev0_avdd            = "axp22_ldoio0"             
vip_dev0_avdd_vol        = 2800000
vip_dev0_dvdd            = "axp22_eldo2"
vip_dev0_dvdd_vol        = 1800000
vip_dev0_afvdd           =
vip_dev0_afvdd_vol       =
vip_dev0_power_en        =
vip_dev0_reset           = port:PE16<1><default><default><0> ;reset 引脚对应的 gpio
vip_dev0_pwdn            = port:PE15<1><default><default><1> ;stby对应的gpio
vip_dev0_flash_en        = 
vip_dev0_flash_mode      =
vip_dev0_af_pwdn         =


vip_dev1_mname           = "gc2145f"
vip_dev1_pos             = "front"
vip_dev1_lane            = 1
vip_dev1_twi_id          = 2
vip_dev1_twi_addr        = 0x42
vip_dev1_isp_used        = 0
vip_dev1_fmt             = 0
vip_dev1_stby_mode       = 0
vip_dev1_vflip           = 1
vip_dev1_hflip           = 1
vip_dev1_iovdd           = "axp22_dldo3"
vip_dev1_iovdd_vol       = 2800000
vip_dev1_avdd            = "axp22_ldoio0"
vip_dev1_avdd_vol        = 2800000
vip_dev1_dvdd            = "axp22_eldo2"
vip_dev1_dvdd_vol        = 1800000
vip_dev1_afvdd           =
vip_dev1_afvdd_vol       =
vip_dev1_power_en        =
vip_dev1_reset           = port:PE16<1><default><default><0>
vip_dev1_pwdn            = port:PB03<1><default><default><1> ;前后摄stby对应的gpio不能一样,原理图会给出两个不同的gpio
vip_dev1_flash_en        =
vip_dev1_flash_mode      =
vip_dev1_af_pwdn         =

2、在lichee\linux 3.4\drive\media\video\sunxi_vfe\devices\camera.c 在这目录下添加came drive.c文件,并配置Makefile ,配置Makefile时 用obj -m +=camera.c 便于模块化编译,也便于在android\device\softwinner\aster-m86\init.sun8i.rc 里的modules下添加该camera.ko 开机自动加载。避免配置Kconfig后.config更改又得重新配置linux编译环境

3、如果双摄 I2C ADDR 一样,则会存在冲突,需要在lichee\linux 3.4\drive\media\video\sunxi_vfe\cci_help\cci_help.c下cci_read_a8_d8函数下和cci_write_a8_d8函数下(ADDR 8位,DATA 8位)把其中一个摄像头的 I2C ADDR 右移一位得到msg[0].addr = 0x3c(右移一位后的数据);从而解决了 I2C地址冲突的问题,如果两个摄像头 I2C地址没有冲突,则无需更改

4、lichee\linux-3.4\drivers\media\video\sunxi-vfe\sensorinfo.c里,如果sensor没有注册上时,可以在sensorinfo.c 的sensor_list_t中手动添加

5、android\device\softwinner\astar-m86\configs\camera.cfg中可以配置camera_orientation=180和支持的图片SIZEkey_support_picture_size = 1600x1200

6、android\device\softwinner\polaris-common\hardware\camera\在 hal 层这目录下的

/****************************************************/

HALCameraFactory.cpp:

int HALCameraFactory::getCameraInfo(int camera_id, struct camera_info* info)
{

if (total_num_of_cameras == 2)
 {
  getCallingProcessName(calling_process);
   if(strcmp(calling_process, "com.tencent.devicedemo") == 0)
  {
   LOGE("--------== agSRGERghhq=======857: id = %d", camera_id);
   // cts, mobile qq need facing-back camera
   info->facing = CAMERA_FACING_FRONT;
   info->orientation = 0;
  }

if((strcmp(calling_process, "com.cloudring.magic") == 0))
  {
    LOGE("--------=========857: id = %d", camera_id);
   // cts, mobile qq need facing-back camera
   info->facing = CAMERA_FACING_FRONT;
   info->orientation = 0;
  }

if(strcmp(calling_process, "com.lejent.zuoyeshenqi.afanti") == 0)
  {
   info->facing = CAMERA_FACING_FRONT;
   info->orientation = 0;
   LOGE("--------=========333333: id = %d", camera_id);
  }

if((strcmp(calling_process, "com.android.camera2")== 0))  //»ñÈ¡µ±Ç°°üÃû
    {
    LOGE("77777777777777777777777777\n");
     char prop_value[512]; 
     property_get("sys.product.camera.used", prop_value, "");
        if(atoi(prop_value) == 1)  //Ç¿ÖÆת»»×Ö·ûÀàÐÍΪÕûÐÎ
           {
        // camera_id =0;       //Ç¿ÖÆÐÞ¸ÄÐèÒª´ò¿ªµÄÉãÏñÍ·ID
      info->facing = CAMERA_FACING_BACK;
      info->orientation = 180;
    LOGE("pppppppppppppppppppppppppppp\n");
        }
         else
      {
      //  camera_id =1;
   info->facing = CAMERA_FACING_BACK;
   info->orientation = 0;
       LOGE("yyyyyyyyyyyyyyyyyyyyyyyyyyyyyy\n");
     
      }     
 }

if(strcmp(calling_process, "com.cloudring.picbook") == 0)
  {

    LOGE("--------==com.cloudring.picbook=======857: id = %d", CAMERA_FACING_FRONT);
   // cts, mobile qq need facing-back camera
   info->facing = CAMERA_FACING_FRONT;
   info->orientation = 0;
  }

}

int HALCameraFactory::cameraDeviceOpen(int camera_id, hw_device_t** device)
{

 LOGV("%s: id = %d", __FUNCTION__, camera_id);

 

    *device = NULL;

 

 int total_num_of_cameras = mAttachedCamerasNum + mRemovableCamerasNum;
 char calling_process[256];

    getCallingProcessName(calling_process); 
 if((strcmp(calling_process, "com.android.camera2")== 0) )  //»ñÈ¡µ±Ç°°üÃû
 {
     char prop_value[512]; 
//»ñÈ¡sys.product.camera.used ÊôÐÔ£¬Õâ¸öÊÇͨ¹ýAPP½øÐеÄÉèÖ㬱£´æÔÚprop_value
     property_get("sys.product.camera.used", prop_value, "");
        if(atoi(prop_value) == 1)  //Ç¿ÖÆת»»×Ö·ûÀàÐÍΪÕûÐÎ
        {
         camera_id =0;       //Ç¿ÖÆÐÞ¸ÄÐèÒª´ò¿ªµÄÉãÏñÍ·ID
   LOGE("%s: ----iffffffff---->id = %d", __FUNCTION__, camera_id);
       
        }
         else
      {
   LOGE("%s: ----elssssssssss---->id = %d", __FUNCTION__, camera_id);
        camera_id =1;
     
      }     
 }

}

/****************************************************/

V4L2CameraDevice.cpp中无需添加什么

/****************************************************/

V4L2CameraDevice2.cpp:

添加#include <cutils/properties.h>

int V4L2CameraDevice::setVideoHflip(bool fliped)
{
 F_LOG;
 int ret = -1;
 struct v4l2_control ctrl;
 ctrl.id = V4L2_CID_HFLIP;
 if(fliped){
  LOGD(" set H----->1..\n");
  ctrl.value = 1;
  }
 else{
  LOGD(" set H----->0..\n");
  ctrl.value = 0;
  }
 ret = ioctl(mCameraFd, VIDIOC_S_CTRL, &ctrl);
 if (ret < 0)
  LOGD("setVideoHflip failed, %s", strerror(errno));
 else 
  LOGD("setVideoHflip ok");
 return ret;
}
int V4L2CameraDevice::setVideoVflip(bool fliped)
{
 F_LOG;
 int ret = -1;
 struct v4l2_control ctrl;
 ctrl.id = V4L2_CID_VFLIP;
 if(fliped){
  LOGD(" set V----->1..\n");
  ctrl.value = 1;
  }
 else{
  LOGD(" set V----->0..\n");
  ctrl.value = 0;
  }
 ret = ioctl(mCameraFd, VIDIOC_S_CTRL, &ctrl);
 if (ret < 0)
  LOGD("setVideoVflip failed, %s", strerror(errno));
 else 
  LOGD("setVideoVflip ok");
 return ret;
}

char calling_process_for_qq[256];

       getCallingProcessName(calling_process_for_qq);
    LOGD("calling process: %s", calling_process_for_qq);
    if (strcmp(calling_process_for_qq, "com.Yin.ARTeaching") == 0)
    {
    LOGD("huiben camera facing.............H\n");
  setVideoHflip(0);
  //setVideoVflip(1);
    }
  
    LOGD("calling process: %s", calling_process_for_qq);
    if(strcmp(calling_process_for_qq, "com.cloudring.magic.camera") == 0)
    {
    LOGD("huiben camera facing.............H\n");
  //setVideoHflip(0);
  setVideoVflip(0);
    }
  
  
 
 if((strcmp(calling_process_for_qq, "com.mosca.XBbaike") == 0))
       {
        LOGD("com.mosca.XBbaike camera facing.............H\n");
       // setVideoHflip(0);
       // setVideoVflip(1);
    }
  
   if((strcmp(calling_process_for_qq, "com.lejent.zuoyeshenqi.afanti") == 0))
        {
          setVideoHflip(0);
    }
  
  if((strcmp(calling_process_for_qq, "com.cloudring.magic") == 0))
        {
          setVideoVflip(1);
    LOGE("=====com.cloudring.magic\n");
    }
 
  if((strcmp(calling_process_for_qq, "com.android.camera2")== 0))  //获取当前包名
    {
     char prop_value[512]; 
     property_get("sys.product.camera.used", prop_value, "");
        if(atoi(prop_value) == 1)  //强制转换字符类型为整形
           {
    setVideoVflip(1);
    LOGE("ffffffffffffffffffffffffffff\n");
        }
         else
      {
            setVideoHflip(0);
   LOGE("2222222222222222222222222222222222\n");
      }     
 }
  
 
 
 
  
 if ((strcmp(calling_process_for_qq, "com.cloudring.picbook") == 0))
       {
        LOGD("com.cloudring.picbook camera facing.............H\n");
          setVideoHflip(0);
         // setVideoVflip(0);
    }

 char calling_process_for_qq[256];

      getCallingProcessName(calling_process_for_qq);
   LOGD("calling process: %s", calling_process_for_qq);
   if(strcmp(calling_process_for_qq, "com.Yin.ARTeaching") == 0)
    {
    LOGD("huiben camera facing , rotate");
   setVideoHflip(0);
  //setVideoVflip(1);
    }
  
     LOGD("calling process: %s", calling_process_for_qq);
     if(strcmp(calling_process_for_qq, "com.cloudring.magic.camera") == 0)
    {
    LOGD("huiben camera facing.............H\n");
  //setVideoHflip(0);
  setVideoVflip(0);
    }
  
   
  
  if ((strcmp(calling_process_for_qq, "com.mosca.XBbaike") == 0) )
       {
        LOGD("weixin camera facing.............H\n");
        //setVideoHflip(0);
        //setVideoVflip(1);
    }
  
  if((strcmp(calling_process_for_qq, "com.lejent.zuoyeshenqi.afanti") == 0))
        {
          setVideoHflip(0);
    }
  
  if((strcmp(calling_process_for_qq, "com.cloudring.magic") == 0))
        {
           setVideoVflip(1);
     LOGE("=====com.cloudring.magic\n");
    }
  
  if((strcmp(calling_process_for_qq, "com.android.camera2")== 0))  //获取当前包名
    {
     char prop_value[512]; 
     property_get("sys.product.camera.used", prop_value, "");
        if(atoi(prop_value) == 1)  //强制转换字符类型为整形
           {
     setVideoHflip(1);
        }
         else
      {
            setVideoHflip(0);
   LOGE("2222222222222222222222222222222222\n");
      }     
    }
  
  
  if ((strcmp(calling_process_for_qq, "com.cloudring.picbook") == 0))
       {
        LOGD("com.cloudring.picbook camera facing.............H\n");
          setVideoHflip(0);
       // setVideoVflip(1);
    }

 

7、android\frameworks\base\core\java\android\hardware\Camera.java的修改如下

 Log.e(TAG, "--------call cam :" +packageName );
    
     if(packageName.equals("com.cloudring.picbook")){
     cameraId = 1;
    }
  
    if(packageName.equals("com.Yin.ARTeaching")){
     cameraId = 1;
    }
  
   if(packageName.equals("com.cloudring.magic")){
     cameraId = 0;
   } 

这文件是与上层进行交互的camera的接口函数

hal、framework接口搞好后,camera是可以正常工作了的,如果没有LCD、TP支持,则可以通过连上adb 后由 total control 进行安卓投影,在系统自带的camera apk上测试验证camera是否已经ok

camera的hal、framework还不怎么熟,后续还要跟下camera的整个流程

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论
R58点亮ov5640.txt 开发板:深圳市索智科技有限公司SC3817R开发板,全志R16(CPU:Quad-Core Cortex-A7 CPU) http://www.allwinnertech.com/clq/r/R16.html 全志官网R16的简介 android4.4.2/linux3.4.39 2016/7/18 16:38 1、配置ov5640在android层配置的分辨率为vga(预览/拍照/录像) 注意:系统自带的快拍APP就在这里查找分辨率参数发送到camera的HAL层。 这里得分辨率设置为:640x480 驱动里面搜索可以设置为:2592x1936, 2048x1536, 1600x1200, 1280x960, 1280x960, 1024x768, 1920x1080 ,1280x720, 800x600, 640x480 R:\wyb\wen_ov5640_r16\android\device\softwinner\astar-evb20\configs\camera.cfg ;------------------------------------------------------------------------------- ; 用于camera的配置 ; ; 采用格式: ; key = key_value ; 注意: 每个key需要顶格写; ; key_value紧跟着key后面的等号后面, 位于同一行中; ; key_value限制大小为256字节以内; ; ;------------------------------------------------------------------------------- ;------------------------------------------------------------------------------- ; exif information of "make" and "model" ;------------------------------------------------------------------------------- key_camera_exif_make = MAKE_A31S key_camera_exif_model = MODEL_A31ST ;------------------------------------------------------------------------------- ; 1 for single camera, 2 for double camera ;------------------------------------------------------------------------------- number_of_camera = 1 ;------------------------------------------------------------------------------- ; CAMERA_FACING_BACK ; gc0307 ov2640 ;------------------------------------------------------------------------------- camera_id = 0 ;------------------------------------------------------------------------------- ; 1 for CAMERA_FACING_FRONT ; 0 for CAMERA_FACING_BACK ;------------------------------------------------------------------------------- camera_facing = 0 ;------------------------------------------------------------------------------- ; 1 for camera without isp(using built-in isp of Axx) ; 0 for camera with isp ;------------------------------------------------------------------------------- use_builtin_isp = 0 ;------------------------------------------------------------------------------- ; camera orientation (0, 90, 180, 270) ;------------------------------------------------------------------------------- camera_orientation = 90 ;------------------------------------------------------------------------------- ; driver device name ;------------------------------------------------------------------------------- camera_device = /dev/video0 ;------------------------------------------------------------------------------- ; device id ; for two camera devices with one CSI ;------------------------------------------------------------------------------- device_id = 0 used_preview_size = 1 key_support_preview_size = 640x480 key_default_preview_size = 640x480 used_picture_size = 1 key_support_picture_size = 640x480 key_default_picture_size = 640x480 used_flash_mode = 0 key_support_flash_mode = on,off,auto key_default_flash_mode = on used_color_effect=0 key_support_color_effect = none,mono,negative,sepia,aqua key_default_color_effect = none used_frame_rate = 1 key_support_frame_rate = 10 key_default_frame_rate = 10 used_focus_mode = 0 key_support_focus_mode = auto,infinity,macro,fixed,continuous-video,continuous-picture key_default_focus_mode = auto used_scene_mode = 0 key_support_scene_mode = auto,portrait,landscape,night,night-portrait,theatre,beach,snow,sunset,steadyphoto,fireworks,sports,party,candlelight,barcode key_default_scene_mode = auto used_white_balance = 0 key_support_white_balance = auto,incandescent,fluorescent,warm-fluorescent,daylight,cloudy-daylight key_default_white_balance = auto used_exposure_compensation = 1 key_max_exposure_compensation = 3 key_min_exposure_compensation = -3 key_step_exposure_compensation = 1 key_default_exposure_compensation = 0 2、没有/dev/video1,只有/dev/video0 R:\wyb\wen_ov5640_r16\android\device\softwinner\astar-evb20\ueventd.sun8i.rc /dev/video0 0666 media media #/dev/video1 0666 media media 3、在init.rc(init.sun8i.rc)中加载ov5640.ko这个驱动模块。 R:\wyb\wen_ov5640_r16\android\device\softwinner\astar-evb20\init.sun8i.rc #csi module insmod /system/vendor/modules/videobuf-core.ko insmod /system/vendor/modules/videobuf-dma-contig.ko insmod /system/vendor/modules/cam_detect.ko #insmod /system/vendor/modules/actuator.ko #insmod /system/vendor/modules/ad5820_act.ko insmod /system/vendor/modules/cci.ko insmod /system/vendor/modules/vfe_os.ko insmod /system/vendor/modules/vfe_subdev.ko #insmod /system/vendor/modules/gc0307.ko #insmod /system/vendor/modules/ov2035.ko #insmod /system/vendor/modules/ov2640.ko insmod /system/vendor/modules/ov5640.ko insmod /system/vendor/modules/vfe_v4l2.ko 启动之后实际加载的摄像头的驱动模块: shell@astar-evb20:/ $ lsmod gt82x 9849 0 - Live 0x00000000 bma250 7848 0 - Live 0x00000000 sunxi_schw 12559 0 - Live 0x00000000 (O) rtl8150 9023 0 - Live 0x00000000 sunxi_keyboard 3021 0 - Live 0x00000000 sw_device 13916 0 - Live 0x00000000 vfe_v4l2 445444 1 - Live 0x00000000 ov5640 27129 0 - Live 0x00000000 vfe_subdev 4523 2 vfe_v4l2,ov5640, Live 0x00000000 vfe_os 3951 2 vfe_v4l2,vfe_subdev, Live 0x00000000 cci 21775 2 vfe_v4l2,ov5640, Live 0x00000000 videobuf_dma_contig 5567 1 vfe_v4l2, Live 0x00000000 videobuf_core 16520 2 vfe_v4l2,videobuf_dma_contig, Live 0x00000000 bcm_btlpm 7442 0 - Live 0x00000000 bcmdhd 629907 0 - Live 0x00000000 mali 209314 20 - Live 0x00000000 (O) lcd 41263 0 - Live 0x00000000 disp 992816 8 mali,lcd, Live 0x00000000 nand 282774 0 - Live 0x00000000 (O) shell@astar-evb20:/ $ 4、驱动程序:ov2640.c及其V4L2的适配层。 配置ov2640.c的编译选项,只需要修改device目录中的Makefile打开ov5640(默认打开)即可: R:\wyb\wen_ov5640_r16\lichee\linux-3.4\drivers\media\video\sunxi-vfe\device\ov5640.c R:\wyb\wen_ov5640_r16\lichee\linux-3.4\drivers\media\video\sunxi-vfe\device\Makefile obj-m += ov2640.o R:\wyb\wen_ov5640_r16\lichee\linux-3.4\drivers\media\video\sunxi-vfe\Kconfig R:\wyb\wen_ov5640_r16\lichee\linux-3.4\drivers\media\video\sunxi-vfe\Makefile 5、 R:\wyb\wen_ov5640_r16\lichee\tools\pack\chips\sun8iw5p1\configs\evb-20\sys_config.fex ;-------------------------------------------------------------------------------- ;vip (video input port) configuration ;vip_used: 0:disable 1:enable ;vip_mode: 0:sample one interface to one buffer 1:sample two interface to one buffer ;vip_dev_qty: The quantity of devices linked to capture bus ; ;vip_define_sensor_list: If you want use sensor detect function, please set vip_define_sensor_list = 1, and ; verify that file /system/etc/hawkview/sensor_list_cfg.ini is properly configured! ; ;vip_dev(x)_pos: sensor position, "rear" or "front", if vip_define_sensor_list = 1,vip_dev(x)_pos must be configured! ; ;vip_dev(x)_isp_used 0:not use isp 1:use isp ;vip_dev(x)_fmt: 0:yuv 1:bayer raw rgb ;vip_dev(x)_stby_mode: 0:not shut down power at standby 1:shut down power at standby ;vip_dev(x)_vflip: flip in vertical direction 0:disable 1:enable ;vip_dev(x)_hflip: flip in horizontal direction 0:disable 1:enable ;vip_dev(x)_iovdd: camera module io power handle string, pmu power supply ;vip_dev(x)_iovdd_vol: camera module io power voltage, pmu power supply ;vip_dev(x)_avdd: camera module analog power handle string, pmu power supply ;vip_dev(x)_avdd_vol: camera module analog power voltage, pmu power supply ;vip_dev(x)_dvdd: camera module core power handle string, pmu power supply ;vip_dev(x)_dvdd_vol: camera module core power voltage, pmu power supply ;vip_dev(x)_afvdd: camera module vcm power handle string, pmu power supply ;vip_dev(x)_afvdd_vol: camera module vcm power voltage, pmu power supply ;x indicates the index of the devices which are linked to the same capture bus ;fill voltage in uV, e.g. iovdd = 2.8V, vip_devx_iovdd_vol = 2800000 ;fill handle string as below: ;axp22_eldo3 ;axp22_dldo4 ;axp22_eldo2 ;fill handle string "" when not using any pmu power supply ;-------------------------------------------------------------------------------- [csi0] vip_used = 1 vip_mode = 0 vip_dev_qty = 1 vip_define_sensor_list = 0 vip_csi_pck = port:PE00 vip_csi_mck = port:PE01 vip_csi_hsync = port:PE02 vip_csi_vsync = port:PE03 vip_csi_d0 = port:PE04 vip_csi_d1 = port:PE05 vip_csi_d2 = port:PE06 vip_csi_d3 = port:PE07 vip_csi_d4 = port:PE08 vip_csi_d5 = port:PE09 vip_csi_d6 = port:PE10 vip_csi_d7 = port:PE11 vip_csi_sck = port:PE12 vip_csi_sda = port:PE13 vip_dev0_mname = "ov5640" vip_dev0_pos = "rear" vip_dev0_lane = 1 vip_dev0_twi_id = 2 vip_dev0_twi_addr = 0x78 vip_dev0_isp_used = 0 vip_dev0_fmt = 0 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 vip_dev0_pwdn = port:PE15 vip_dev0_flash_en = vip_dev0_flash_mode = vip_dev0_af_pwdn = 6、开发板上摄像头的I2C挂载在TWI2上面了,逻辑是需要打开的(但是不打开也能够用,很奇怪!): ;---------------------------------------------------------------------------------- ;i2c configuration ; twi_used = twix enable ;---------------------------------------------------------------------------------- [twi0] twi_used = 1 twi_scl = port:PH02 twi_sda = port:PH03 [twi1] twi_used = 1 twi_scl = port:PH04 twi_sda = port:PH05 [twi2] twi_used = 0 twi_scl = port:PE12 twi_sda = port:PE13 直接配置摄像头的I2C了: vip_csi_sck = port:PE12 vip_csi_sda = port:PE13 不过奇怪的是,摄像头并没有向其它平台那样生成这个设备节点: /sys/class/i2c-adapter/i2c-2/2-0030 shell@octopus-f1:/ $ shell@octopus-f1:/ $ cd /sys/class/i2c-adapter/i2c-2/ shell@octopus-f1:/sys/class/i2c-adapter/i2c-2 $ shell@octopus-f1:/sys/class/i2c-adapter/i2c-2 $ ll drwxr-xr-x root root 1970-01-02 08:06 2-003b --w------- root root 4096 1970-01-02 08:06 delete_device lrwxrwxrwx root root 1970-01-02 08:06 device -> ../../twi.2 -r--r--r-- root root 4096 1970-01-02 08:06 name --w------- root root 4096 1970-01-02 08:06 new_device drwxr-xr-x root root 1970-01-02 08:06 power lrwxrwxrwx root root 1970-01-02 08:06 subsystem -> ../../../../bus/i2c -rw-r--r-- root root 4096 1970-01-02 08:06 uevent shell@octopus-f1:/sys/class/i2c-adapter/i2c-2 $ 可能是ov2640的驱动程序不完整,没有通过i2c_detect来注册2-003c这个节点。 直接在驱动程序中读取I2C,还是对的。device ID = 0x5640。 7、摄像头使用的是客户提供: 设置为VGA分辨率是: vsync=7.5hz href=15khz xclk=24mhz pclk=85mhz
索智R16点亮ov2640.txt 开发板:深圳市索智科技有限公司SC3817R开发板,全志R16(CPU:Quad-Core Cortex-A7 CPU) 全志官网R16的简介 android4.4.2/linux3.4.39 2016/7/18 16:38 1、配置ov2640在android层配置的分辨率为vga(预览/拍照/录像) 注意:系统自带的快拍APP就在这里查找分辨率参数发送到camera的HAL层。 这里得分辨率设置为:1280x720 驱动里面搜索可以设置为:1600x1200, 1280x960, 1024x768, 1280x720, 800x600(出错), 640x480 R:\wyb\test_ov2640_r16\android\device\softwinner\astar-evb20\configs\camera.cfg ;------------------------------------------------------------------------------- ; 用于camera的配置 ; ; 采用格式: ; key = key_value ; 注意: 每个key需要顶格写; ; key_value紧跟着key后面的等号后面, 位于同一行中; ; key_value限制大小为256字节以内; ; ;------------------------------------------------------------------------------- ;------------------------------------------------------------------------------- ; exif information of "make" and "model" ;------------------------------------------------------------------------------- key_camera_exif_make = MAKE_A31S key_camera_exif_model = MODEL_A31ST ;------------------------------------------------------------------------------- ; 1 for single camera, 2 for double camera ;------------------------------------------------------------------------------- number_of_camera = 1 ;------------------------------------------------------------------------------- ; CAMERA_FACING_BACK ; gc0307 ov2640 ;------------------------------------------------------------------------------- camera_id = 0 ;------------------------------------------------------------------------------- ; 1 for CAMERA_FACING_FRONT ; 0 for CAMERA_FACING_BACK ;------------------------------------------------------------------------------- camera_facing = 0 ;------------------------------------------------------------------------------- ; 1 for camera without isp(using built-in isp of Axx) ; 0 for camera with isp ;------------------------------------------------------------------------------- use_builtin_isp = 0 ;------------------------------------------------------------------------------- ; camera orientation (0, 90, 180, 270) ;------------------------------------------------------------------------------- camera_orientation = 90 ;------------------------------------------------------------------------------- ; driver device name ;------------------------------------------------------------------------------- camera_device = /dev/video0 ;------------------------------------------------------------------------------- ; device id ; for two camera devices with one CSI ;------------------------------------------------------------------------------- device_id = 0 used_preview_size = 1 key_support_preview_size = 1600x1200, 1280x960, 1024x768, 1280x720, 800x600, 640x480 key_default_preview_size = 1280x720 used_picture_size = 1 key_support_picture_size = 1600x1200, 1280x960, 1024x768, 1280x720, 800x600, 640x480 key_default_picture_size = 1600x1200 used_flash_mode = 0 key_support_flash_mode = on,off,auto key_default_flash_mode = on used_color_effect=0 key_support_color_effect = none,mono,negative,sepia,aqua key_default_color_effect = none used_frame_rate = 1 key_support_frame_rate = 10 key_default_frame_rate = 10 used_focus_mode = 0 key_support_focus_mode = auto,infinity,macro,fixed,continuous-video,continuous-picture key_default_focus_mode = auto used_scene_mode = 0 key_support_scene_mode = auto,portrait,landscape,night,night-portrait,theatre,beach,snow,sunset,steadyphoto,fireworks,sports,party,candlelight,barcode key_default_scene_mode = auto used_white_balance = 0 key_support_white_balance = auto,incandescent,fluorescent,warm-fluorescent,daylight,cloudy-daylight key_default_white_balance = auto used_exposure_compensation = 1 key_max_exposure_compensation = 3 key_min_exposure_compensation = -3 key_step_exposure_compensation = 1 key_default_exposure_compensation = 0 2、没有/dev/video1,只有/dev/video0 R:\wyb\test_ov2640_r16\android\device\softwinner\astar-evb20\ueventd.sun8i.rc /dev/video0 0666 media media #/dev/video1 0666 media media 3、在init.rc(init.sun8i.rc)中加载ov2640.ko这个驱动模块。 R:\wyb\test_ov2640_r16\android\device\softwinner\astar-evb20\init.sun8i.rc #csi module insmod /system/vendor/modules/videobuf-core.ko insmod /system/vendor/modules/videobuf-dma-contig.ko insmod /system/vendor/modules/cam_detect.ko #insmod /system/vendor/modules/actuator.ko #insmod /system/vendor/modules/ad5820_act.ko insmod /system/vendor/modules/cci.ko insmod /system/vendor/modules/vfe_os.ko insmod /system/vendor/modules/vfe_subdev.ko #insmod /system/vendor/modules/gc0307.ko #insmod /system/vendor/modules/ov2035.ko insmod /system/vendor/modules/ov2640.ko insmod /system/vendor/modules/vfe_v4l2.ko 启动之后实际加载的摄像头的驱动模块: shell@astar-evb20:/ $ lsmod gt82x 9849 0 - Live 0x00000000 bma250 7848 0 - Live 0x00000000 sunxi_schw 12559 0 - Live 0x00000000 (O) rtl8150 9023 0 - Live 0x00000000 sunxi_keyboard 3021 0 - Live 0x00000000 sw_device 13916 0 - Live 0x00000000 vfe_v4l2 445444 0 - Live 0x00000000 ov2640 11637 0 - Live 0x00000000 vfe_subdev 4523 2 vfe_v4l2,ov2640, Live 0x00000000 vfe_os 3951 2 vfe_v4l2,vfe_subdev, Live 0x00000000 cci 21775 2 vfe_v4l2,ov2640, Live 0x00000000 videobuf_dma_contig 5567 1 vfe_v4l2, Live 0x00000000 videobuf_core 16520 2 vfe_v4l2,videobuf_dma_contig, Live 0x00000000 bcm_btlpm 7442 0 - Live 0x00000000 bcmdhd 629907 0 - Live 0x00000000 mali 209490 25 - Live 0x00000000 (O) lcd 41263 0 - Live 0x00000000 disp 992816 8 mali,lcd, Live 0x00000000 nand 282774 0 - Live 0x00000000 (O) shell@astar-evb20:/ $ 4、驱动程序:ov2640.c及其V4L2的适配层。 配置ov2640.c的编译选项,只需要修改device目录中的Makefile打开ov2640即可: R:\wyb\test_ov2640_r16\lichee\linux-3.4\drivers\media\video\sunxi-vfe\device\ov2640.c R:\wyb\test_ov2640_r16\lichee\linux-3.4\drivers\media\video\sunxi-vfe\device\Makefile obj-m += ov2640.o R:\wyb\test_ov2640_r16\lichee\linux-3.4\drivers\media\video\sunxi-vfe\Kconfig R:\wyb\test_ov2640_r16\lichee\linux-3.4\drivers\media\video\sunxi-vfe\Makefile 5、 R:\wyb\test_ov2640_r16\lichee\tools\pack\chips\sun8iw5p1\configs\evb-20\sys_config.fex ;-------------------------------------------------------------------------------- ;vip (video input port) configuration ;vip_used: 0:disable 1:enable ;vip_mode: 0:sample one interface to one buffer 1:sample two interface to one buffer ;vip_dev_qty: The quantity of devices linked to capture bus ; ;vip_define_sensor_list: If you want use sensor detect function, please set vip_define_sensor_list = 1, and ; verify that file /system/etc/hawkview/sensor_list_cfg.ini is properly configured! ; ;vip_dev(x)_pos: sensor position, "rear" or "front", if vip_define_sensor_list = 1,vip_dev(x)_pos must be configured! ; ;vip_dev(x)_isp_used 0:not use isp 1:use isp ;vip_dev(x)_fmt: 0:yuv 1:bayer raw rgb ;vip_dev(x)_stby_mode: 0:not shut down power at standby 1:shut down power at standby ;vip_dev(x)_vflip: flip in vertical direction 0:disable 1:enable ;vip_dev(x)_hflip: flip in horizontal direction 0:disable 1:enable ;vip_dev(x)_iovdd: camera module io power handle string, pmu power supply ;vip_dev(x)_iovdd_vol: camera module io power voltage, pmu power supply ;vip_dev(x)_avdd: camera module analog power handle string, pmu power supply ;vip_dev(x)_avdd_vol: camera module analog power voltage, pmu power supply ;vip_dev(x)_dvdd: camera module core power handle string, pmu power supply ;vip_dev(x)_dvdd_vol: camera module core power voltage, pmu power supply ;vip_dev(x)_afvdd: camera module vcm power handle string, pmu power supply ;vip_dev(x)_afvdd_vol: camera module vcm power voltage, pmu power supply ;x indicates the index of the devices which are linked to the same capture bus ;fill voltage in uV, e.g. iovdd = 2.8V, vip_devx_iovdd_vol = 2800000 ;fill handle string as below: ;axp22_eldo3 ;axp22_dldo4 ;axp22_eldo2 ;fill handle string "" when not using any pmu power supply ;-------------------------------------------------------------------------------- [csi0] vip_used = 1 vip_mode = 0 vip_dev_qty = 1 vip_define_sensor_list = 0 vip_csi_pck = port:PE00 vip_csi_mck = port:PE01 vip_csi_hsync = port:PE02 vip_csi_vsync = port:PE03 vip_csi_d0 = port:PE04 vip_csi_d1 = port:PE05 vip_csi_d2 = port:PE06 vip_csi_d3 = port:PE07 vip_csi_d4 = port:PE08 vip_csi_d5 = port:PE09 vip_csi_d6 = port:PE10 vip_csi_d7 = port:PE11 vip_csi_sck = port:PE12 vip_csi_sda = port:PE13 ;vip_dev0_mname = "ov5640" vip_dev0_mname = "ov2640" vip_dev0_pos = "rear" vip_dev0_lane = 1 vip_dev0_twi_id = 2 ;vip_dev0_twi_addr = 0x78 vip_dev0_twi_addr = 0x60 vip_dev0_isp_used = 0 vip_dev0_fmt = 0 vip_dev0_stby_mode = 0 vip_dev0_vflip = 0 vip_dev0_hflip = 0 vip_dev0_iovdd = "axp22_dldo3" vip_dev0_iovdd_vol = 3300000 vip_dev0_avdd = "" vip_dev0_avdd_vol = 3300000 vip_dev0_dvdd = "" vip_dev0_dvdd_vol = 1800000 vip_dev0_afvdd = "" vip_dev0_afvdd_vol = 3300000 vip_dev0_power_en = vip_dev0_reset = port:PE14 vip_dev0_pwdn = port:PE15 vip_dev0_flash_en = vip_dev0_flash_mode = vip_dev0_af_pwdn = 6、开发板上摄像头的I2C挂载在TWI2上面了,逻辑是需要打开的(但是不打开也能够用,很奇怪!): ;---------------------------------------------------------------------------------- ;i2c configuration ; twi_used = twix enable ;---------------------------------------------------------------------------------- [twi0] twi_used = 1 twi_scl = port:PH02 twi_sda = port:PH03 [twi1] twi_used = 1 twi_scl = port:PH04 twi_sda = port:PH05 [twi2] twi_used = 0 twi_scl = port:PE12 twi_sda = port:PE13 直接配置摄像头的I2C了: vip_csi_sck = port:PE12 vip_csi_sda = port:PE13 不过奇怪的是,摄像头并没有向其它平台那样生成这个设备节点: /sys/class/i2c-adapter/i2c-2/2-0030 shell@octopus-f1:/ $ shell@octopus-f1:/ $ cd /sys/class/i2c-adapter/i2c-2/ shell@octopus-f1:/sys/class/i2c-adapter/i2c-2 $ shell@octopus-f1:/sys/class/i2c-adapter/i2c-2 $ ll drwxr-xr-x root root 1970-01-02 08:06 2-003b --w------- root root 4096 1970-01-02 08:06 delete_device lrwxrwxrwx root root 1970-01-02 08:06 device -> ../../twi.2 -r--r--r-- root root 4096 1970-01-02 08:06 name --w------- root root 4096 1970-01-02 08:06 new_device drwxr-xr-x root root 1970-01-02 08:06 power lrwxrwxrwx root root 1970-01-02 08:06 subsystem -> ../../../../bus/i2c -rw-r--r-- root root 4096 1970-01-02 08:06 uevent shell@octopus-f1:/sys/class/i2c-adapter/i2c-2 $ 可能是ov2640的驱动程序不完整,没有通过i2c_detect来注册2-0030这个节点。 直接在驱动程序中读取I2C,还是对的。device ID = 0x2642。 7、奇葩的问题: 摄像头使用的是: http://www.waveshare.net/shop/OV2640-Camera-Board.htm OV2640 Camera Board vsync=15HZ,XCLK=24MHZ。href/pclk都有 camera打开摄像头是绿色屏幕(VGA分辨率),但是右上角貌似出来一点点图像。 后来使用示波器的探头挂在vsync之后,图像正常。 由于开发板和摄像头模组ov2640是飞线链接,硬件另外接了一个地,然后用纸胶布将地线和vsync捆绑在在一起,解决问题。 刚开始摄像头的3.3V电源使用的是g-sensor的(VCC-3V0),看见图像出现竖条纹(电源纹波干扰),接回来(VCC-3V0-CSI)就正常了。
wen_ov5640_r16_20161114_1744后插入UVC可以打开ov5640和USB摄像头.7z 20161114全志R16配置为前ov5640后UVC的双摄像头 1、 Z:\home\wwt\uvc_r16_project\android\device\softwinner\astar-evb20\configs\camera.cfg 修改: number_of_camera = 1 为: number_of_camera = 2 如果不改这里,兄弟,你在camera这个APP里面是绝对看不到前后摄像头的切换选项的!!!!^_ 修改ov5640的分辨率: used_preview_size = 1 key_support_preview_size = 640x480 key_default_preview_size = 640x480 used_picture_size = 1 key_support_picture_size = 640x480 key_default_picture_size = 640x480 为(根据你驱动里面的摄像头的寄存器配置分辨率而实际修改): used_preview_size = 1 key_support_preview_size = 2592x1936, 2048x1536, 1600x1200, 1280x960, 1280x960, 1024x768, 1920x1080 ,1280x720, 800x600, 640x480 key_default_preview_size = 640x480 used_picture_size = 1 key_support_picture_size = 2592x1936, 2048x1536, 1600x1200, 1280x960, 1280x960, 1024x768, 1920x1080 ,1280x720, 800x600, 640x480 key_default_picture_size = 640x480 2、 Z:\home\wwt\uvc_r16_project\android\device\softwinner\astar-evb20\astar_evb20.mk #include device/softwinner/polaris-common/prebuild/google/products/gms_minimal.mk 注释掉这里干掉Google Play。可以不改。 3、这里讲UVC配置为模块了,请注意UVC所需要的模块的加载顺序。 Z:\home\wwt\uvc_r16_project\android\device\softwinner\astar-evb20\init.sun8i.rc 默认为: #csi module insmod /system/vendor/modules/videobuf-core.ko insmod /system/vendor/modules/videobuf-dma-contig.ko insmod /system/vendor/modules/cam_detect.ko # insmod /system/vendor/modules/actuator.ko # insmod /system/vendor/modules/ad5820_act.ko insmod /system/vendor/modules/cci.ko insmod /system/vendor/modules/vfe_os.ko insmod /system/vendor/modules/vfe_subdev.ko insmod /system/vendor/modules/gc0307.ko # insmod /system/vendor/modules/ov2035.ko insmod /system/vendor/modules/vfe_v4l2.ko 修改为: #csi module # /dev/video0 ov5640 insmod /system/vendor/modules/videobuf-core.ko insmod /system/vendor/modules/videobuf-dma-contig.ko #insmod /system/vendor/modules/cam_detect.ko insmod /system/vendor/modules/cci.ko insmod /system/vendor/modules/vfe_os.ko insmod /system/vendor/modules/vfe_subdev.ko insmod /system/vendor/modules/ov5640.ko insmod /system/vendor/modules/vfe_v4l2.ko # /dev/video1 uvc insmod /system/vendor/modules/videobuf2-core.ko insmod /system/vendor/modules/videobuf2-memops.ko insmod /system/vendor/modules/videobuf2-vmalloc.ko insmod /system/vendor/modules/uvcvideo.ko 4、 Z:\home\wwt\uvc_r16_project\lichee\tools\pack\chips\sun8iw5p1\configs\default\env.cfg 推荐修改: bootdelay=0 为: bootdelay=3 5、不用修改: Z:\home\wwt\uvc_r16_project\lichee\tools\pack\chips\sun8iw5p1\configs\evb-20\sys_config.fex ;-------------------------------------------------------------------------------- ;vip (video input port) configuration ;vip_used: 0:disable 1:enable ;vip_mode: 0:sample one interface to one buffer 1:sample two interface to one buffer ;vip_dev_qty: The quantity of devices linked to capture bus ; ;vip_define_sensor_list: If you want use sensor detect function, please set vip_define_sensor_list = 1, and ; verify that file /system/etc/hawkview/sensor_list_cfg.ini is properly configured! ; ;vip_dev(x)_pos: sensor position, "rear" or "front", if vip_define_sensor_list = 1,vip_dev(x)_pos must be configured! ; ;vip_dev(x)_isp_used 0:not use isp 1:use isp ;vip_dev(x)_fmt: 0:yuv 1:bayer raw rgb ;vip_dev(x)_stby_mode: 0:not shut down power at standby 1:shut down power at standby ;vip_dev(x)_vflip: flip in vertical direction 0:disable 1:enable ;vip_dev(x)_hflip: flip in horizontal direction 0:disable 1:enable ;vip_dev(x)_iovdd: camera module io power handle string, pmu power supply ;vip_dev(x)_iovdd_vol: camera module io power voltage, pmu power supply ;vip_dev(x)_avdd: camera module analog power handle string, pmu power supply ;vip_dev(x)_avdd_vol: camera module analog power voltage, pmu power supply ;vip_dev(x)_dvdd: camera module core power handle string, pmu power supply ;vip_dev(x)_dvdd_vol: camera module core power voltage, pmu power supply ;vip_dev(x)_afvdd: camera module vcm power handle string, pmu power supply ;vip_dev(x)_afvdd_vol: camera module vcm power voltage, pmu power supply ;x indicates the index of the devices which are linked to the same capture bus ;fill voltage in uV, e.g. iovdd = 2.8V, vip_devx_iovdd_vol = 2800000 ;fill handle string as below: ;axp22_eldo3 ;axp22_dldo4 ;axp22_eldo2 ;fill handle string "" when not using any pmu power supply ;-------------------------------------------------------------------------------- [csi0] vip_used = 1 vip_mode = 0 vip_dev_qty = 1 vip_define_sensor_list = 0 vip_csi_pck = port:PE00 vip_csi_mck = port:PE01 vip_csi_hsync = port:PE02 vip_csi_vsync = port:PE03 vip_csi_d0 = port:PE04 vip_csi_d1 = port:PE05 vip_csi_d2 = port:PE06 vip_csi_d3 = port:PE07 vip_csi_d4 = port:PE08 vip_csi_d5 = port:PE09 vip_csi_d6 = port:PE10 vip_csi_d7 = port:PE11 vip_csi_sck = port:PE12 vip_csi_sda = port:PE13 vip_dev0_mname = "ov5640" vip_dev0_pos = "rear" vip_dev0_lane = 1 vip_dev0_twi_id = 2 vip_dev0_twi_addr = 0x78 vip_dev0_isp_used = 0 vip_dev0_fmt = 0 vip_dev0_stby_mode = 1 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 vip_dev0_pwdn = port:PE15 vip_dev0_flash_en = vip_dev0_flash_mode = vip_dev0_af_pwdn = [usbc1] usb_used = 1 usb_drv_vbus_gpio = port:PD12 usb_restrict_gpio = usb_host_init_state = 1 usb_restric_flag = 0 usb_regulator_io = "nocare" usb_regulator_vol = 0 usb_not_suspend = 0 编译内核之后, rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/lichee$ ./build.sh config Welcome to mkscript setup progress All available chips: 0. sun8iw5p1 Choice: 0 All available platforms: 0. android 1. dragonboard 2. linux 3. tina Choice: 0 All available kernel: 0. linux-3.4 Choice: 0 All available boards: 0. bell-one 1. evb 2. evb-20 3. evb-rtl8723bs 4. sc3813r Choice: 2 rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/lichee$ ./build.sh 配置USB摄像头为模块(也可以选择*直接编译进内核): rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/lichee$ cd linux-3.4/ rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/lichee/linux-3.4$ make ARCH=arm menuconfig Device Drivers ---> Multimedia support ---> [*] Video capture adapters ---> 修改: [ ] V4L USB devices ---> 为: [*] V4L USB devices ---> 修改: USB Video Class (UVC) (NEW) 为 USB Video Class (UVC) rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/lichee$ cd linux-3.4/ rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/lichee/linux-3.4$ cd .. rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/lichee$ rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/lichee$ ./build.sh rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/lichee$ cd ../android/ rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/android$ source build/envsetup.sh including device/softwinner/bellone-sc3813r/vendorsetup.sh including device/softwinner/astar-evb20/vendorsetup.sh including device/softwinner/r16-bell-one/vendorsetup.sh including device/softwinner/astar-evb/vendorsetup.sh including device/softwinner/polaris-common/vendorsetup.sh including device/lge/mako/vendorsetup.sh including device/lge/hammerhead/vendorsetup.sh including device/samsung/manta/vendorsetup.sh including device/generic/x86/vendorsetup.sh including device/generic/mips/vendorsetup.sh including device/generic/armv7-a-neon/vendorsetup.sh including device/asus/tilapia/vendorsetup.sh including device/asus/deb/vendorsetup.sh including device/asus/grouper/vendorsetup.sh including device/asus/flo/vendorsetup.sh including sdk/bash_completion/adb.bash rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/android$ lunch You're building on Linux Lunch menu... pick a combo: 1. aosp_arm-eng 2. aosp_x86-eng 3. aosp_mips-eng 4. vbox_x86-eng 5. bellone_sc3813r-eng 6. astar_evb20-eng 7. r16_bell_one-eng 8. astar_evb-eng 9. aosp_mako-userdebug 10. aosp_hammerhead-userdebug 11. aosp_manta-userdebug 12. mini_x86-userdebug 13. mini_mips-userdebug 14. mini_armv7a_neon-userdebug 15. aosp_tilapia-userdebug 16. aosp_deb-userdebug 17. aosp_grouper-userdebug 18. aosp_flo-userdebug Which would you like? [aosp_arm-eng] 6 ============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=4.4.2 TARGET_PRODUCT=astar_evb20 TARGET_BUILD_VARIANT=eng TARGET_BUILD_TYPE=release TARGET_BUILD_APPS= TARGET_ARCH=arm TARGET_ARCH_VARIANT=armv7-a-neon TARGET_CPU_VARIANT=cortex-a7 HOST_ARCH=x86 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=KVT49L OUT_DIR=out ============================================ rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/android$ extract-bsp rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/android$ make -j12 rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/android$ pack 编译好系统之后,刷机之后请注意先让开发板的Android4.4启动完成之后再插入USB摄像头。 全志R16的android4.4启动之后再插入USB摄像头。 这个配置就可以设置 ov5640为后置摄像头:/dev/video0 UVC为前置摄像头:/dev/video1 如果接上USB摄像头再启动,android是被: ov5640为前置摄像头,有设备节点/dev/video1,打开失败。 UVC为后置摄像头:/dev/video0 原因未知。 参考资料: http://blog.csdn.net/u010257920/article/details/49925807 A20 linux(dragonboard)同时使用Parallel CSI Camera及UVC http://blog.csdn.net/guoyihoney/article/details/46966603 A20平台增加camera http://blog.csdn.net/it_fish_man/article/details/17395469 Android usb camera设备添加 http://blog.csdn.net/zmnqazqaz/article/details/49535531 RK3288 uvc摄像头调试 http://blog.csdn.net/edsam49/article/details/8886543 USB Camera在android车机上应用前景及初试小结
调通sina33下的AP6212A0版本的BT 大文实验室/大文哥 壹捌陆捌零陆捌捌陆捌贰 wb4916 AT qq.com 完成时间:2017/6/26 11:01 版本:V1.0 本文参照: 《A33 wifi移植说明书.pdf》 还有就是全志R16的parrotv1.1的官方SDK(Android4.4.2) 1、打开AP6212的BT,关闭rtl8723bs的BT: [ 3.141273] Bluetooth: HCI UART driver ver 2.2 [ 3.146210] Bluetooth: HCI H4 protocol initialized [ 3.151563] Bluetooth: HCI BCSP protocol initialized [ 3.157154] usbcore: registered new interface driver btusb [ 3.163282] Bluetooth: Generic Bluetooth SDIO driver ver 0.1 [ 3.169599] Bluetooth: BlueSleep Mode Driver Ver 1.1 [ 3.175402] Bluetooth: get rtl8723bs rtl8723bs_bt_host_wake gpio failed [ 3.953017] Bluetooth: RFCOMM TTY layer initialized [ 3.958456] Bluetooth: RFCOMM socket layer initialized [ 3.964183] Bluetooth: RFCOMM ver 1.11 [ 3.968340] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 3.968638] [mmc]: sdc2 set ios: clk 25000000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 3.968734] [mmc]: mclk 0xf1c20090 0xc100000b [ 3.989421] Bluetooth: BNEP filters: protocol multicast [ 3.995242] Bluetooth: HIDP (Human Interface Emulation) ver 1.2 [ 4.001921] L2TP core driver, V2.0 [ 4.005706] PPPoL2TP kernel driver, V2.0 [ 4.010070] L2TP IP encapsulation support (L2TPv3) [ 4.015468] L2TP netlink interface [ 4.019264] L2TP ethernet pseudowire support (L2TPv3) [ 4.023860] [mmc]: sdc2 set ios: clk 25000000Hz bm PP pm ON vdd 3.3V width 1 timing MMC-HS(SDR20) dt B [ 4.023929] [mmc]: mclk 0xf1c20090 0xc100000b [ 4.040272] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5 [ 4.048780] ThumbEE CPU extension supported. [ 4.053550] Registering SWP/SWPB emulation handler [ 4.059269] [rfkill]: rfkill set power 1 [ 4.063652] gpio ap6xxx_bt_regon set val 0, act val 0 rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r$ ll rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ ./build.sh config Welcome to mkscript setup progress All available chips: 0. sun8iw5p1 Choice: 0 All available platforms: 0. android 1. dragonboard 2. linux Choice: 0 All available kernel: 0. linux-3.4 Choice: 0 All available boards: 0. evb 1. maple 2. redwood 3. y2 4. y3 Choice: 4 rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ cd linux-3.4/ rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4$ make ARCH=arm menuconfig [*] Networking support ---> <*> Bluetooth subsystem support ---> Bluetooth device drivers ---> < > Broadcom Bluetooth Low Power Manager Support <*> Realtek Bluesleep driver support 修改为: <*> Broadcom Bluetooth Low Power Manager Support < > An inverter between bt hostwake pin and cpu (NEW) < > Realtek Bluesleep driver support 2、(这个不修改:) R:\wyb\ap6212a0_a33_sc3817r\android\device\softwinner\astar-y3\overlay\frameworks\base\core\res\res\values\config.xml <!-- List of regexpressions describing the interface (if any) that represent tetherable Wifi interfaces. If the device doesn't want to support tethering over Wifi this should be empty. An example would be "softap.*" --> <string-array translatable="false" name="config_tether_wifi_regexs"> <item>"wlan0"</item> </string-array> <!-- List of regexpressions describing the interface (if any) that represent tetherable bluetooth interfaces. If the device doesn't want to support tethering over bluetooth this should be empty. --> <!-- default: disable Bluetooth PAN feature --> <string-array translatable="false" name="config_tether_bluetooth_regexs"> <item>"bt-pan"</item> </string-array> 3、 R:\wyb\ap6212a0_a33_sc3817r\android\device\softwinner\astar-y3\astar_y3.mk # ap6181/6210/6330 sdio wifi fw and nvram #$(call inherit-product-if-exists, hardware/broadcom/wlan/firmware/ap6181/device-bcm.mk) #$(call inherit-product-if-exists, hardware/broadcom/wlan/firmware/ap6210/device-bcm.mk) $(call inherit-product-if-exists, hardware/broadcom/wlan/firmware/ap6212/device-bcm.mk) #$(call inherit-product-if-exists, hardware/broadcom/wlan/firmware/ap6330/device-bcm.mk) #rtl8723bs bt fw and config #$(call inherit-product, hardware/realtek/bluetooth/rtl8723bs/firmware/rtlbtfw_cfg.mk) # camera config for camera detector #PRODUCT_COPY_FILES += \ # device/softwinner/astar-y3/hawkview/sensor_list_cfg.ini:system/etc/hawkview/sensor_list_cfg.ini #add gms features #PRODUCT_COPY_FILES += \ # frameworks/native/data/etc/android.hardware.faketouch.xml:system/etc/permissions/android.hardware.faketouch.xml \ # frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \ # frameworks/native/data/etc/android.hardware.usb.host.xml:system/etc/permissions/android.hardware.usb.host.xml # 3G Data Card Packages #PRODUCT_PACKAGES += \ # u3gmonitor \ # chat \ # rild \ # pppd # 3G Data Card Configuration Flie #PRODUCT_COPY_FILES += \ # device/softwinner/polaris-common/rild/ip-down:system/etc/ppp/ip-down \ # device/softwinner/polaris-common/rild/ip-up:system/etc/ppp/ip-up \ # device/softwinner/polaris-common/rild/3g_dongle.cfg:system/etc/3g_dongle.cfg \ # device/softwinner/polaris-common/rild/usb_modeswitch:system/bin/usb_modeswitch \ # device/softwinner/polaris-common/rild/call-pppd:system/xbin/call-pppd \ # device/softwinner/polaris-common/rild/usb_modeswitch.sh:system/xbin/usb_modeswitch.sh \ # device/softwinner/polaris-common/rild/apns-conf_sdk.xml:system/etc/apns-conf.xml \ # device/softwinner/polaris-common/rild/libsoftwinner-ril.so:system/lib/libsoftwinner-ril.so #PRODUCT_COPY_FILES += \ # device/softwinner/polaris-common/rild/init.3gdongle.rc:root/init.sunxi.3gdongle.rc # 3G Data Card usb modeswitch File #PRODUCT_COPY_FILES += \ # $(call find-copy-subdir-files,*,device/softwinner/polaris-common/rild/usb_modeswitch.d,system/etc/usb_modeswitch.d) PRODUCT_PROPERTY_OVERRIDES += \ ro.sw.embeded.telephony = false PRODUCT_PROPERTY_OVERRIDES += \ persist.sys.timezone=Asia/Shanghai \ persist.sys.language=zh \ persist.sys.country=CN PRODUCT_PACKAGES += Bluetooth #PRODUCT_PROPERTY_OVERRIDES += \ # ro.product.8723b_bt.used=true #GPS Feature #PRODUCT_PACKAGES += gps.polaris #BOARD_USES_GPS_TYPE := simulator #PRODUCT_COPY_FILES += frameworks/native/data/etc/android.hardware.location.xml:system/etc/permissions/android.hardware.location.xml # evb logger PRODUCT_COPY_FILES += \ device/softwinner/astar-y3/tools/logger.sh:system/bin/logger.sh PRODUCT_PROPERTY_OVERRIDES += \ persist.sys.usb.config=mass_storage,adb \ ro.adb.secure=0 ro.udisk.lable=Polaris \ ro.font.scale=1.0 \ ro.hwa.force=false \ rw.logger=0 \ ro.sys.bootfast=true \ debug.hwc.showfps=0 \ debug.hwui.render_dirty_regions=false #ro.sys.storage_type = emulated \ #for gms #PRODUCT_PROPERTY_OVERRIDES += \ # ro.sys.mutedrm=true \ # ro.adb.secure=1 PRODUCT_PROPERTY_OVERRIDES += \ ro.sf.lcd_density=213 \ ro.product.firmware=v2.0 $(call inherit-product-if-exists, device/softwinner/astar-y3/modules/modules.mk) DEVICE_PACKAGE_OVERLAYS := device/softwinner/astar-y3/overlay PRODUCT_CHARACTERISTICS := tablet # Overrides PRODUCT_AAPT_CONFIG := xlarge hdpi xhdpi large PRODUCT_AAPT_PREF_CONFIG := xhdpi PRODUCT_BRAND := Allwinner PRODUCT_NAME := astar_y3 PRODUCT_DEVICE := astar-y3 PRODUCT_MODEL := QUAD-CORE A33 y3 PRODUCT_MANUFACTURER := softwinner #include device/softwinner/polaris-common/prebuild/google/products/gms_base.mk 4、 R:\wyb\ap6212a0_a33_sc3817r\android\device\softwinner\astar-y3\BoardConfig.mk # wifi and bt configuration # 1. Wifi Configuration # 1.1 realtek wifi support # 1.1 realtek wifi configuration #BOARD_WIFI_VENDOR := realtek ifeq ($(BOARD_WIFI_VENDOR), realtek) WPA_SUPPLICANT_VERSION := VER_0_8_X BOARD_WPA_SUPPLICANT_DRIVER := NL80211 BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_rtl BOARD_HOSTAPD_DRIVER := NL80211 BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_rtl SW_BOARD_USR_WIFI := rtl8188eu BOARD_WLAN_DEVICE := rtl8188eu #SW_BOARD_USR_WIFI := rtl8723au #BOARD_WLAN_DEVICE := rtl8723au #SW_BOARD_USR_WIFI := rtl8723bs #BOARD_WLAN_DEVICE := rtl8723bs endif # 1.2 broadcom wifi support BOARD_WIFI_VENDOR := broadcom ifeq ($(BOARD_WIFI_VENDOR), broadcom) BOARD_WPA_SUPPLICANT_DRIVER := NL80211 WPA_SUPPLICANT_VERSION := VER_0_8_X BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_bcmdhd BOARD_HOSTAPD_DRIVER := NL80211 BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_bcmdhd BOARD_WLAN_DEVICE := bcmdhd WIFI_DRIVER_FW_PATH_PARAM := "/sys/module/bcmdhd/parameters/firmware_path" #SW_BOARD_USR_WIFI := AP6181 #SW_BOARD_USR_WIFI := AP6210 #WIFI_DRIVER_FW_PATH_STA := "/system/vendor/modules/fw_bcm40181a2.bin" #WIFI_DRIVER_FW_PATH_P2P := "/system/vendor/modules/fw_bcm40181a2_p2p.bin" #WIFI_DRIVER_FW_PATH_AP := "/system/vendor/modules/fw_bcm40181a2_apsta.bin" # 2017/6/21 15:11 wenyuanbo configure ap6212 use ap6210 SW_BOARD_USR_WIFI := AP6212 WIFI_DRIVER_FW_PATH_STA := "/system/vendor/modules/fw_bcm43438a0.bin" WIFI_DRIVER_FW_PATH_P2P := "/system/vendor/modules/fw_bcm43438a0_p2p.bin" WIFI_DRIVER_FW_PATH_AP := "/system/vendor/modules/fw_bcm43438a0_apsta.bin" #SW_BOARD_USR_WIFI := AP6330 #WIFI_DRIVER_FW_PATH_STA := "/system/vendor/modules/fw_bcm40183b2_ag.bin" #WIFI_DRIVER_FW_PATH_P2P := "/system/vendor/modules/fw_bcm40183b2_ag_p2p.bin" #WIFI_DRIVER_FW_PATH_AP := "/system/vendor/modules/fw_bcm40183b2_ag_apsta.bin" endif #1.3 eag wifi config #BOARD_WIFI_VENDOR := eagle ifeq ($(BOARD_WIFI_VENDOR), eagle) WPA_SUPPLICANT_VERSION := VER_0_8_X BOARD_WPA_SUPPLICANT_DRIVER := NL80211 BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_eagle BOARD_HOSTAPD_DRIVER := NL80211 BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_eagle SW_BOARD_USR_WIFI := esp8089 BOARD_WLAN_DEVICE := esp8089 endif # 2. Bluetooth Configuration # make sure BOARD_HAVE_BLUETOOTH is true for every bt vendor BOARD_HAVE_BLUETOOTH := true BOARD_HAVE_BLUETOOTH_BCM := true #SW_BOARD_HAVE_BLUETOOTH_NAME := ap6210 SW_BOARD_HAVE_BLUETOOTH_NAME := ap6212 #SW_BOARD_HAVE_BLUETOOTH_NAME := ap6330 #BOARD_HAVE_BLUETOOTH_RTK := true #BLUETOOTH_HCI_USE_RTK_H5 := true #SW_BOARD_HAVE_BLUETOOTH_NAME := rtl8723bs 5、 R:\wyb\ap6212a0_a33_sc3817r\android\device\softwinner\astar-y3\init.sun8i.rc on early-fs mount_all /fstab.sun8i setprop ro.crypto.fuse_sdcard true insmod /system/vendor/modules/disp.ko insmod /system/vendor/modules/lcd.ko insmod /system/vendor/modules/mali.ko insmod /system/vendor/modules/leds-sunxi.ko insmod /system/vendor/modules/bcmdhd.ko insmod /system/vendor/modules/bcm_btlpm.ko #2G or 3G init.rc # import init.sunxi.3gdongle.rc ## 1. realtek & eagle wifi service ## 1.1 realtek & eagle wifi sta service #service wpa_supplicant /system/bin/wpa_supplicant \ # -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ # -O/data/misc/wifi/sockets \ # -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 # # we will start as root and wpa_supplicant will switch to user wifi # # after setting up the capabilities required for WEXT # # user wifi # # group wifi inet keystore # class main # socket wpa_wlan0 dgram 660 wifi wifi # disabled # oneshot # ## 1.2 realtek & eagle wifi sta p2p concurrent service #service p2p_supplicant /system/bin/wpa_supplicant \ # -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \ # -e/data/misc/wifi/entropy.bin -N \ # -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ # -O/data/misc/wifi/sockets \ # -g@android:wpa_wlan0 # class main # socket wpa_wlan0 dgram 660 wifi wifi # disabled # oneshot # 2. broadcom wifi service # 2.1 broadcom wifi station and softap service wpa_supplicant /system/bin/wpa_supplicant \ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ -I/system/etc/wifi/wpa_supplicant_overlay.conf \ -O/data/misc/wifi/sockets \ -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 # we will start as root and wpa_supplicant will switch to user wifi # after setting up the capabilities required for WEXT # user wifi # group wifi inet keystore class main socket wpa_wlan0 dgram 660 wifi wifi disabled oneshot # 2.2 broadcom wifi sta p2p concurrent service service p2p_supplicant /system/bin/wpa_supplicant \ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ -I/system/etc/wifi/wpa_supplicant_overlay.conf \ -O/data/misc/wifi/sockets -N \ -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \ -I/system/etc/wifi/p2p_supplicant_overlay.conf \ -puse_p2p_group_interface=1 -e/data/misc/wifi/entropy.bin \ -g@android:wpa_wlan0 # we will start as root and wpa_supplicant will switch to user wifi # after setting up the capabilities required for WEXT # user wifi # group wifi inet keystore class main socket wpa_wlan0 dgram 660 wifi wifi disabled oneshot 6、(不需要修改) R:\wyb\ap6212a0_a33_sc3817r\android\device\softwinner\astar-y3\ueventd.sun8i.rc 7、 R:\wyb\ap6212a0_a33_sc3817r\android\frameworks\base\packages\SettingsProvider\res\values\defaults.xml <integer name="def_screen_off_timeout">1800000</integer> <bool name="def_lockscreen_disabled">true</bool> 8、 R:\wyb\ap6212a0_a33_sc3817r\android\frameworks\base\services\java\com\android\server\BatteryService.java // private static final boolean DEBUG = false; private static final boolean DEBUG = true; private void sendIntentLocked() { // Pack up the values and broadcast them to everyone final Intent intent = new Intent(Intent.ACTION_BATTERY_CHANGED); intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY | Intent.FLAG_RECEIVER_REPLACE_PENDING); int icon = getIconLocked(mBatteryProps.batteryLevel); intent.putExtra(BatteryManager.EXTRA_STATUS, mBatteryProps.batteryStatus); intent.putExtra(BatteryManager.EXTRA_HEALTH, mBatteryProps.batteryHealth); intent.putExtra(BatteryManager.EXTRA_PRESENT, mBatteryProps.batteryPresent); //intent.putExtra(BatteryManager.EXTRA_LEVEL, mBatteryProps.batteryLevel); intent.putExtra(BatteryManager.EXTRA_LEVEL, 100); intent.putExtra(BatteryManager.EXTRA_SCALE, BATTERY_SCALE); intent.putExtra(BatteryManager.EXTRA_ICON_SMALL, icon); intent.putExtra(BatteryManager.EXTRA_PLUGGED, mPlugType); //intent.putExtra(BatteryManager.EXTRA_VOLTAGE, mBatteryProps.batteryVoltage); intent.putExtra(BatteryManager.EXTRA_VOLTAGE, 4200); intent.putExtra(BatteryManager.EXTRA_TEMPERATURE, mBatteryProps.batteryTemperature); intent.putExtra(BatteryManager.EXTRA_TECHNOLOGY, mBatteryProps.batteryTechnology); intent.putExtra(BatteryManager.EXTRA_INVALID_CHARGER, mInvalidCharger); if (DEBUG) { Slog.d(TAG, "2016/12/05 10:41 wenyuanbo **** Sending ACTION_BATTERY_CHANGED. level:" + mBatteryProps.batteryLevel + ", scale:" + BATTERY_SCALE + ", status:" + mBatteryProps.batteryStatus + ", health:" + mBatteryProps.batteryHealth + ", present:" + mBatteryProps.batteryPresent + ", voltage: " + mBatteryProps.batteryVoltage + ", temperature: " + mBatteryProps.batteryTemperature + ", technology: " + mBatteryProps.batteryTechnology + ", AC powered:" + mBatteryProps.chargerAcOnline + ", USB powered:" + mBatteryProps.chargerUsbOnline + ", Wireless powered:" + mBatteryProps.chargerWirelessOnline + ", icon:" + icon + ", invalid charger:" + mInvalidCharger); } mHandler.post(new Runnable() { @Override public void run() { ActivityManagerNative.broadcastStickyIntent(intent, null, UserHandle.USER_ALL); } }); } 9、(直接拷贝同目录下的ap6210:) R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\libbt\conf\softwinner\ap6212\Android.mk LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := bt_vendor.conf LOCAL_MODULE_CLASS := ETC LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/bluetooth LOCAL_MODULE_TAGS := eng LOCAL_SRC_FILES := $(LOCAL_MODULE) include $(BUILD_PREBUILT) R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\libbt\conf\softwinner\ap6212\bt_vendor.conf # UART device port where Bluetooth controller is attached UartPort = /dev/ttyS1 # Firmware patch file location FwPatchFilePath = /system/vendor/modules/ # Firmware Name FwPatchFileName = bcm43438a0.hcd 10、新增:vnd_astar-y3-ap6212.txt,直接拷贝:vnd_astar-y2-ap6210.txt R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\libbt\include\vnd_astar-y3-ap6212.txt R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\libbt\include\vnd_astar-y2-ap6210.txt BLUETOOTH_UART_DEVICE_PORT = "/dev/ttyS1" FW_PATCHFILE_LOCATION = "/system/vendor/modules/" LPM_IDLE_TIMEOUT_MULTIPLE = 5 UART_TARGET_BAUD_RATE = 1500000 BT_WAKE_VIA_PROC = TRUE #LPM_SLEEP_MODE = FALSE BTVND_DBG = TRUE BTHW_DBG = TRUE VNDUSERIAL_DBG = TRUE UPIO_DBG = TRUE 11、 R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\libbt\src\userial_vendor.c //#ifdef USE_AP6210_BT_MODULE #if defined(USE_AP6210_BT_MODULE) || defined(USE_AP6212_BT_MODULE) /* PATCH for AP6210. Will detect CTS(module side) to select transport mode*/ ALOGE("userial vendor open: USE AP6210 BT MODULE."); usleep(100000); close(vnd_userial.fd); if ((vnd_userial.fd = open(vnd_userial.port_name, O_RDWR)) == -1) { ALOGE("userial vendor open: unable to open %s", vnd_userial.port_name); return -1; } #endif //USE_AP6210_BT_MODULE 12、 R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\libbt\Android.mk ifeq ($(SW_BOARD_HAVE_BLUETOOTH_NAME), ap6210) LOCAL_CFLAGS += -DUSE_AP6210_BT_MODULE endif ifeq ($(SW_BOARD_HAVE_BLUETOOTH_NAME), ap6212) LOCAL_CFLAGS += -DUSE_AP6212_BT_MODULE endif ifeq ($(SW_BOARD_HAVE_BLUETOOTH_NAME), ap6330) include $(LOCAL_PATH)/conf/softwinner/ap6330/Android.mk endif ifeq ($(SW_BOARD_HAVE_BLUETOOTH_NAME), ap6210) include $(LOCAL_PATH)/conf/softwinner/ap6210/Android.mk endif ifeq ($(SW_BOARD_HAVE_BLUETOOTH_NAME), ap6212) include $(LOCAL_PATH)/conf/softwinner/ap6212/Android.mk endif 13、 R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\libbt\vnd_buildcfg.mk ifeq ($(SW_BOARD_HAVE_BLUETOOTH_NAME), ap6210) SRC := $(call my-dir)/include/$(addprefix vnd_, $(addsuffix -ap6210.txt,$(basename $(TARGET_DEVICE)))) endif ifeq ($(SW_BOARD_HAVE_BLUETOOTH_NAME), ap6212) SRC := $(call my-dir)/include/$(addprefix vnd_, $(addsuffix -ap6212.txt,$(basename $(TARGET_DEVICE)))) endif 14、(这些AP6212的WIFI的bin文件和BT的hcd文件来自全志R16的SDK,当然也可以找正基原厂/代理商索取:) R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\wlan\firmware\ap6212\bcm43438a0.hcd (根据ap6210修改:) R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\wlan\firmware\ap6212\device-bcm.mk # # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ######################## -include hardware/broadcom/wlan/bcmdhd/config/config-bcm.mk PRODUCT_COPY_FILES += \ hardware/broadcom/wlan/firmware/ap6212/fw_bcm43438a0.bin:system/vendor/modules/fw_bcm43438a0.bin \ hardware/broadcom/wlan/firmware/ap6212/fw_bcm43438a0_apsta.bin:system/vendor/modules/fw_bcm43438a0_apsta.bin \ hardware/broadcom/wlan/firmware/ap6212/fw_bcm43438a0_p2p.bin:system/vendor/modules/fw_bcm43438a0_p2p.bin \ hardware/broadcom/wlan/firmware/ap6212/nvram_ap6212.txt:system/vendor/modules/nvram_ap6212.txt \ hardware/broadcom/wlan/firmware/ap6212/bcm43438a0.hcd:system/vendor/modules/bcm43438a0.hcd #hardware/broadcom/wlan/firmware/ap6212/config.txt:system/vendor/modules/config.txt ######################## R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\wlan\firmware\ap6212\fw_bcm43438a0.bin R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\wlan\firmware\ap6212\fw_bcm43438a0_apsta.bin R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\wlan\firmware\ap6212\fw_bcm43438a0_p2p.bin R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\wlan\firmware\ap6212\nvram_ap6212.txt 15、(可选修改:) R:\wyb\ap6212a0_a33_sc3817r\android\packages\apps\Camera2\src\com\android\camera\CameraActivity.java private BroadcastReceiver mBatteryInfoReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if (Intent.ACTION_BATTERY_CHANGED.equals(action)) { int Level = intent.getIntExtra("level", 0); int Scale = intent.getIntExtra("scale", 100); Log.w(TAG, "2016/11/29 19:54 &&&& wenyuanbo battery Level" + Level); /* *Logic: *1.the battery level is lower then 5%. *2.if in camera, make sure that not in the snapshot progress. *3.if in videocamera, make sure that not in the videorecording progress. *4.everytime starting the camera activity, the battery level is broadcasted, * if meeting the conditions above, give a dialog, press it and finish the activity. *5.if the conditions are not satisfied when started, play for a moment, in the camera acitvity * or video camera activity, the conditiosn are satisfied, also give a dialog for finishing the activity. * *by fuqiang. */ if(Level < 5) { Runnable runnable_close_camera = new Runnable() { @Override public void run() { //close the camera. // CameraActivity.this.finish(); } }; Log.w(TAG, "2016/11/29 18:20 **** wenyuanbo battery Level" + Level); showLocationDialog(); } /* *Logic: *1.the battery level is lhigher then 5% and lower than 15%. *2.if in camera, make sure that not in the snapshot progress. *3.if in videocamera, make sure that not in the videorecording progress. *4.whether in camera or in videocamera, make sure that the flash mode is supported. *5.everytime starting the camera activity, the battery level is broadcasted, * if meeting the conditions above, forbidden the flash(gray icon), give a dialog to notise user. *6.if the conditions are not satisfied when started, play for a moment, in the camera acitvity * or video camera activity, the conditiosn are satisfied, forbidden the flash and give a notice dialog. *7.the dialog is only given once for each camera activity starting. * *by fuqiang. */ else if(Level < 16) { //close the flash mode. /* if (mIsLowBatteryDialogShown == false) { mRotateDialog.showAlertDialog( getString(R.string.warning), getString(R.string.low_battery_15), null, null, getString(R.string.close), null); mIsLowBatteryDialogShown = true; } */ } } } }; 16、(可选:) R:\wyb\ap6212a0_a33_sc3817r\lichee\tools\pack\chips\sun8iw5p1\configs\default\env.cfg bootdelay=3 loglevel=8 17、 R:\wyb\ap6212a0_a33_sc3817r\lichee\tools\pack\chips\sun8iw5p1\configs\y3\sys_config.fex [power_sply] dcdc1_vol = 3000 dcdc2_vol = 1100 dcdc3_vol = 1200 dcdc4_vol = 0 dcdc5_vol = 1500 aldo1_vol = 3300 aldo2_vol = 2500 aldo3_vol = 3000 dldo1_vol = 3300 dldo2_vol = 3300 dldo3_vol = 2800 ;gpio0_vol = 2800 ldoio0_vol = 2800 ;---------------------------------------------------------------------------------- ;uart configuration ;uart_used = uart x enable ;uart_type = 2:2 wire,4:4 wire,8:8 wire, full function ;---------------------------------------------------------------------------------- [uart0] uart_used = 1 uart_port = 0 uart_type = 2 uart_tx = port:PF02<3><1><default><default> uart_rx = port:PF04<3><1><default><default> [uart1] uart_used = 1 uart_port = 1 uart_type = 4 uart_tx = port:PG06<2><1><default><default> uart_rx = port:PG07<2><1><default><default> uart_rts = port:PG08<2><1><default><default> uart_cts = port:PG09<2><1><default><default> [uart2] uart_used = 1 uart_type = 4 uart_tx = port:PB00<2><1><default><default> uart_rx = port:PB01<2><1><default><default> uart_rts = port:PB02<2><1><default><default> uart_cts = port:PB03<2><1><default><default> [uart3] uart_used = 0 uart_type = 4 uart_tx = port:PH06<3><1><default><default> uart_rx = port:PH07<3><1><default><default> uart_rts = port:PH08<3><1><default><default> uart_cts = port:PH09<3><1><default><default> [uart4] uart_used = 0 uart_port = 4 uart_type = 2 uart_tx = port:PA04<2><1><default><default> uart_rx = port:PA05<2><1><default><default> uart_rts = port:PA06<2><1><default><default> uart_cts = port:PA07<2><1><default><default> ;---------------------------------------------------------------------------------- ;capacitor tp configuration ;ctp_twi_id : twi controller ID ;ctp_twi_addr : I2C slave address, 7bit ;ctp_screen_max_x/_y : resolution of touch panel ;ctp_revert_x/_y_flag : whether need to revert x/y ;ctp_exchange_x_y_flag: whether need to exchange the value of x and y ;ctp_int_port : port for tp's interrupt signal ;ctp_wakeup : port for wakeup tp ;---------------------------------------------------------------------------------- [ctp_para] ctp_used = 1 ctp_name = "gt82x" ctp_twi_id = 0 ctp_twi_addr = 0x5d ctp_screen_max_x = 1280 ctp_screen_max_y = 800 ctp_revert_x_flag = 1 ctp_revert_y_flag = 1 ctp_exchange_x_y_flag = 1 ctp_int_port = port:PL04<4><default><default><default> ctp_wakeup = port:PL03<1><default><default><1> ctp_power_ldo = ctp_power_ldo_vol = ctp_power_io = ;-------------------------------------------------------------------------------- ; CTP automatic detection configuration ;ctp_detect_used --- Whether startup automatic inspection function. 1:used,0:unused ;Module name postposition 1 said detection, 0 means no detection. ;-------------------------------------------------------------------------------- [ctp_list_para] ctp_det_used = 1 ft5x_ts = 1 gt82x = 1 gslX680 = 1 gslX680new = 0 gt9xx_ts = 1 gt9xxf_ts = 0 tu_ts = 0 gt818_ts = 1 zet622x = 1 aw5306_ts = 1 icn83xx_ts = 0 [lcd0_para] lcd_used = 1 lcd_driver_name = "default_lcd" lcd_if = 3 lcd_x = 1280 lcd_y = 800 lcd_width = 150 lcd_height = 94 lcd_dclk_freq = 71 lcd_pwm_used = 1 lcd_pwm_ch = 0 lcd_pwm_freq = 50000 lcd_pwm_pol = 1 lcd_hbp = 20 lcd_ht = 1418 lcd_hspw = 10 lcd_vbp = 10 lcd_vt = 830 lcd_vspw = 5 lcd_lvds_if = 0 lcd_lvds_colordepth = 1 lcd_lvds_mode = 0 lcd_frm = 1 lcd_gamma_en = 0 lcd_bright_curve_en = 0 lcd_cmap_en = 0 deu_mode = 0 lcdgamma4iep = 22 smart_color = 90 lcd_bl_en = port:PD13<1><0><default><1> ;ap6xxx_wl_regon = port:PL06<1><default><default><0> ;lcd_bl_en = port:PL06<1><0><default><1> lcd_power = "axp22_dc1sw" lcdd0 = port:PD18<3><0><default><default> lcdd1 = port:PD19<3><0><default><default> lcdd2 = port:PD20<3><0><default><default> lcdd3 = port:PD21<3><0><default><default> lcdd4 = port:PD22<3><0><default><default> lcdd5 = port:PD23<3><0><default><default> lcdd6 = port:PD24<3><0><default><default> lcdd7 = port:PD25<3><0><default><default> lcdd8 = port:PD26<3><0><default><default> lcdd9 = port:PD27<3><0><default><default> ;---------------------------------------------------------------------------------- ;pwm config ;---------------------------------------------------------------------------------- [pwm0_para] pwm_used = 0 pwm_positive = port:PH00<2><0><default><default> [pwm1_para] pwm_used = 1 pwm_positive = port:PH01<2><0><default><default> ;-------------------------------------------------------------------------------- ;wifi configuration ;wifi_sdc_id: 0- SDC0, 1- SDC1, 2- SDC2, 3- SDC3 ;wifi_usbc_id: 0- USB0, 1- USB1, 2- USB2 ;wifi_usbc_type: 1- EHCI(speed 2.0), 2- OHCI(speed 1.0) ;wifi_mod_sel: 0- none, 1- ap6181, 2- ap6210(wifi+bt), ; 3 - rtl8188eu, 4- rtl8723au(wifi+bt), ; 5 - rtl8723bs, 6- esp8089 ;-------------------------------------------------------------------------------- [wifi_para] wifi_used = 1 wifi_sdc_id = 1 wifi_usbc_id = 1 wifi_usbc_type = 1 wifi_mod_sel = 2 wifi_power = "axp22_dldo1" wifi_power_ext1 = "axp22_dldo2" wifi_power_ext2 = "axp22_aldo1" wifi_power_switch = ;wifi_power_switch = port:power0<1><0><default><0> ; 1 - ap6181 sdio wifi gpio config ;ap6xxx_wl_regon = port:PL06<1><default><default><0> ;ap6xxx_wl_host_wake = port:PL07<4><default><default><0> ;ap6xxx_lpo_use_apclk = 1 ; 2 - ap6210 sdio wifi gpio config ap6xxx_wl_regon = port:PL06<1><default><default><0> ;ap6xxx_wl_regon = port:PD13<1><default><default><0> ap6xxx_wl_host_wake = port:PL07<4><default><default><0> ap6xxx_bt_regon = port:PL08<1><default><default><0> ap6xxx_bt_wake = port:PL10<1><default><default><0> ap6xxx_bt_host_wake = port:PL09<4><default><default><0> ap6xxx_lpo_use_apclk = 1 ; 3 - rtl8188eu usb wifi gpio conifg ; 4 - rtl8723au usb wifi + bt ; 5 - rtl8723bs sdio wifi + bt ;rtl8723bs_chip_en = port:PL11<1><default><default><0> ;rtl8723bs_wl_regon = port:PL06<1><default><default><0> ;rtl8723bs_wl_host_wake = port:PL07<4><default><default><0> ;rtl8723bs_bt_regon = port:PL08<1><default><default><0> ;rtl8723bs_bt_wake = port:PL10<1><default><default><0> ;rtl8723bs_bt_host_wake = port:PL09<4><default><default><0> ;rtl8723bs_lpo_use_apclk = 0 ; 6 - eagle sdio wifi ;esp_wl_chip_en = port:PL03<1><default><default><0> ;esp_wl_rst = port:PL02<1><default><default><0> ;-------------------------------------------------------------------------------- ;blue tooth ;bt_used ---- blue tooth used (0- no used, 1- used) ;bt_uard_id ---- uart index ;-------------------------------------------------------------------------------- [bt_para] bt_used = 1 bt_uart_id = 1 power_start = 3 pmu_temp_enable = 0 18、 刷机之后,BT可以用。 传输4.5MB的JPG图片大概需要2分钟。 WIFI: 在设置→WLAN(打开之后): shell@astar-y3:/ $ shell@astar-y3:/ $ [ 469.609956] init: computing context for service '/system/bin/wpa_supplicant' [ 469.618386] init: starting 'p2p_supplicant' [ 469.625739] init: Created socket '/dev/socket/wpa_wlan0' with mode '660', user '1010', group '1010' [ 469.673379] init: waitpid returned pid 2065, status = 0000ff00 [ 469.679923] init: process 'p2p_supplicant', pid 2065 exited [ 476.197334] sndpcm_unmute,line:1099 [ 451.464755] CPU1: Booted secondary processor [ 478.459403] CPU1: shutdown [ 478.462947] [hotplug]: cpu(0) try to kill cpu(1) [ 478.468478] [hotplug]: cpu1 is killed! . shell@astar-y3:/ $ 分析启动的log: [ 17.526849] gpio ap6xxx_wl_regon set val 1, act val 1 [ 17.632508] [ap6xxx]: sdio wifi power state: on [ 17.637576] [mmc]: sdc1 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 17.637751] =========== WLAN placed in POWER ON ======== [ 17.654651] [mmc]: sdc1 card_power_on start... [ 17.659576] [mmc]: sdc1 power_supply is null [ 17.664322] [mmc]: sdc1 card_power_on ok [ 17.680039] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 17.690275] [mmc]: mclk 0xf1c2008c 0x8002000e [ 17.772361] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !! [ 17.781309] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !! [ 17.789448] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 17.799714] [mmc]: mclk 0xf1c2008c 0x8002000e [ 17.862032] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 17.872262] [mmc]: mclk 0xf1c2008c 0x8002000e [ 17.933953] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 8, RTO !! [ 17.941997] *******************Try sdio******************* [ 17.948400] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 17.958630] [mmc]: mclk 0xf1c2008c 0x8002000e [ 18.027775] mmc1: queuing unknown CIS tuple 0x80 (2 bytes) [ 18.035416] mmc1: queuing unknown CIS tuple 0x80 (3 bytes) [ 18.043087] mmc1: queuing unknown CIS tuple 0x80 (3 bytes) [ 18.051920] mmc1: queuing unknown CIS tuple 0x80 (7 bytes) [ 18.145287] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing SD-HS(SDR25) dt B [ 18.155436] [mmc]: mclk 0xf1c2008c 0x8002000e [ 18.215346] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 1 timing SD-HS(SDR25) dt B [ 18.225736] [mmc]: mclk 0xf1c2008c 0x8100000b [ 18.285675] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B [ 18.296021] [mmc]: mclk 0xf1c2008c 0x8140030b [ 18.357915] mmc1: new high speed SDIO card at address 0001 [ 18.364532] bcmsdh_register: Linux Kernel SDIO/MMC Driver [ 18.364575] *******************sdio init ok******************* [ 18.377207] bcm_wlan_get_oob_irq enter. [ 18.381537] gpio [359] map to virq [7] ok [ 18.388851] F1 signature OK, socitype:0x1 chip:0xa9a6 rev:0x0 pkg:0x4 [ 18.396019] dhdsdio_probe_attach: unsupported chip: 0xa9a6 [ 18.402155] dhdsdio_probe: dhdsdio_probe_attach failed [ 18.407899] bcmsdh_probe: device attach failed [ 18.412981] [ 18.412984] Dongle Host Driver, version 1.88.45.3 (r420671) [ 18.412989] Compiled in drivers/net/wireless/bcmdhd on Jun 26 2017 at 12:06:39 [ 18.428835] dhd_module_init: sdio_register_driver timeout or error [ 18.435928] gpio ap6xxx_wl_regon set val 0, act val 0 [ 18.541549] [ap6xxx]: sdio wifi power state: off [ 18.546679] =========== WLAN placed in POWER OFF ======== [ 18.546915] mmc1: card 0001 removed [ 18.546995] [mmc]: mmc not poweroff notifiy [ 18.547007] [mmc]: sdc1 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 18.547160] [mmc]: sdc1 card_power_off start... [ 18.547166] [mmc]: sdc1 power_supply is null [ 18.547173] [mmc]: sdc1 card_power_off ok [ 18.631655] init: command 'insmod' r=-1 [ 18.636066] init: command 'insmod' r=-1 [ 18.658010] fs_mgr: swapon failed for /dev/block/zram0 [ 18.663804] init: command 'swapon_all' r=-1 [ 18.668504] init: processing action 0x58e70 (console_init) [ 18.675396] init: width = 1280 [ 18.678788] init: height = 800 [ 18.682224] init: s.st_size = 3145728 [ 18.686308] init: logo match failed!fbsize = 4096000 [ 18.718811] init: command 'console_init' r=0 [ 18.723628] init: processing action 0x55bf0 (fs) [ 18.730640] init: command 'mkdir' r=-2 [ 18.741901] init: command 'insmod' r=0 [ 18.752227] init: command 'insmod' r=0 [ 18.756491] init: command 'insmod' r=-1 [ 18.771211] init: command 'insmod' r=0 [ 18.779731] init: command 'insmod' r=0 [ 18.791739] init: command 'insmod' r=0 [ 18.803941] init: command 'insmod' r=0 [ 18.816178] init: command 'insmod' r=0 19、查找:(dhdsdio_probe_attach: unsupported chip: 0xa9a6) rootroot@rootroot-E400:~$ cd wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd/ rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$ rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$ grep "unsupported chip" . -R ./dhd_sdio.c: DHD_ERROR(("%s: unsupported chip: 0xx\n", ./sbutils.c: SI_ERROR(("sb_chip2numcores: unsupported chip 0x%x\n", 匹配到二进制文件 ./dhd_sdio.o 匹配到二进制文件 ./bcmdhd.o 匹配到二进制文件 ./bcmdhd.ko 匹配到二进制文件 ./sbutils.o rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

zeropoint127

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

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

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

打赏作者

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

抵扣说明:

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

余额充值