2013년 7월 25일 목요일

S3C6410 Mango64R2 Linux How to Compile and image Fusing



http://www.mangoboard.com/
http://cafe.naver.com/embeddedcrazyboys




S3C6410 Mango64R2 Linux  How to Compile and image Fusing




  1. 망고64R2 Linux How to
[Environment Setting ]
http://cafe.naver.com/embeddedcrazyboys/18501

[Nor Boot u-boot 실행 ]
Mango64 : 1, 3, 5 On
uart, usb otg PC와 연결
[ uart 드라이버 설치 링크 ]
http://www.mangoboard.com/sub2.html?ptype=view&prdcode=1206140001&catcode=120000&page=1&catcode=120000&grp=&brand=&orderby=&searchopt=&searchkey=

터미널 프로그램 ( putty, Tera Term ]
Baudrate : 115200 설정

전원일 인가하면 아래와 같이 출력 됩니다.
Reset by XnRESET[RSTSTAT:0x1]
VCO=1.064GHz

+-----------------------------------------------+
| S3C6410 USB OTG Downloader v0.2 (2008.07.04)  +
| System ID : Revision [ 0], Pass [ 1]          +
+-----------------------------------------------+
ARMCLK: 532.00MHz  HCLKx2: 266.00MHz  HCLK: 133.00MHz  PCLK: 66.50MHz
VIC mode / Sync Mode

USB host is not connected yet.
Waiting for USB host connection.
OTGDEV_InitOtg: OK

!!! USB host is connected !!!
- Bulk In EP : 1
- Bulk Out EP : 2
- Speed : High
- Op Mode : DMA mode

Download & Run is selected

Select a file to download in DNW
If you want to quit, press any key
Select a file to download in DNW
If you want to quit, press any key

0: Download & Run
1: Donwload Only
2: Upload Only
3: Select Op Mode
4: Program AMD NOR Flash
5: Suspend & Resume On/Off
6: Check Suspend Current

Select the function to test : 0
Select a file to download in DNW
If you want to quit, press any key
입력
[Linux PC ]
$ cd image

$ sudo ./smdk-usbdl -f u-boot.bin -a 57e00000

[Window pc 32bit only ]

dnw tool에서
downloader address : 0x57e00000

usb port -> transmit -> transmit 에서 u-boot.bin
선택

u-boot가 실행이 됩니다.



[U-boot Compile ]

$ ./build_uboot

[ Kernel Compile ]

$ ./build_kernel defconfig mango64r2_7inch_mrvl8787_defconfig ; ./build_kernel
[ filesystem ]
# sudo ./mkyaffs2image rootfs rootfs.yaffs2

Nor Booting : 1, 3, 5 ON
[Linux PC ]
usb 드라이버 확인 방법

[icanjji@icanjji-pc image]$ lsusb

Bus 002 Device 016: ID 04e8:1234 Samsung Electronics Co., Ltd
$ cd image

$ sudo ./smdk-usbdl -f u-boot.bin -a 51000000
[Window pc 32bit ]
dnw tool에서
downloader address : 0x57e00000

usb port -> transmit -> transmit 에서 u-boot.bin
선택
nand scrub

dnw 51000000         
# nand erase 0 40000; nand write 51000000 0 40000
u-boot가 nand write가 되었으므로
NAND Mode 로 부팅
Mango64: 1,2,5 ON



[kernel ]



# tftpboot
tftpboot 51000000 zImage;bootm 51000000

## usb otg 로
[ nand write]
- u-boot write
nand erase 0 40000;dnw  51000000 ;nand write 51000000 0 40000
# host pc linux
# sudo ./smdk-usbdl -f u-boot.bin -a 51000000
- kernel write

nand erase 40000 300000;dnw  51000000;nand write 51000000 40000 300000
# host pc linux
# sudo ./smdk-usbdl -f zImage -a 51000000
- filesystem write

nand erase 400000 8000000;dnw  51000000

# host pc linux
# sudo ./smdk-usbdl -f rootfs.yaffs2 -a 51000000

nand write.yaffs 51000000 400000 $(filesize)
" dnw tool" 하는 방법도 있습니다.

[nand boot]
# After u-boot
setenv bootargs "root=/dev/mtdblock2 rootfstype=yaffs2 init=/sbin/init console=ttySAC1,115200"
setenv bootcmd "nand read 50008000 40000 300000;bootm 50008000"
save
reset



[NFS booting ]
NFS 설정
http://cafe.naver.com/embeddedcrazyboys/4421
참조

$ sudo vi /etc/exports

/home/icanjji/work *(rw,no_root_squash,no_all_squash,sync,subtree_check)
/home/icanjji/work 은 자신의 디렉토리 설정

$ sudo /etc/init.d/nfs-kernel-server restart

이더넷을 보드에 연결
$ cd image
$ sudo tar xf rootfs.tgz -C ~/work/nfsroot/rootfs

setenv bootargs "root=/dev/nfs rw nfsroot=192.168.3.9:/home/icanjji/work/nfsroot/rootfs init=/sbin/init ip=192.168.3.20:192.168.3.9:192.168.3.1:255.255.255.0:::off  console=ttySAC1,115200 "
setenv ipaddr 192.168.3.20; setenv gatewayip 192.168.3.1; setenv serverip 192.168.3.9  
ipaddr : 보드
[wifi test ]

$ insmod mlan.ko
$ insmod sd8787.ko
$ ifconfig mlan0 up
$ iwlist mlan0 scan
$ iwconfig mlan0 essid CRZ
$ udhcpc -imlan0

$ ping 192.168.3.1



[camera test]

mknod /dev/video0 c 81 0

./capture
   
Full 화면 프리뷰 시
capture_mt9t111.c 파일에서 아래와 같이 수정

#define PREVIEW_WIDTH       800//640 //320
#define PREVIEW_HEIGHT      480 //240

댓글 없음:

댓글 쓰기