https://wiki.freebsd.org/WhatsNew/FreeBSD10 からまとめてみた
続きを読む
「FreeBSD」カテゴリーアーカイブ
FreeBSDでbin+cueからalac(AppleLossless)変換スクリプトを書いてみた
最近mp3からalacに移行しているのでとりあえず都合のいいように書いてみた
ファイルサーバーを作成してみた。
家の点在しているストレージを統合し、どの端末からでもアクセスできるようにするため、現在使用中のサーバーにファイルサーバーも担うことを計画
現在、Web・Mail・MySQLも動作中なのでどこまでパフォーマンスが出るか心配。
SMB, AFP, HTTPS, WebDAV, FTP, AFP, NFSなど様々なプロトコルでアクセスさせることが最終目標。
とりあえずSMBとHTTPSでアクセスできるようにさせる。
やりたいことはFreeNASでもできるのだけれど、予算とサーバーを増やしたくないので却下。
OS
FreeBSD 9-STABLE r23918 GENERIC amd64
サーバースペック
CPU Q9550
MB P5Q-E
MEM 16GB
電源 ENERMAX EMD525AWT
ストレージ
HDD WD3200AAKS-00B3A0 350GB (システム用)
SSD INTEL SSDSA2CW120G3 (SWAP L2ARC ZIL MySQL用)
HDD WD30EZRX x 5台 (ファイルサーバー用)
NICは intel PRO/1000 GT Desktop Adapter (em0)とMarvell Yukon 88E8056 Gigabit Ethernet(msk0)をlacpでlagg0にしている。
gpart (geom part)の作成できるパーティションタイプを調べてみた。
マニュアルだと以下のタイプしか載っていないが、あまりにも少ないのでソースを調べてみた
efi freebsd freebsd-boot freebsd-swap freebsd-ufs freebsd-vinum freebsd-zfs mbr
FreeBSD 9-STABLE r238461の時点だと以下のタイプが可能みたい
/usr/src/sys/geom/part/g_part.c
apple-boot apple-hfs apple-label apple-raid apple-raid-offline apple-tv-recovery apple-ufs bios-boot ebr efi fat32 freebsd freebsd-boot freebsd-swap freebsd-ufs freebsd-vinum freebsd-zfs linux-data linux-lvm linux-raid linux-swap mbr ms-basic-data ms-ldm-data ms-ldm-metadata ms-reserved ntfs netbsd-ccd netbsd-cgd netbsd-ffs netbsd-lfs netbsd-raid netbsd-swap vmware-vmfs vmware-vmkdiag vmware-reserved
GIGA LANDISK (HDL-G)をFreeBSD化
FreeBSDでもarm対応しているということで手持ちのGIGA LANDISKを動かしたいと思い2年前に試したが、boot以降で挫折。今回も変わらず。
GIGA LANDISK (HDL-G)
http://www.iodata.jp/prod/storage/hdd/2005/hdl-g/
購入時はこの記事を読んでDebian化させていた
http://www.itmedia.co.jp/enterprise/articles/0508/31/news002.html
スペック
CPU Intel Xscale i80219 400MHz
Memory 128MB
詳細なデータはDebianからlspci -xxxvvで取得
00:01.0 Ethernet controller: Intel Corporation 82541GI/PI Gigabit Ethernet Controller (rev 05)
Subsystem: I-O Data Device, Inc. Unknown device d02a
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B-
Status: Cap+ 66MHz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 0 (63750ns min), Cache Line Size: 32 bytes
Interrupt: pin A routed to IRQ 27
Region 0: Memory at 80000000 (64-bit, non-prefetchable) [size=128K]
Region 2: Memory at 80020000 (64-bit, non-prefetchable) [size=64K]
Region 4: I/O ports at fe000000 [size=64]
Expansion ROM at 80030000 [disabled] [size=64K]
Capabilities: [dc] Power Management version 2
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=1 PME-
Capabilities: [e4] PCI-X non-bridge device
Command: DPERE- ERO+ RBC=512 OST=1
Status: Dev=00:00.0 64bit- 133MHz- SCD- USC- DC=simple DMMRBC=2048 DMOST=1 DMCRS=8 RSCEM- 266MHz- 533MHz-
00: 86 80 76 10 47 01 30 02 05 00 00 02 08 00 00 00
10: 04 00 00 80 00 00 00 00 04 00 02 80 00 00 00 00
20: 01 00 00 90 00 00 00 00 00 00 00 00 fc 10 2a d0
30: 00 00 03 80 dc 00 00 00 00 00 00 00 1b 01 ff 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 01 e4 22 c8
e0: 00 20 00 28 07 00 02 00 00 00 40 00 00 00 00 00
f0: 05 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00
00:02.0 Mass storage controller: Artop Electronic Corp ATP865 (rev 07)
Subsystem: Artop Electronic Corp ATP865
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 128 (2750ns min, 1000ns max), Cache Line Size: 32 bytes
Interrupt: pin A routed to IRQ 28
Region 0: I/O ports at fe000050 [size=8]
Region 1: I/O ports at fe000060 [size=4]
Region 2: I/O ports at fe000058 [size=8]
Region 3: I/O ports at fe000064 [size=4]
Region 4: I/O ports at fe000040 [size=16]
[virtual] Expansion ROM at 80040000 [disabled] [size=64K]
Capabilities: [58] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00: 91 11 09 00 45 01 90 02 07 00 80 01 08 80 00 00
10: 51 00 00 90 61 00 00 90 59 00 00 90 65 00 00 90
20: 41 00 00 90 00 00 00 00 00 00 00 00 91 11 09 00
30: 00 00 00 00 58 00 00 00 00 00 00 00 1c 01 0b 04
40: 31 31 31 31 07 00 00 00 70 84 86 00 00 00 00 00
50: ff ff ff ff f0 ff 08 00 01 00 02 06 00 00 00 00
60: 31 31 31 31 07 00 00 00 70 84 86 00 00 00 00 00
70: 00 00 00 00 f0 ff 08 00 01 00 02 06 00 00 00 00
80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
c0: 31 31 31 31 07 00 00 00 70 84 86 00 00 00 00 00
d0: 00 00 00 00 f0 ff 08 00 01 00 02 06 00 00 00 00
e0: 31 31 31 31 07 00 00 00 70 84 86 00 00 00 00 00
f0: 00 00 00 00 f0 ff 08 00 01 00 02 06 00 00 00 00
00:03.0 USB Controller: NEC Corporation USB (rev 43) (prog-if 10 [OHCI])
Subsystem: NEC Corporation Hama USB 2.0 CardBus
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 8 (250ns min, 10500ns max), Cache Line Size: 32 bytes
Interrupt: pin A routed to IRQ 29
Region 0: Memory at 80050000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [40] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00: 33 10 35 00 46 01 10 02 43 10 03 0c 08 08 80 00
10: 00 00 05 80 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 33 10 35 00
30: 00 00 00 00 40 00 00 00 00 00 00 00 1d 01 01 2a
40: 01 00 02 7e 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 05 33 b0 6c 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00:03.1 USB Controller: NEC Corporation USB (rev 43) (prog-if 10 [OHCI])
Subsystem: NEC Corporation Hama USB 2.0 CardBus
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 8 (250ns min, 10500ns max), Cache Line Size: 32 bytes
Interrupt: pin B routed to IRQ 29
Region 0: Memory at 80051000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [40] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00: 33 10 35 00 46 01 10 02 43 10 03 0c 08 08 00 00
10: 00 10 05 80 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 33 10 35 00
30: 00 00 00 00 40 00 00 00 00 00 00 00 1d 02 01 2a
40: 01 00 02 7e 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00:03.2 USB Controller: NEC Corporation USB 2.0 (rev 04) (prog-if 20 [EHCI])
Subsystem: NEC Corporation USB 2.0
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr+ Stepping- SERR+ FastB2B-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 68 (4000ns min, 8500ns max), Cache Line Size: 32 bytes
Interrupt: pin C routed to IRQ 29
Region 0: Memory at 80052000 (32-bit, non-prefetchable) [size=256]
Capabilities: [40] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00: 33 10 e0 00 56 01 10 02 04 20 03 0c 08 44 00 00
10: 00 20 05 80 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 33 10 e0 00
30: 00 00 00 00 40 00 00 00 00 00 00 00 1d 03 10 22
40: 01 00 02 7e 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 20 20 3f 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 05 33 b0 6c 00 00 00 00 01 00 00 00 00 00 08 c0
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
landisk:~# lspci -b
00:01.0 Ethernet controller: Intel Corporation 82541GI/PI Gigabit Ethernet Controller (rev 05)
00:02.0 Mass storage controller: Artop Electronic Corp ATP865 (rev 07)
00:03.0 USB Controller: NEC Corporation USB (rev 43)
00:03.1 USB Controller: NEC Corporation USB (rev 43)
00:03.2 USB Controller: NEC Corporation USB 2.0 (rev 04)
landisk:~# lspci -bvvxxx
00:01.0 Ethernet controller: Intel Corporation 82541GI/PI Gigabit Ethernet Controller (rev 05)
Subsystem: I-O Data Device, Inc. Unknown device d02a
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B-
Status: Cap+ 66MHz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 0 (63750ns min), Cache Line Size: 32 bytes
Interrupt: pin A routed to IRQ 27
Region 0: Memory at 0000000080000000 (64-bit, non-prefetchable)
Region 2: Memory at 0000000080020000 (64-bit, non-prefetchable)
Region 4: I/O ports at 90000000
Expansion ROM at 80030000 [disabled]
Capabilities: [dc] Power Management version 2
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=1 PME-
Capabilities: [e4] PCI-X non-bridge device
Command: DPERE- ERO+ RBC=512 OST=1
Status: Dev=00:00.0 64bit- 133MHz- SCD- USC- DC=simple DMMRBC=2048 DMOST=1 DMCRS=8 RSCEM- 266MHz- 533MHz-
00: 86 80 76 10 47 01 30 02 05 00 00 02 08 00 00 00
10: 04 00 00 80 00 00 00 00 04 00 02 80 00 00 00 00
20: 01 00 00 90 00 00 00 00 00 00 00 00 fc 10 2a d0
30: 00 00 03 80 dc 00 00 00 00 00 00 00 1b 01 ff 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 01 e4 22 c8
e0: 00 20 00 28 07 00 02 00 00 00 40 00 00 00 00 00
f0: 05 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00
00:02.0 Mass storage controller: Artop Electronic Corp ATP865 (rev 07)
Subsystem: Artop Electronic Corp ATP865
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 128 (2750ns min, 1000ns max), Cache Line Size: 32 bytes
Interrupt: pin A routed to IRQ 28
Region 0: I/O ports at 90000050
Region 1: I/O ports at 90000060
Region 2: I/O ports at 90000058
Region 3: I/O ports at 90000064
Region 4: I/O ports at 90000040
Capabilities: [58] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00: 91 11 09 00 45 01 90 02 07 00 80 01 08 80 00 00
10: 51 00 00 90 61 00 00 90 59 00 00 90 65 00 00 90
20: 41 00 00 90 00 00 00 00 00 00 00 00 91 11 09 00
30: 00 00 00 00 58 00 00 00 00 00 00 00 1c 01 0b 04
40: 31 31 31 31 07 00 00 00 70 84 86 00 00 00 00 00
50: ff ff ff ff f0 ff 08 00 01 00 02 06 00 00 00 00
60: 31 31 31 31 07 00 00 00 70 84 86 00 00 00 00 00
70: 00 00 00 00 f0 ff 08 00 01 00 02 06 00 00 00 00
80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
c0: 31 31 31 31 07 00 00 00 70 84 86 00 00 00 00 00
d0: 00 00 00 00 f0 ff 08 00 01 00 02 06 00 00 00 00
e0: 31 31 31 31 07 00 00 00 70 84 86 00 00 00 00 00
f0: 00 00 00 00 f0 ff 08 00 01 00 02 06 00 00 00 00
00:03.0 USB Controller: NEC Corporation USB (rev 43) (prog-if 10 [OHCI])
Subsystem: NEC Corporation Hama USB 2.0 CardBus
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 8 (250ns min, 10500ns max), Cache Line Size: 32 bytes
Interrupt: pin A routed to IRQ 29
Region 0: Memory at 80050000 (32-bit, non-prefetchable)
Capabilities: [40] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00: 33 10 35 00 46 01 10 02 43 10 03 0c 08 08 80 00
10: 00 00 05 80 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 33 10 35 00
30: 00 00 00 00 40 00 00 00 00 00 00 00 1d 01 01 2a
40: 01 00 02 7e 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 05 33 b0 6c 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00:03.1 USB Controller: NEC Corporation USB (rev 43) (prog-if 10 [OHCI])
Subsystem: NEC Corporation Hama USB 2.0 CardBus
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 8 (250ns min, 10500ns max), Cache Line Size: 32 bytes
Interrupt: pin B routed to IRQ 29
Region 0: Memory at 80051000 (32-bit, non-prefetchable)
Capabilities: [40] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00: 33 10 35 00 46 01 10 02 43 10 03 0c 08 08 00 00
10: 00 10 05 80 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 33 10 35 00
30: 00 00 00 00 40 00 00 00 00 00 00 00 1d 02 01 2a
40: 01 00 02 7e 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00:03.2 USB Controller: NEC Corporation USB 2.0 (rev 04) (prog-if 20 [EHCI])
Subsystem: NEC Corporation USB 2.0
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr+ Stepping- SERR+ FastB2B-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 68 (4000ns min, 8500ns max), Cache Line Size: 32 bytes
Interrupt: pin C routed to IRQ 29
Region 0: Memory at 80052000 (32-bit, non-prefetchable)
Capabilities: [40] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00: 33 10 e0 00 56 01 10 02 04 20 03 0c 08 44 00 00
10: 00 20 05 80 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 33 10 e0 00
30: 00 00 00 00 40 00 00 00 00 00 00 00 1d 03 10 22
40: 01 00 02 7e 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 20 20 3f 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 05 33 b0 6c 00 00 00 00 01 00 00 00 00 00 08 c0
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
手順
ident HDL-G options PHYSADDR=0xa0000000 options KERNPHYSADDR=0xa0200000 options KERNVIRTADDR=0xc0200000 # Used in ldscript.arm options FLASHADDR=0xf0000000 options LOADERRAMADDR=0x00000000 hints "HDL-G.hints" #Default places to look for devices. options STARTUP_PAGETABLE_ADDR=0xa0000000 include "../xscale/i80321/std.i80219" makeoptions MODULES_OVERRIDE="" #makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols makeoptions CONF_CFLAGS=-mcpu=xscale options HZ=100 #options DEVICE_POLLING options SCHED_4BSD #4BSD scheduler options INET #InterNETworking options INET6 #IPv6 communications protocols options FFS #Berkeley Fast Filesystem options SOFTUPDATES #Enable FFS soft updates support options UFS_ACL #Support for access control lists options UFS_DIRHASH #Improve performance on big directories options NFSCLIENT #Network Filesystem Client options NFSSERVER #Network Filesystem Server options NFSLOCKD #Network Lock Manager #options NFS_ROOT #NFS usable as /, requires NFSCLIENT options MSDOSFS #MSDOS Filesystem options EXT2FS #Linux ETX2 FileSystem options CD9660 #ISO 9660 Filesystem #options PROCFS #Process filesystem (requires PSEUDOFS) options PSEUDOFS #Pseudo-filesystem framework options SCSI_DELAY=5000 #Delay (in ms) before probing SCSI options KTRACE #ktrace(1) support options SYSVSHM #SYSV-style shared memory options SYSVMSG #SYSV-style message queues options SYSVSEM #SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev #options BOOTP #options BOOTP_NFSROOT #options BOOTP_NFSV3 #options BOOTP_WIRED_TO=em0 #options BOOTP_COMPAT #options PREEMPTION device loop device ether #device saarm device miibus device rl device em device uart device pci #device geom_redboot # redboot fis parser device ata nodevice atadisk # ATA disk drives nodevice ataraid # ATA RAID drives nodevice atapicd # ATAPI CDROM drives nodevice atapifd # ATAPI floppy drives nodevice atapist # ATAPI tape drives options ATA_STATIC_ID # Static device numbering device atapci device ataacard device atacore device ataintel # Intel options ATA_CAM # SCSI Controllers device pty device iopwdog # I80321 Watchdog device dma # I80321 DMA Controller #options AHC_REG_PRETTY_PRINT # Print register bitfields in debug # output. Adds ~128k to driver. #options AHD_REG_PRETTY_PRINT # Print register bitfields in debug # output. Adds ~215k to driver. # SCSI peripherals device scbus # SCSI bus (required for SCSI) device da # Direct Access (disks) device cd # CD device pass # Passthrough device (direct SCSI access) # Debugging for use in -current options KDB options DDB #Enable the kernel debugger #options DEADLKRES #Enable the deadlock resolver #options INVARIANTS #Enable calls of extra sanity checking #options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS #Enable checks to detect deadlocks and cycles #options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed #options DIAGNOSTIC # To make an SMP kernel, the next two are needed #options SMP # Symmetric MultiProcessor Kernel #options APIC_IO # Symmetric (APIC) I/O options XSCALE_CACHE_READ_WRITE_ALLOCATE device md device random # Entropy device options ARM_USE_SMALL_ALLOC # USB device uhci # UHCI PCI->USB interface device ohci # OHCI PCI->USB interface device ehci # EHCI PCI->USB interface (USB 2.0) device usb # USB Bus (required) device uhid # "Human Interface Devices" device umass # Disks/Mass storage - Requires scbus and da device ums # Mouse
#hint.em.0.at="pci"
#hint.em.0.maddr="0x80000000"
#hint.em.0.msize="131072"
hint.em.0.at="27"
#hint.atapci.0.at="pci"
#hint.atapci.0.maddr="0x80040000"
#hint.atapci.0.msize="65536"
hint.atapci.0.irq="28"
#hint.ata.2.at="atapci"
hint.ata.0.port="0xfe400000"
hint.ata.0.portsize="12"
hint.ata.0.irq="28"
#hint.ata.3.at="atapci"
hint.ata.1.port="0xfe400010"
hint.ata.1.portsize="12"
hint.ata.1.irq="28"
#hint.ohci.0.at="pci"
hint.ohci.0.maddr="0x80050000"
hint.ohci.0.msize="4096"
hint.ohci.0.irq="29"
#hint.ohci.1.at="pci"
hint.ohci.1.maddr="0x80051000"
hint.ohci.1.msize="4096"
hint.ohci.1.irq="29"
#hint.ehci.0.at="pci"
hint.ehci.0.maddr="0x80052000"
hint.ehci.0.misize="256"
hint.ehci.0.irq="29"
カーネルとベースシステム作成・インストール
cd /usr/src export TARGET_ARCH=arm
export CROSS_BUILD_TESTING=yes export DESTDIR=/usr/local/cross/HDL-G make buildworld KERNCONF=HDL-G make kernel KERNCONF=HDL-G make installworld KERNCONF=HDL-G
RedBoot> load hda1:/kernel/kernel -r -v -b 0x00200000 -m disk Raw file loaded 0x00200000-0x00737b09, assumed entry at 0x00200000 RedBoot> go
FreeBSD 9でBSD-licensed grepとBSD-licensed libiconvをインストールする
FreeBSD9から脱GNUの一環としてBSD-licensed grepとBSD-licensed libiconvがbaseに入りました。
/etc/src.confに以下を記入してコンパイルしてください。
WITH_BSD_GREP=yes WITH_ICONV=yes
BSD-licensed grepはデフォルトではbsdgrepとして入りますが、オプションを指定するとgrepがBSD-licensed grepになります。
中身確認
(GNU grepがportsに入っているとPATHの設定次第ではgrepで呼び出されないこともあります。)
#/usr/bin/grep -V grep (BSD grep) 2.5.1-FreeBSD
iconvはGNUと違ってバージョン確認がない?が、使い方はほぼ一緒です。
#/usr/bin/iconv --version iconv: unrecognized option `--version' Usage: iconv [-cs] -f -t [file ...] iconv -f [-cs] [-t ] [file ...] iconv -t [-cs] [-f ] [file ...] iconv -l
どちらもまだ開発途中なので本格利用はまだ先になりそうです。(特にlibiconv)
*BSD I18N Framework Implementation Project
(Citrus Project)
かなり前の記事ですが概要が載っています
2010年6月16日 BSDライセンス版iconv,テスト求む
FreeBSD 9でGCCの代わりにllvm clangでkernel・userland・portsをコンパイル
FreeBSD9から脱GNUの一環としてgccと新たにllvm clangがbaseに入りました。
現在、デフォルトはgccですが、近い将来gccはbaseから外れportsに追いやられることでしょう。
llvm clangでkernel・userland・portsをコンパイルする方法は/etc/make.confに以下を書くだけでOKです。
.if !defined(CC) || ${CC} == "cc" CC=clang .endif .if !defined(CXX) || ${CXX} == "c++" CXX=clang++ .endif .if !defined(CPP) || ${CPP} == "cpp" CPP=clang -E .endif # Don't die on warnings NO_WERROR= WERROR= # Don't forget this when using Jails! NO_FSCHG=
portsの対応状況ですが以下を見る限りかなり少なくなってきているのでclangデフォルトで問題ないですね。
http://pointyhat.freebsd.org/errorlogs/i386-9-full/index-reason.html
http://pointyhat.freebsd.org/errorlogs/amd64-9-full/index-reason.html
最新情報は以下をご覧ください。
http://wiki.freebsd.org/BuildingFreeBSDWithClang
FreeBSDのソースを利用する or カーネルモジュールとして使われるports
kernelソースを利用するportsをリストアップしてみました。
kernelを更新したら以下の中でインストールされている物があれば再起動前に合わせて更新することをおすすめします。
audio/aureal-kmod audio/oss chinese/big5width chinese/telnet comms/hso-kmod comms/ib-kmod comms/uarduno comms/uhso-kmod comms/umcs7840 devel/linux_kdump devel/linux-js devel/linuxthreads emulators/kqemu-kmod emulators/kqemu-kmod-devel emulators/parallels-tools emulators/rtc emulators/virtualbox-ose emulators/virtualbox-ose-additions emulators/virtualbox-ose-kmod emulators/virtualbox-ose-kmod-legacy emulators/virtualbox-ose-legacy emulators/vmware-guestd4 emulators/vmware-guestd5 emulators/vmware-guestd6 graphics/kix-kmod graphics/plasma-kmod misc/dahdi-kmod multimedia/cuse4bsd-kmod multimedia/cx88 multimedia/linux_dvbwrapper-kmod multimedia/linux_v4l2wrapper-kmod multimedia/ptx-kmod multimedia/pvr250 multimedia/pvrxxx multimedia/pwcbsd multimedia/sms1xxx-kmod net-mgmt/ng_ipacct net/acx100 net/asterisk-oh323 net/bwi-firmware-kmod net/bwn-firmware-kmod net/click net/iet net/ipvs net/ipw-firmware net/ipw-firmware-kmod net/iwi-firmware net/mpd4 net/mpd5 net/ng_car net/ng_daphne net/openafs net/skyfish net/skystar2 net/ttbudget print/acroreadwrapper security/quantis security/quantis-kmod sysutils/biosfont sysutils/cciss_vol_status sysutils/devcpu sysutils/fusefs-kmod sysutils/fusefs-sshfs sysutils/graid5 sysutils/lsof sysutils/mono-kmod sysutils/pefs-kmod sysutils/pmap sysutils/scprotect sysutils/uhidd sysutils/vordog textproc/gxditview x11-drivers/input-wacom
FreeBSD 9のデスクトップ環境構築
>> 新しく書き直しました <<
概要
しばらく時間が経つと設定方法が変わるのでFreeBSD9時点での設定方法をまとめてみた。
殆どPC-BSDだけどw
少し追記
目標
PC-BSDではなく、FreeBSDで一から構築 取り合えずgnomeで、日本語入力できて、ブラウザでネット 動画/音楽再生・Skype・FLASH動画再生・PDF閲覧ができる位
FreeBSD環境下でのFLASH再生
現在、FreeBSDではFreeBSD用Adobe Flash Playerが存在しない。
変にオープンではないAdobeは汚い。
しかし、FreeBSDにはLinuxバイナリ互換機能(wineやcygwinのような感じ)でlinux用ソフトウエアも動かすことができる。(100%ではないが)
さらに、オープンソースでFlash Player互換プレーヤーもいくつか存在する。
もちろんこちらはFreeBSD用もある。
しかし、Adobe Flash Playerの出来には遠く及ばず簡単なFLASHしか再生できない。