TI 에서 만든 IP Camera 인 DM385 를 사용하는 방법을 다룬다. 정확한 모델명은 Davinci TMDSIPCAM385M34 이다.
SOC 는 ARM 이고 리눅스가 올라가 있다. 디버깅을 위한 시리얼포트와 Ethernet, USB, SDIO, Audio 포트가 나와 있다.
Code Composer Studio(CCS) 설치하기
TI 에서 제공하는 IDE 툴인데, 다운받기 위해서는 등록을 해야 한다.
http://processors.wiki.ti.com/index.php/Category:Code_Composer_Studio_v5 에서 계정을 만든다. 이메일 주소, 이름, 회사명, 개발제품을 적으면 등록 확인 메일이 오고 인증하면 완료다.
내가 받은 버전은 리눅스용으로 현재 가장 최신 버전 CCS5.3.0.00090_linux.tar.gz 을 받았다.
압축을 풀고, 다음을 실행한다.
#./ccs_setup_5.3.0.00090.bin
툴체인 설치하기
http://www.codesourcery.com/sgpp/lite/arm/portal/package4573/public/arm-none-linux-gnueabi/arm-2009q1-203-arm-none-linux-gnueabi.bin 에서 다운로드 받으면 된다.
위 툴체인을 설치하기 위해서는 몇가지 작업이 필요하다.
먼저 X 윈도우 환경이 갖추어져야 한다.
#chmod 777 arm-2009q1-203-arm-none-linux-gnueabi.bin #rm /bin/sh #ln -s /bin/bash /bin/sh #./arm-2009q1-203-arm-none-linux-gnueabi.bin
설치 마법사(?)가 보일 것이다. 설치할 경로를 지정하고(여기서는 /opt/CodeSourcery/arm-2009q1 로 지정), 다음 항목에서 다음을 선택한다.
'Do not modify PATH. and press Next.'
'Select Don't create links and press Next.'
설치를 마쳤다면, PATH 를 걸어준다. .bashrc 파일에 다음을 추가한다.
export PATH=/opt/CodeSourcery/arm-2009q1/bin:$PATH
커널 컴파일 하기
커널의 위치는 'Source/ti_tools/ipnc_psp_arago/kernel' 에 있다.
#apt-get install uboot-mkimage #make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm dm385_evm_defconfig #make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm uImage
빌드 도중 'cmemk.o' 파일이 없다는 에러가 발생한다. 'drivers/char/Makefile' 파일을 아래와 같이 수정한다.
obj-y += mem.o random.o #obj-y += cmemk.o // 주석 처리 obj-$(CONFIG_TTY_PRINTK) += ttyprintk.o
빌드가 성공하면, arch/arm/boot 아래에 커널 바이너리 파일(uImage)이 생성된다.
WiFi 드라이버 빌드를 위한 커널 옵션 설정
WiFi 관련 옵션을 설정하지 않으면, 드라이버 빌드시 에러가 발생한다. 따라서 다음 항목의 옵션을 설정해주어야 한다.
[*] Networking support ---> -*- Wireless ---> <*> cfg80211 - wireless configuration API [*] enable powersave by default (NEW) [*] cfg80211 wireless extensions compatibility (NEW) [*] Wireless extensions sysfs files (NEW) -*- Common routines for IEEE802.11 drivers <*> Generic IEEE 802.11 Networking Stack (mac80211) ... Device Drivers ---> [*] Network device support ---> [*] Wireless LAN ---> <*> IEEE 802.11 for Host AP (Prism2/2.5/3 and WEP/TKIP/CCMP) ... [*] Networking support ---> Networking options ---> <*> 802.1d Ethernet Bridging [*] IGMP/MLD snooping ... [*] Network packet filtering framework (Netfilter) ---> --- Network packet filtering framework (Netfilter) | | | | [ ] Network packet filtering debugging | | | | [*] Advanced netfilter configuration | | | | [*] Bridged IP/ARP packets filtering | | | | Core Netfilter Configuration ---> | | | | < > IP virtual server support ---> | | | | IP: Netfilter Configuration ---> | | | | IPv6: Netfilter Configuration ---> | | | | < > Ethernet Bridge tables (ebtables) support ---> | | | | ... < > Netfilter NFQUEUE over NFNETLINK interface | | | | < > Netfilter LOG over NFNETLINK interface | | | | <*> Netfilter connection tracking support | | | | [ ] Connection mark tracking support | | | | [ ] Connection tracking events | | | | < > DCCP protocol connection tracking support (EXPERIMENTAL) | | | | < > SCTP protocol connection tracking support (EXPERIMENTAL) | | | | < > UDP-Lite protocol connection tracking support | | | | < > Amanda backup protocol support | | | | < > FTP protocol support | | | | < > H.323 protocol support | | | | < > IRC protocol support | | | | < > NetBIOS name service protocol support | | | | < > PPtP protocol support | | | | < > SANE protocol support (EXPERIMENTAL) | | | | < > SIP protocol support | | | | < > TFTP protocol support | | | | < > Connection tracking netlink interface | | | | -*- Netfilter Xtables support (required for ip_tables) | | | | *** Xtables combined modules *** | | | | < > nfmark target and match support | | | | < > ctmark target and match support | | | | *** Xtables targets *** ... <*> IPv4 connection tracking support (required for NAT) | | | | [*] proc/sysctl compatibility with old connection tracking | |