這次 Shady 要分享在 Fedora 9 x86_64 的電腦 ( PC ) 上安裝 Cell 的開發工具 ( CellSDK ) 之過程,廢話不多說,我們馬上開始吧!
首先請準備好已安裝 Fedora 9 x86_64 的 PC 或已安裝 Fedora 9 x86_64 的虛擬機器,而 Shady 是選擇後者,而且是使用 Oracle VM VirtualBox ( 前生為 Sun VirtualBox )。
第二,請先於 IBM 申請免費帳戶後下載以下檔案:
請至下面網址 http://www.ibm.com/developerworks/power/cell/downloads.html 下載下面三個檔案:
cell-install-3.1.0-0.0.noarch.rpm
CellSDK-Devel-Fedora_3.1.0.0.0.iso
CellSDK-Extras-Fedora_3.1.0.0.0.iso
後於 http://www.alphaworks.ibm.com/tech/cellsystemsim/download 下載下面的檔案:
systemsim-cell-3.1-25.f9.x86_64.rpm
再於右面網址 http://www-933.ibm.com/support/fixcentral/ 下載下面的修正檔:
3.1-SDKMA-Linux-i386-FP01.tar.bz2 ( 請選擇與 Cell 和 i386 有關之選項 )
最後至此 http://www.bsc.es/projects/deepcomputing/linuxoncell/ 下載最後的檔案:
IBM-SDKMA-3.1.0.1-x86.tar.bz2
第三,將之前下載的檔案放在 /tmp/cellsdkiso 路徑下,而 3.1-SDKMA-Linux-i386-FP01.tar.bz2 和 IBM-SDKMA-3.1.0.1-x86.tar.bz2 則放在 /tmp/cellsdkiso/update 路徑下,之後開啟終端機按照以下指令進行:
yum update
yum list xulrunner
如顯示 i386 版和 x86_64 版都安裝,請執行 yum remove xulrunner.i386,如只安裝 i386 版,則執行下一步指令後再往回執行 yum remove xulrunner.i386。
yum install rsync sed tcl wget expat tk blt cairo libXtst xulrunner.x86_64
cd /tmp/cellsdkiso
rpm -ivh cell-install-3.1.0.0.0.noarch.rpm
cd ~
/opt/cell/cellsdk -o --iso /tmp/cellsdkiso install
安裝過程中如遇提問同不同意和接不接受,都請選同意和接受。
cd /tmp/cellsdkiso
rpm -ivh systemsim-cell-3.1-25.f9.x86_64.rpm
cd update
tar xf IBM-SDKMA-3.1.0.1-x86.tar.bz2
tar xf 3.1-SDKMA-Linux-i386-FP01.tar.bz2
yum localupdate *.rpm ( 如失敗請用 yum --nogpgcheck localupdate *.rpm )
最後,
到 /opt/cell/ide/eclipse/plugins/com.ibm.celldt.simulator.profile.default_3.1.0.200811171424/ 下,用文字編譯器開啟 simulator_init.tcl 此檔案,然後將 704 列按照以下做更改:
原為此三列:
mysim trigger set console "The system is going down for system halt NOW!" CellDT_ShutdownNotified
mysim trigger set console "INIT: Switching to runlevel: 0" CellDT_ShutdownStarted
mysim trigger set console "INIT: no more processes left in this runlevel" CellDT_ShutdownComplete
改為此六列:
#mysim trigger set console "The system is going down for system halt NOW!" CellDT_ShutdownNotified
#mysim trigger set console "INIT: Switching to runlevel: 0" CellDT_ShutdownStarted
#mysim trigger set console "INIT: no more processes left in this runlevel" CellDT_ShutdownComplete
mysim trigger set console "init: rcS main" CellDT_ShutdownNotified
mysim trigger set console "Sending all processes the TERM signal" CellDT_ShutdownStarted
mysim trigger set console "md: stopping all md devices." CellDT_ShutdownComplete
還有 745 列原為此三列:
mysim trigger set console "Starting Linux" CellDT_BootedBios
mysim trigger set console "Welcome to Fedora Core" CellDT_BootedLinux
mysim trigger set console "INIT: Entering runlevel: 2" CellDT_BootNearlyReady
改為此五列:
mysim trigger set console "Starting Linux" CellDT_BootedBios
#mysim trigger set console "Welcome to Fedora Core" CellDT_BootedLinux
#mysim trigger set console "INIT: Entering runlevel: 2" CellDT_BootNearlyReady
mysim trigger set console "Welcome to Fedora" CellDT_BootedLinux
mysim trigger set console "Starting login process" CellDT_BootNearlyReady
到這裡 CellSDK 已安裝完成,以下則提供 Cell 開發環境 eclipse 啟動指令和模擬器啟動指令。
Cell 開發環境 eclipse:
/opt/cell/ide/eclipse/eclipse -vm /opt/ibm/java2-i386-50/jre/bin
模擬器有兩列,請按順序輸入:
ulimit -s unlimited
PATH=/opt/ibm/systemsim-cell/bin:$PATH systemsim -g
最後提供 Cell 開發環境 eclipse 的更新設置:
開啟 eclipse 後於 eclipse 的視窗上方按照 Help→ Software Update→ Find and Install→ search for new features to install →next→ New local site→ /opt/cell/ide/eclipse 就可以了。
沒有留言:
張貼留言