1. Home
  2. Software Development for MediaTek X20
  3. Camera Porting Guide
  4. 1.M camera driver code path

1.M camera driver code path

1.1 Config file

– kernel-3.18/arch/arm64/configs/<$PROJECT>_debug_defconfig (for Eng load)

– kernel-3.18/arch/arm64/configs/<$PROJECT>_defconfig ( for user load)

– device/mediatek/<$PROJECT>/ProjectConfig.mk

1.2 Kernel driver & build Makefile

[By project]

kernel-3.18/drivers/misc/mediatek/mach/mt6797/<project>/imgsensor/

[By Platform]

kernel-3.18/drivers/misc/mediatek/imgsensor/src/mt6797/

Priority: project > platform

1.3 Kd_sensorlist.c/kd_sensorlist.h

/kernel-3.18/drivers/misc/mediatek/imgsensor/src/<platform>/

1.4 Kd_camera_hw.c/kd_camera_hw.h

kernel-3.18/drivers/misc/mediatek/imgsensor/src/mt6755/camera_project/<project>/camera_hw

1.5 Header files

– kd_imgsensor.h

– kd_imgsensor_errcode.h

– kd_imgsensor_define.h

– kd_camera_feature_id.h

– kd_camera_feature.h

– kd_camera_feature_enum.h

file path:

1) Kernel space

kernel-3.18/drivers/misc/mediatek/imgsensor/inc/kd_imgsensor.h

2) User space

device/mediatek/common/kernel-headers/kd_imgsensor.h

Notice:These files must be the same inuser and kernel space, otherwise you will encounter the io-ctrl error.Why? One rule: Android should not Access Kernel space Source and Header Files directly.

Was this article helpful to you? Yes 2 No

How can we help?