環境搭建
PC 系統
Ubuntu 或 CentOS。推薦 Ubuntu 14.04、16.04。
安裝必要工具
HOST# sudo apt-get install git build-essential python diffstat texinfo gawk chrpath dos2unix wget unzip socat doxygen libc6:i386 libncurses5:i386 libstdc++6:i386 libz1:i386
更換默認 shell 爲 bash
HOST# sudo dpkg-reconfigure dash
執行後選擇 NO,不要使用原本默認的 dash。
下載構建工具鏈並執行構建
下載構建工具鏈
HOST# git clone git://arago-project.org/git/projects/oe-layersetup.git tisdk
這是 TI 的 arago project,其中使用了 OpenEmbedded、Yocto Project 的成果。這正是開源軟件的魅力之處。
初始化工作環境
HOST# cd tisdk
HOST# ./oe-layertool-setup.sh -f configs/processor-sdk/processor-sdk-04.03.00.05-config.txt
這個過程將根據配置下載許多 OE 資源,clone Git 倉庫並切換到對應的分支的具體 commit。
修復配置
HOST# cd build
HOST# cat >> ./conf/local.conf << 'EOF'
TI_MIRROR = "http://software-dl.ti.com/processor-sdk-mirror/sources/"
MIRRORS += " \
bzr://.*/.* ${TI_MIRROR} \n \
cvs://.*/.* ${TI_MIRROR} \n \
git://.*/.* ${TI_MIRROR} \n \
gitsm://.*/.* ${TI_MIRROR} \n \
hg://.*/.* ${TI_MIRROR} \n \
osc://.*/.* ${TI_MIRROR} \n \
p4://.*/.* ${TI_MIRROR} \n \
npm://.*/.* ${TI_MIRROR} \n \
ftp://.*/.* ${TI_MIRROR} \n \
https?$://.*/.* ${TI_MIRROR} \n \
svn://.*/.* ${TI_MIRROR} \n \
"
EOF
這是由於最近的一些倉庫服務器變動的原因,需修復其造成的影響。
執行構建
HOST# . conf/setenv
HOST# export PATH=$HOME/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf/bin:$PATH
以下兩個可選,第一個構建整個 SDK 開發環境,包括文件系統。第二個只構建文件系統。
HOST# MACHINE=am57xx-evm bitbake arago-core-tisdk-image
HOST# MACHINE=am57xx-evm bitbaketisdk-rootfs-image
後續補充講解如何新增 layer 來定製文件系統。
參考
Processor SDK Linux 04_03_00_05 用戶手冊:http://software-dl.ti.com/processor-sdk-linux/esd/docs/04_03_00_05/linux/Overview.html#id13
OpenEmbedded: https://www.openembedded.org/wiki/Main_Page
Yocto Project:https://www.yoctoproject.org/
Arago Project:http://arago-project.org/wiki/index.php/Main_Page
2020年4月30日