ODE講座15:PlayStation3でODEを動かそう!
ode
2007.01.06
ODE (Open Dynamics Engine)講座の15回目となりました。今回はお正月企画として、お年玉で購入した? PlayStation 3 (プレーステーション3、PS3)にLinuxをインストールしODEを動かすまでの方法を紹介したいと思います。
Linxuのディストリビューションにはマニアにブレーク中のMomonga Linuxを使います。Momonga LinuxはPlayStation3にインストールする具体的な方法を紹介した以下のホームページがあります。
1.準備
PS3にLinux用のハードディスク領域を割り当てる。ここではLinux用に10MB、ゲーム用に50MB割り当てます。領域の割り当てが柔軟ではなく、これ以外はLinux用に50MB、ゲーム用に10MBとなります。Linuxでは外付けのUSBハードディスクを利用できるのでゲームで遊びたい方はこの割り当てが良いでしょう。具体的な方法はこのページをご覧ください。
Momonga Linux DVD イメージをここからダウンロードして DVDに焼く。
USBメモリ、USBキーボード、USBマウス
OtherOSインストーラー。ここからダウンロードする。
2.ブートローダーのインストール
FIXSTARSの「PS3 Linuxのためのブートローダーをインストールする 」 にしたがってインストールします。USBメモリに所定のファイル達をコピーします。ブートローダーにはothteros.bldは1で準備した Momonga Linux DVDのPS3/boot/otheros.bldを使います。ただし、Linux DVDはWindowsのエクスプローラーでは読めないのでLinuxで読む必要があります。
3.インストール
PS3にMomonga Linux DVDを入れ起動します。
「kboot:」と表示されたらエンターキーを押してください。インストールが始まります。
CD Foundの画面になり、メディアチェックするかどうか聞かれます。私の場合は「skip」で先に進みました。
Momongaの画面になり、「Welcome to Momonga!」と表示されます。「OK」を選択。
Language Selectionの画面になり、インストールプロセスで何語を選ぶか聞かれます。Japaneseを選び「OK」を選択。
Language Unavailableの画面になり、インストール時は日本語は使えないので「OK」を選択。
Warningの画面になり、sdbが読めないので初期化しますか?と聞いてきます。OKを選択。
Partitioning Typeの画面になります。ここでは「Remove all partitions on selected drives and create default layout]とインストール先に「sda」だけを選び「OK」を選択。このとき、sdbやsddの前に「*」がついていたら、初期化され全てデータが消 えてしまいますので、「*]を消してください。なお、私の場合はUSBメモリはsddとして認識されていました。
Warningの画面になり、/dev/sdaの全てのパーティションを削除するか聞いてきますので「Yes」を選択。このとき、sdb、sddの表示があれば、それらも削除されますので「No」を選択しチェックを外してください。
Review Partition Layoutの画面になり、レイアウトを見るか聞いてきますので「Yes」を選択。以下のように表示されました。標準ではswapが415Mしかなかったので1027MBに変更しました。
Start End Size Type Mount Point
変更前
sda1 1 13 101M ext3 /boot
sda2 14 1252 9719M ext3 /
sda3 1253 1305 415M swap
変更後
sda1 1 13 101M ext3 /boot
sda2 14 1174 9107M ext3 /
sda3 1175 1305 1027M swap
Low Mmoeryの画面になり、swap spaceをオンにするか聞いてきますので「Yes」を選択、「No」を選択するとインストールが終了します。
Network Configuration for eth0の画面になり、デフォルトのままで「OK」を選択。
Hostname Configurationの画面になり、DHCPを使うのでデフォルトのままで「OK」を選択。
Time Zone Selectionの画面になり、「Asia/Tokyo」を選び、「OK」を選択。
Root Passwordの画面になり、ルートのパスワードを入れます。
Package selectionの画面になり、私の場合は以下を選び、「OK」を選択。
Software Development
Customoze software selection
Linux用の領域が9Gしかないので以下のパッケージを選択しました。
Administration Tools
Development Tools
Editors
Engineering and Scientific
GNOME Desktop Environment
GNOME Software Development
Games and Entertainment
Graphical Internet
Graphics
Legacy Software Development
PS3 Development
PS3 Support
Sound and Video
System Tools
X Software Development
X Window System
XFCE
XFCE Software Development
Dependency Checkの画面になり、パッケージの依存性をチェックします。5分程度かかりました。
Installation to beginの画面になります、「OK」を選択。
Package Installationの画面になり、パッケージのインストールが始まります。私の場合は全部で2898MB、インストール完了までの時間は約70分でした。PS3搭載の2.5インチのハードディスクは遅いです。
Post Installの画面になり、自動的にインストール後の処理を実行し、「cannot determine current run level」と表示され、boot loaderと表示されます。
Completeの画面になり、「Congratulations, your Momonga installation is complete.」と表示されDVDがイジェクトされます。「Reboot」を選択しエンターキーを押すと再起動します。
momonga linuxが起動しSetup Agentの画面になりますが、特に設定を変更しないのでそのままほおっておくと以下のメッセージが出ます。これでインストールはうまくいきました。
Momonga Linux release 3 (Mikuru)
Kernel 2.6.16-lmps3 on an ppc64
localhost login:
4. インストール後の作業
そのままではXが起動しないので、momonga のDVDにあるPS3/etc/xorg.confを/etc/X11/xorg.confにコピーします。DVDは自動的にマウンドされないので以下のコマンドを使い手動でマウンドしコピーします。
cd /media
mkdir cdrom
mount -t iso9660 /dev/cdrom cdrom
cp /media/cdrom/PS3/etc/xorg.conf /etc/X11/xorg.conf
Xを以下のコマンドで起動するとかわいいMomongaの絵が現れX Windowが立ち上がります。
startx
ウインドウマネージャはgnomeとなります。高解像度でX Windowを立ち上げるために/etc/kboot.confの一行目をご自分の環境に合わせて書き換えます。フルHDをお持ちの方は1行目を次のように書き換え、
default=momonga1080p
一番最後に以下の追加しリブートします。
momonga1080p=’/dev/sda1:/vmlinuz-2.6.16-lmps3 initrd=/dev/sda1:/initrd-2.6.16-lmps3.img video=ps3fb:mode:5 rhgb’
高解像度で表示されますが、私の環境では画面一杯ではなく左右4cm、上下2cm程度表示されません。解像度を調べたところ1688×964でした。
次にキーボードの設定をします。GNOMEの足アイコンをクリックし、System Tools→Keyboardを選びJapaneseを選択し「OK」をクリックします。
同じく System Tools→Languageを選びJapaneseを選択し「OK」をクリックします。再起動するとシステムフォントが日本語になります。
yumの設定
yum install system-tools-backend
yum install net-tools
").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),C.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||ce.expando+"_"+jt.guid++;return this[e]=!0,e}}),ce.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||ce.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=ie[r],ie[r]=function(){o=arguments},n.always(function(){void 0===i?ce(ie).removeProp(r):ie[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&v(i)&&i(o[0]),o=i=void 0}),"script"}),le.createHTMLDocument=((Jt=C.implementation.createHTMLDocument("").body).innerHTML="
",2===Jt.childNodes.length),ce.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(le.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(r)):t=C),o=!n&&[],(i=w.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,o),o&&o.length&&ce(o).remove(),ce.merge([],i.childNodes)));var r,i,o},ce.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1
").append(ce.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ce.expr.pseudos.animated=function(t){return ce.grep(ce.timers,function(e){return t===e.elem}).length},ce.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=ce.css(e,"position"),c=ce(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=ce.css(e,"top"),u=ce.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),v(t)&&(t=t.call(e,n,ce.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},ce.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ce.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===ce.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===ce.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=ce(e).offset()).top+=ce.css(e,"borderTopWidth",!0),i.left+=ce.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-ce.css(r,"marginTop",!0),left:t.left-i.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===ce.css(e,"position"))e=e.offsetParent;return e||J})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;ce.fn[t]=function(e){return M(this,function(e,t,n){var r;if(y(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),ce.each(["top","left"],function(e,n){ce.cssHooks[n]=Ye(le.pixelPosition,function(e,t){if(t)return t=Ge(e,n),_e.test(t)?ce(e).position()[n]+"px":t})}),ce.each({Height:"height",Width:"width"},function(a,s){ce.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){ce.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return M(this,function(e,t,n){var r;return y(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?ce.css(e,t,i):ce.style(e,t,n,i)},s,n?e:void 0,n)}})}),ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),ce.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){ce.fn[n]=function(e,t){return 0
タイトルとURLをコピーしました
コメント