디바이스 드라이버 강의 자료입니다.

# u-boot  올리기  (WinIDEA, JTAGProbe 등등 사용)

# Linux Server에서
# xinetd 설치
  yum install -y xinetd
# tftp-server 설치
  yum install -y tftp-server
# 메뉴중에서 '데스크탑->관리->서버설정->서비스' 에서 xinetd와 tftp 활성화
# /tftpboot 디렉토리에 관련 파일들 올리기
# 보안 설정 제거
  system-config-securitylevel
  # Firewall과 SELinux 모두 Disabled로 설정

# 크로스 컴파일러 설정
  tar jxvf arm-linux-tools.tar.bz2
  mkdir /usr/local/arm
  mv 2.95.3 /usr/local/arm
# /etc/profile의 제일 마지막에 한 줄 추가
  PATH=$PATH:/usr/local/arm/2.95.3/bin

# NFS 서버 설정
# nfs 설치
  yum install -y nfs
# 공유할 디렉토리 만들기
  mkdir /srv/host_dir
# /etc/exports 파일에 다음 내용 추가
  /srv/host_dir   *(rw,sync,no_root_squash)
# nfs 재 가동
  service nfs restart

--------------------------------------------
# 보드에서 설정할 내용들
# u-boot에서 설정할 내용
setenv serverip 호스트의 IP 주소
setenv ipaddr 보드의 IP 주소
setenv bootcmd '자동으로 실행할 명령들'
# 예)  setenv bootcmd 't 30800000 ramdisk-rebis.gz; t 32000000 zImage-rebis; go 32000000'
setenv bootdelay 딜레이할 시간(초단위)
saveenv

# 보드에 리눅스가 실행 중일 때
# NFS 설정
# IP 설정
  ifconfig eth0 보드의 IP 주소
# Mount 할 디렉토리 생성
  mkdir /mnt/host
# NFS 파일 시스템 마운트
  mount -t nfs 서버IP주소:/srv/host_dir  /mnt/host

=========================================
# 프로그램 컴파일 및 실행
# 프로그램 작성
# At the Server
vi test.c
>#include 
>int main() {
>	printf("Hello\n");
>	return 0;
>}

# 컴파일 At the server
  arm-linux-gcc test.c -o test
# 컴파일한 파일을 /srv/host_dir 디렉토리에 복사
  cp test  /srv/host_dir

# 실행 at the board
  cd /mnt/host
  ./test



크리에이티브 커먼즈 라이선스
Creative Commons License
Posted by Daniel Kwon