How to modify compiling files to support a new camera?

来源:互联网 发布:加入淘宝游戏交易平台 编辑:程序博客网 时间:2024/06/05 19:58

I got a task for adding a new camera on msm8974 platform, so write something for further use.

Add user-space driver, in “device/yulong/common/coolpad.mk”, follow what other sensor do, for example,

   libmmcamera_imx214 \

   libmmcamera_imx214_R \

   libmmcamera_ov13850 \

   libmmcamera_ov13850_R \

Add chromatix libraries in “vendor/qcom/proprietary/common/config/device-vendor.mk”, see below,

#CONFIG_OV13850 START

MM_CAMERA += libchromatix_ov13850_common                

MM_CAMERA += libchromatix_ov13850_default_video         

MM_CAMERA += libchromatix_ov13850_foxconn_common        

MM_CAMERA += libchromatix_ov13850_foxconn_default_video 

MM_CAMERA += libchromatix_ov13850_foxconn_hfr_120fps   

MM_CAMERA += libchromatix_ov13850_foxconn_hfr_60fps    

MM_CAMERA += libchromatix_ov13850_foxconn_hfr_90fps    

MM_CAMERA += libchromatix_ov13850_foxconn_preview      

MM_CAMERA += libchromatix_ov13850_foxconn_snapshot      

MM_CAMERA += libchromatix_ov13850_hfr_90fps            

MM_CAMERA += libchromatix_ov13850_liveshot             

MM_CAMERA += libchromatix_ov13850_preview

MM_CAMERA += libchromatix_ov13850_snapshot             

MM_CAMERA += libchromatix_ov13850_R_common              

MM_CAMERA += libchromatix_ov13850_R_default_video       

MM_CAMERA += libchromatix_ov13850_R_foxconn_common      

MM_CAMERA += libchromatix_ov13850_R_foxconn_default_video

MM_CAMERA += libchromatix_ov13850_R_foxconn_hfr_120fps 

MM_CAMERA += libchromatix_ov13850_R_foxconn_hfr_60fps 

MM_CAMERA += libchromatix_ov13850_R_foxconn_hfr_90fps  

MM_CAMERA += libchromatix_ov13850_R_foxconn_preview   

MM_CAMERA += libchromatix_ov13850_R_foxconn_snapshot  

MM_CAMERA += libchromatix_ov13850_R_hfr_90fps

MM_CAMERA += libchromatix_ov13850_R_liveshot 

MM_CAMERA += libchromatix_ov13850_R_preview

MM_CAMERA += libchromatix_ov13850_R_snapshot

#CONFIG_OV13850 END

Add kernel-space driver in “kernel/drivers/media/platform/msm/camera_v2/sensor/Makefile”

obj-$(CONFIG_OV13850_R) +=ov13850_R.o

Modify “kernel/arch/arm/configs/ msm8974_defconfig” for a new configuration.

CONFIG_OV13850_R=y

I want to remove old “.config” for compiling, but it’s strange that it isn’t in kernel folder, I find it in “/out/target/product/xxxxx(not disclose project)/obj/KERNEL_OBJ/.config”, but after remove such file, it doesn’t work. I suppose to clean all the project and start a new compiling process, but the project doesn’t allow me to do, finally, I just simply modify the “kernel/drivers/media/platform/msm/camera_v2/sensor/Makefile”

obj-y += ov13850_R.o

Adding a new camera didn’t take much time if you follow other cameras that already exist in compiling chain.

0 0
原创粉丝点击