http://www.mangoboard.com/
http://cafe.naver.com/embeddedcrazyboys
(망고210 ) 진저브레드 NOON130 카메라 포팅 방법
베이스 소스는
$ ./build_kernel mango210_7inch_HX8526_mrvl8787_android_defconfig
export ARCH=arm
export CROSS_COMPILE=arm-none-linux-gnueabi-
export PATH=$PATH:/opt/arm-2009q3/bin
$ make menuconfig
Device Drivers --->
<*> Multimedia support --->
[*] Video capture adapters --->
<*> NOON130PC20 Camera Sensor
< > MT9P111 5M Camera Sensor
"arch/arm/mach-s5pv210/mach-mango210.c"
파일에서
static int noon130_power_en_A(int onoff)
{
int err;
/* Camera A */
if(onoff)
{
err = gpio_request(S5PV210_GPJ4(1), "GPJ4");
if (err)
printk(KERN_ERR "failed to request GPJ4 for CAM_2V8\n");
s3c_gpio_setpull(S5PV210_GPJ4(1), S3C_GPIO_PULL_NONE);
gpio_direction_output(S5PV210_GPJ4(1), 1);
gpio_free(S5PV210_GPJ4(1));
err = gpio_request(S5PV210_GPJ4(2), "GPJ4");
if (err)
printk(KERN_ERR "failed to request GPJ4 for CAM_2V8\n");
s3c_gpio_setpull(S5PV210_GPJ4(2), S3C_GPIO_PULL_NONE);
gpio_direction_output(S5PV210_GPJ4(2), 1);
gpio_free(S5PV210_GPJ4(2));
}
else
{
err = gpio_request(S5PV210_GPJ4(1), "GPJ4");
if (err)
printk(KERN_ERR "failed to request GPJ4 for CAM_2V8\n");
s3c_gpio_setpull(S5PV210_GPJ4(1), S3C_GPIO_PULL_NONE);
gpio_direction_output(S5PV210_GPJ4(1), 0);
gpio_free(S5PV210_GPJ4(1));
err = gpio_request(S5PV210_GPJ4(2), "GPJ4");
if (err)
printk(KERN_ERR "failed to request GPJ4 for CAM_2V8\n");
s3c_gpio_setpull(S5PV210_GPJ4(2), S3C_GPIO_PULL_NONE);
gpio_direction_output(S5PV210_GPJ4(2), 0);
gpio_free(S5PV210_GPJ4(2));
}
return 0;
}
추가
static struct s3c_platform_camera noon130pc20 = {
//.id = CAMERA_PAR_B,
.id = CAMERA_PAR_A,
.type = CAM_TYPE_ITU,
.fmt = ITU_601_YCBCR422_8BIT,
.order422 = CAM_ORDER422_8BIT_YCBYCR,
//.i2c_busnum = 1,
.i2c_busnum = 0,
.info = &noon130pc20_i2c_info,
.pixelformat = V4L2_PIX_FMT_YUYV,
//.srclk_name = "mout_mpll",
.srclk_name = "xusbxti",
.clk_name = "sclk_cam",
.clk_rate = 24000000,
.line_length = 1920,
.width = 640,
.height = 480,
.window = {
.left = 0,
.top = 0,
.width = 640,
.height = 480,
},
/* Polarity */
.inv_pclk = 0,
.inv_vsync = 1,
.inv_href = 0,
.inv_hsync = 0,
.initialized = 0,
//.cam_power = noon130pc20_power_en,
.cam_power = noon130_power_en_A,
};
수정
$ ./build_kernel_only
진저 브레드용 sd card를 삽입
CM-V210 : 2, 3, 6 ON
Mango210 : 1, 3, 4 ON
부팅
Uboot 실행 후
MANGO210 # fastboot
Linux PC 에서
# fastboot flash bootloader u-boot.bin
NAND Mode로 부팅을 합니다.
CM-V210 : 1, 6 ON
Mango210 : 1, 2 ON
u-boot 실행 후 아무키나 누른 후
# nand scrub
# fastboot
리눅스 PC에서
$ cd image
$ sudo ./ fastboot-linux.sh
그럼 u-boot , kernel , Android 파일 시스템 Write를 합니다.
부팅 시 카메라는 CAM_A 포트에 연결을 합니다.
부팅 후 카메라 어플을 구동하면 됩니다.
댓글 없음:
댓글 쓰기