작성일 : 14-03-06 19:02
TI AM335X SDK 설치하기
|
|
글쓴이 :
이로직…
조회 : 5,563
|
mksd-am335x.sh (1.2K) [81] DATE : 2014-03-06 19:11:13 |
SDK 설치하기
실행 권한 설정
chmod +x ti-sdk-am335x-evm-06.00.00.00-Linux-x86-Install
./ti-sdk-am335x-evm-06.00.00.00-Linux-x86-Install 설치하기
설치하기 실행하면 경로가 지정됨
생성 폴더
bin
board-support
docs
example-applications
filesystem
host-tools
Rules.make
setup.sh
build.sh
생성됨
./seup.sh 실행
./build.sh 실행하면
리눅스 컴파일됨
커널위치
/board-support/linux-3.2.0-psp04.06.00.11/
부트로더 위치
/board-support/u-boot-2013.01.01-psp06.00.00.00
파일 시스템 위치
설치된 SDK/filesystem
PC에서 SD 카드라이트 방법
/mksd-am335x.sh /dev/sde1 MLO u-boot.img uImage 파일시스템
스크립트 파일 내용
#!/bin/bash
if [[ -z $1 || -z $2 || -z $3 || -z $4 ]]
then
echo "mksd-am335x Usage:"
echo " mksd-am335x "
echo " Example: mksd-am335x /dev/sdc MLO u-boot.img uImage nfs.tar.gz"
exit
fi
if ! [[ -e $2 ]]
then
echo "Incorrect MLO location!"
exit
fi
if ! [[ -e $3 ]]
then
echo "Incorrect u-boot.img location!"
exit
fi
if ! [[ -e $4 ]]
then
echo "Incorrect uImage location!"
exit
fi
if ! [[ -e $5 ]]
then
echo "Incorrect rootfs location!"
exit
fi
echo "All data on "$1" now will be destroyed! Continue? [y/n]"
read ans
if ! [ $ans == 'y' ]
then
exit
fi
echo "[Partitioning $1...]"
DRIVE=$1
dd if=/dev/zero of=$DRIVE bs=1024 count=1024
SIZE=`fdisk -l $DRIVE | grep Disk | awk '{print $5}'`
echo DISK SIZE - $SIZE bytes
CYLINDERS=`echo $SIZE/255/63/512 | bc`
echo CYLINDERS - $CYLINDERS
{
echo ,9,0x0C,*
echo ,,,-
} | sfdisk -D -H 255 -S 63 -C $CYLINDERS $DRIVE
echo "[Making filesystems...]"
mkfs.vfat -F 32 -n boot "$1"1 &> /dev/null
mkfs.ext3 -L rootfs "$1"2 &> /dev/null
echo "[Copying files...]"
mount "$1"1 /mnt
cp $2 /mnt/MLO
cp $3 /mnt/u-boot.img
cp $4 /mnt/uImage
umount "$1"1
mount "$1"2 /mnt
tar zxvf $5 -C /mnt &> /dev/null
chmod 755 /mnt
umount "$1"2
echo "[Done]"
|
|
|
|