çæ´ï¼SheevaPlugï¼ã§Plan 9
çæ´ã買ったã¯ãããã©ãæ¾ç½®ç¶æ ã ã£ãã®ã§ãã¡ãã£ã¨æéãä½ã£ã¦Plan 9ãåãã¨ããã¾ã§ç¢ºèªãããããã«åããæ¹ãã¾ã¨ãã¦ããã
æ¦ç¥ã¨ãã¦ã¯ã«ã¼ãã«ãtftpã«ãã£ã¦ãã¼ããããªã¢ã¼ãï¼VMWare Fusionä¸ï¼ã®Plan 9ããã¡ã¤ã«ãµã¼ãï¼+ tftpdï¼ã¨ãã¦åãããã¨ã«ããããã¼ãæã«ã¯ã·ãªã¢ã«ã³ã³ã½ã¼ã«çµç±ã§U-bootã®æä½ãå¿ è¦ã ãã先ほどのエントリã«æ¸ããã¨ããã§ãscreenã使ã£ã¦ããã
ä½ã¯ãªãã¨ãPlan 9ã®ã¹ã¿ã³ãã¢ãã¼ã³ç°å¢ãå¿ è¦ãªã®ã§ãISOã¤ã¡ã¼ã¸ããã¦ã³ãã¼ããã¦ã¤ã³ã¹ãã¼ã«ãã¦ãããããã¦ããARMクロスコンパイル環境ãã«å¾ã£ã¦ããã¼ã«ãã§ã¤ã³ã¨ARMç¨ã®å®è¡ãã¤ããªãã«ã¼ãã«ããã«ããããSheevaPlugç¨ã®ã«ã¼ãã«ãå ¥ã£ãã®ã¯å²ã¨æè¿ã®ãã¨ãªã®ã§ã/sys/src/9/kwããªãå ´åï¼ããã¶ãåã«ã¤ã³ã¹ãã¼ã«ãã¦ãã®ã¾ã¾ã ã£ããï¼ã¯pullã¹ã¯ãªãããå®è¡ãã¦ã·ã¹ãã ãææ°ç¶æ ã«ãã¦ãããã¨ã
ã«ã¼ãã«ãã§ãããã9plugã/lib/tftpdãã£ã¬ã¯ããªä»¥ä¸ã«ã³ãã¼ãããtftpdã®èµ·åã¯ã
% ip/tftpd
ã§OKã
ç¶ãã¦èªè¨¼ç¨ã«factotumã«ã¦ã¼ã¶åã¨ãã¹ã¯ã¼ãã®çµãç»é²ãããã¡ã¤ã«ãµã¼ãã«ãªãããã«exportfsãèµ·åãã¦ããã
% echo 'key proto=p9sk1 dom=macair user=oraccha !password=password' >/mnt/factotum/ctl % aux/listen1 -t tcp!*!564 /bin/exportfs -s &
ã§ã¯ãçæ´ã«é»æºãå ¥ããã·ãªã¢ã«ã³ã³ã½ã¼ã«ãã¤ãªããããããã©ã«ãã§ã¯Linuxãèµ·åããããU-bootã®èµ·åã·ã¼ã±ã³ã¹ä¸ã«ä½ããã¼å ¥åããã¨ãããã³ããã表示ããã¦å ¥åå¾ ã¡ã«ãªãã
__ __ _ _ | \/ | __ _ _ ____ _____| | | | |\/| |/ _` | '__\ \ / / _ \ | | | | | | (_| | | \ V / __/ | | |_| |_|\__,_|_| \_/ \___|_|_| _ _ ____ _ | | | | | __ ) ___ ___ | |_ | | | |___| _ \ / _ \ / _ \| __| | |_| |___| |_) | (_) | (_) | |_ \___/ |____/ \___/ \___/ \__| ** MARVELL BOARD: SHEEVA PLUG LE U-Boot 1.1.4 (Sep 7 2009 - 20:21:09) Marvell version: 3.4.16 U-Boot code: 00600000 -> 0067FFF0 BSS: -> 006CEE60 Soc: 88F6281 A0 (DDR2) CPU running @ 1200Mhz L2 running @ 400Mhz SysClock = 400Mhz , TClock = 200Mhz DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6 DRAM CS[0] base 0x00000000 size 256MB DRAM CS[1] base 0x10000000 size 256MB DRAM Total size 512MB 16bit width Flash: 0 kB Addresses 8M - 0M are saved for the U-Boot usage. Mem malloc Initialization (8M - 7M): Done NAND:512 MB CPU : Marvell Feroceon (Rev 1) Streaming disabled Write allocate disabled USB 0: host mode PEX 0: interface detected no Link. Net: egiga0 [PRIME], egiga1 Hit any key to stop autoboot: 0 Marvell>>
DHCPã§IPã¢ãã¬ã¹ãåå¾ãããã¨ãã§ããããããã§ã¯éçã«ã¢ãã¬ã¹ãè¨å®ãããã¨ã«ãããã¾ãã¯printenvã§è¨å®ãã¡ã¢ãã¦ããã¦ãipaddrãnetmaskãserveripãããã«å¿ è¦ã§ããã°gatewayipãsetenvã§è¨å®ãããé ã«çæ´èªèº«ã®ã¢ãã¬ã¹ãããããã¹ã¯ãtftpdãåãã¦ãããµã¼ãã®ã¢ãã¬ã¹ãããã©ã«ãã²ã¼ãã¦ã§ã¤ã®ã¢ãã¬ã¹ã¨ãªããçé確èªã«ã¯pingã使ããã以ä¸ã説æã®ãããVMWare Fusionä¸ã®Plan 9ã¯192.168.0.1ãçæ´ã¯192.168.0.2ã¨ããã
Marvell>> setenv ipaddr 192.168.0.2 Marvell>> setenv netmask 255.255.255.0 Marvell>> setenv serverip 192.168.0.1 Marvell>> ping 192.168.0.1 Using egiga0 device host 192.168.0.1 is alive Marvell>> saveenv Saving Environment to NAND... Erasing Nand...Writing to Nand... done
ãã¦ããããtftpdããã«ã¼ãã«ããã¼ããã¦èµ·åããã
Marvell>> tftp 0x800000 9plug Using egiga0 device TFTP from server 192.168.0.1; our IP address is 192.168.0.2 Filename '9plug'. Load address: 0x800000 Loading: ################################################################# ################################################################# ########################################################## done Bytes transferred = 959744 (ea500 hex) Marvell>> go 0x800000 ## Starting application at 0x00800000 ... Plan 9 address map: enabled window 5 for spi: targ 1 attr 0x1e size 134,217,728 addr 0xe8000000 cpu0: 1200MHz ARM Marvell 88F6281 (arm926ej-s) #l0: kirkwood: 1000Mbps port 0xf1072000 irq 11: 005043014445 l2 cache enabled as write-through spi flash at 0xe8000000: memory reads enabled 504M memory: 52M kernel data, 452M user, 1961M swap
ãªã«ããåãå§ãã¦ããã¡ã¤ã«ã·ã¹ãã ã¨èªè¨¼ãµã¼ãã®ã¢ãã¬ã¹ãå ¥åããããã«ä¿ãããããããã¯192.168.0.1ã§OKã§ãããããã¦ãç¶ãã¦ã¦ã¼ã¶åããã¡ã¤ã³ããã¹ã¯ã¼ããèãããã®ã§ãfactotumã«ç»é²ããå 容ãå¿ããã°ããããã¨secstoreã¯ä½¿ããªãã®ã§ç©ºã§OKã *1ã
filesystem IP address[no default]: 192.168.0.1 authentication server IP address[no default]: 192.168.0.1 bad nvram key bad authentication id bad authentication domain authid: oraccha authdom: macair secstore key: password: can't write key to nvram: jmk added reentrancy for threads version...time... init: starting /bin/rc 192.168.0.2#
ã¡ããã¨èµ·åãã¦rcã®ããã³ãããç¾ããããã¨ã¯ç ®ããªãç¼ããªãã好ããªããã«ã
Hello, worldãã¡ããã¨åãããããã©ã«ãã®å®è¡ãã¡ã¤ã«åã¯8.outãããªãã¦5.outã
192.168.0.2# cat > hello.c #include <u.h> #include <libc.h> void main() { print("Hello, world!\n"); exits(nil); } 192.168.0.2# 5c hello.c 192.168.0.2# 5l hello.5 192.168.0.2# file 5.out 5.out: arm plan 9 executable 192.168.0.2# 5.out Hello, world!
çæ´ãCPUãµã¼ãã¨ãã¦åããããã®ã ãã©ããã¾ããããªããªããã
Twalk /bin/timeã§ãããªãã¡ã¤ã«ã¯ãªãã£ã¦è¨ããã¦ãï¼
notefs: ->Tversion tag 65535 msize 8216 version '9P2000' notefs: <-Rversion tag 65535 msize 8216 version '9P2000' notefs: ->Tattach tag 10 fid 318 afid -1 uname oraccha aname notefs: <-Rattach tag 10 qid (0000000000000000 0 d) cpu: waiting for FS: : notefs: ->Twalk tag 1 fid 318 newfid 293 nwname 1 0:bintime notefs: <-Rerror tag 1 ename file does not exist notefs: ->Tclunk tag 1 fid 318 notefs: <-Rclunk tag 1 read9pmsg(4) returns 0: notefs exiting: postnote PNGROUP 782: '/proc/782' file does not exist
*1:ãã®è¾ºã¯libboot(/sys/src/9/boot)ã®å¦çããªã