ここがめっちゃ参考になった: NetBSD/evbarm 6.1 on Raspberry Pi
SDカードの一発目を作るのにまずさいしょに Raspbian のイメージを持って来てSDカードにddで書き込み。
progress -f 2013-09-25-wheezy-raspbian.img dd of=/dev/rsd0d bs=1m
するとDOSパーティションに必要なファイルが入った状態のSDカードが 出来上がるので、あとはfdiskでパーティション1をNetBSD(169)に変えて、 SDカードの末端までサイズを拡げるだけでよいので楽ちん。
DOSパーティションの kernel.img をNetBSDカーネルに置き換えて cmdline.txt も修正してブート。
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The NetBSD Foundation, Inc. All rights reserved. Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. NetBSD 6.1_STABLE (RPI-RT) #0: Mon Nov 18 20:30:51 JST 2013 root@firestorm.gentei.org:/opt/tmp/nb/obj/sys/arch/evbarm/compile/RPI-RT total memory = 448 MB avail memory = 434 MB timecounter: Timecounters tick every 10.000 msec cprng kernel: WARNING insufficient entropy at creation. mainbus0 (root) cpu0 at mainbus0: ARM1176JZ-S r0p7 (ARM11J core) cpu0: DC enabled IC enabled WB enabled LABT cpu0: 16KB/32B 4-way Instruction cache cpu0: 16KB/32B 4-way write-back-locking-C Data cache vfp0 at cpu0: VFP11 obio0 at mainbus0 bcmicu0 at obio0 bcmmbox0 at obio0: VC mailbox vcmbox0 at bcmmbox0 bcmtmr0 at obio0 intr 3: VC System Timer bcmpm0 at obio0: Power management, Reset and Watchdog controller bcmrng0 at obio0: RNG plcom0 at obio0 intr 57 plcom0: txfifo disabled plcom0: console genfb0 at obio0: switching to framebuffer console genfb0: framebuffer at 0x1c006000, size 1280x720, depth 32, stride 5120 wsdisplay0 at genfb0 kbdmux 1: console (default, vt100 emulation) wsmux1: connecting to wsdisplay0 wsdisplay0: screen 1-3 added (default, vt100 emulation) sdhc0 at obio0 intr 62: SDHC controller sdhc0: interrupting on intr 62 sdhc0: SD Host Specification 3.0, rev.153 sdmmc0 at sdhc0 dotg0 at obio0 intr 9: USB controller bcmspi0 at obio0 intr 54: SPI spi0 at bcmspi0: SPI bus bsciic0 at obio0 intr 53: BSC0 iic0 at bsciic0: I2C bus bsciic1 at obio0 intr 53: BSC1 iic1 at bsciic1: I2C bus usb0 at dotg0: USB revision 2.0 timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0 timecounter: Timecounter "bcmtmr0" frequency 1000000 Hz quality 100 uhub0 at usb0: vendor 0x0000 DWC OTG root hub, class 9/0, rev 2.00/1.00, addr 1 uhub0: 1 port with 1 removable, self powered ld0 at sdmmc0: <SD > ld0: 15534 MB, 7890 cyl, 64 head, 63 sec, 512 bytes/sect x 31813632 sectors ld0: 4-bit width, bus clock 50.000 MHz uhub1 at uhub0 port 1: vendor 0x0424 product 0x9512, class 9/0, rev 2.00/2.00, addr 2 uhub1: multiple transaction translators uhub1: 3 ports with 2 removable, self powered usmsc0 at uhub1 port 1 usmsc0: vendor 0x0424 product 0xec00, rev 2.00/2.00, addr 3 usmsc0: Ethernet address b8:27:eb:64:3c:af ukphy0 at usmsc0 phy 1: OUI 0x00800f, model 0x000c, rev. 3 ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto usbd_get_string: getting lang failed, using 0 axe0 at uhub1 port 2 axe0: vendor 0x0b95 product 0x7720, rev 2.00/0.01, addr 4 axe0: Ethernet address b0:c7:45:5f:7a:a9 ukphy1 at axe0 phy 16: OUI 0x007063, model 0x0006, rev. 1 ukphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto boot device: ld0 root on ld0a dumps on ld0b mountroot: trying nfs... mountroot: trying msdos... mountroot: trying ext2fs... mountroot: trying ffs... root file system type: ffs WARNING: no TOD clock present WARNING: using filesystem time WARNING: CHECK AND RESET THE DATE! init: copying out path `/sbin/init' 11 wsdisplay0: screen 4 added (default, vt100 emulation)
include "arch/evbarm/conf/RPI" pseudo-device tap # virtual Ethernet pseudo-device tun # network tunneling over tty #pseudo-device gre # generic L3 over IP tunnel pseudo-device gif # IPv[46] over IPv[46] tunnel (RFC 1933) options PFIL_HOOKS pseudo-device pf # PF packet filter pseudo-device pflog # PF log if no options RTC_OFFSET options RTC_OFFSET=-540 # hardware clock is this many mins. west of GMT pseudo-device ppp # Point-to-Point Protocol pseudo-device pppoe # PPP over Ethernet (RFC 2516) no options SYMTAB_SPACE options SYMTAB_SPACE=800000
あと、/etc/rc.conf に追加したのは、
sshd=YES ntpdate=YES wscons=YES nfs_client=YES lockd=YES statd=YES dhcpcd=YES
くらいかな。
keisoku4 /**** Speed Test No.4 ****/ empty short long float double | total 2.46 33.55 9.32 158.07 272.21 475.61 df -hl Filesystem Size Used Avail %Cap Mounted on /dev/ld0a 2.0G 54M 1.8G 2% / /dev/ld0f 12G 413M 11G 3% /usr tmpfs 255M 4.0K 255M 0% /tmp ptyfs 1.0K 1.0K 0B 100% /dev/pts
あと、httpd-2.2.25のconfigureが51秒、makeが51分てな感じ。