投稿者「anonymous」のアーカイブ

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

手順

ブートローダーのredbootがext2しか対応していないので/bootはext2にする
その際ext2 はinode128バイトでないといけないのでフォーマット時に-I 128をつける
ext2はFreeBSDで作成するとブート時に失敗したのでLinuxにて作成
とりあえず簡潔にインストール先ディスクのフォーマット
/boot ext2 128MB
/   UFS2 残り
ビルド用マシンにマウント
mount -t ufs /dev/da1s2 /usr/local/cross/HDL-G
mkdir /usr/local/cross/HDL-G/boot
mount -t ext2fs /dev/da1s2 /usr/local/cross/HDL-G/boot
ソースは9-STABLE rev 238461
/usr/armsrc/sys/arm/conf/HDL-Gとしてカーネル設定ファイルをI80321とEP80219をベースに作成
試行錯誤中のためいろいろと有効化したり、無効化したり
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
/usr/armsrc/sys/arm/conf/HDL-G.hintとして作成してハードウェアが認識するなど一定の効果はあるが、試行錯誤中
#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
完了したらディスクをGIGA LANDISKに付け替えて電源ON。
本来ならzImageを読みに行くはずがエラーでredbootのコンソールがでるので
試行錯誤の末、以下のコマンドでブートができることを確認
RedBoot> load hda1:/kernel/kernel -r -v -b 0x00200000 -m disk
Raw file loaded 0x00200000-0x00737b09, assumed entry at 0x00200000
RedBoot> go
現在のdmesg
RedBoot> load hda1:/kernel/kernel -r -v -b 0x00200000 -m disk
Raw file loaded 0x00200000-0x00737b09, assumed entry at 0x00200000
RedBoot> go
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2012 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 9.1-PRERELEASE #11 r238461M: Thu Jan  1 09:00:00 JST 1970
    root@dummy:/usr/obj/arm.arm/usr/armsrc/sys/HDL-G arm
CPU: i80219 400MHz step A-0 (XScale core)
  DC enabled IC enabled WB enabled LABT branch prediction enabled
  32KB/32B 32-way Instruction cache
  32KB/32B 32-way write-back-locking Data cache
real memory  = 134217728 (128 MB)
avail memory = 122863616 (117 MB)
iq0: <Intel 80321> on motherboard
obio0 on iq0
uart0: <16550 or compatible> on obio0
uart0: console (115200,n,8,1)
itimer0: <i80321 timer> on iq0
iopwdog0: <i80321 Watchdog, must be tickled every 7 seconds> on iq0
pcib0: <i80321 PCI bus> on iq0
pci0: <PCI bus> on pcib0
Device 1 routed to irq 27
Device 2 routed to irq 28
Device 3 routed to irq 29
Device 3 routed to irq 29
Device 3 routed to irq 29
em0: <Intel(R) PRO/1000 Legacy Network Connection 1.0.4> irq 27 at device 1.0 on pci0
em0: Memory Access and/or Bus Master bits were not set!
em0: 0x40 bytes of rid 0x20 res 4 failed (0, 0xffffffff).
em0: Unable to allocate bus resource: ioport
em0: Allocation of PCI resources failed
device_attach: em0 attach returned 6
atapci0: <Acard ATP865R UDMA133 controller> port 0xfe400000-0xfe400007,0xfe400008-0xfe40000b,0xfe400010-0xfe400017,0xfe400018-0xfe40001b,0xfe400020-0xfe40002f irq 28 at device 2.0 on pci0
ata2: <ATA channel> at channel 0 on atapci0
ata3: <ATA channel> at channel 1 on atapci0
ohci0: <NEC uPD 9210 USB controller> irq 29 at device 3.0 on pci0
usbus0 on ohci0
ohci1: <NEC uPD 9210 USB controller> irq 29 at device 3.1 on pci0
usbus1 on ohci1
ehci0: <NEC uPD 720100 USB 2.0 controller> irq 29 at device 3.2 on pci0
usbus2: EHCI version 1.0
usbus2 on ehci0
i80321_dma0: <I80321 DMA Unit> on iq0
i80321_dma1: <I80321 DMA Unit> on iq0
Timecounter “i80321 timer” frequency 594000000 Hz quality 1000
Timecounters tick every 10.000 msec
usbus0: 12Mbps Full Speed USB v1.0
usbus1: 12Mbps Full Speed USB v1.0
usbus2: 480Mbps High Speed USB v2.0
Fatal kernel mode data abort: ‘External Linefetch Abort (P)’
trapframe: 0xc6f20c40
FSR=00000406, FAR=Invalid,  spsr=a0000013
r0 =c06e1800, r1 =fe400000, r2 =00000000, r3 =c06e1870
r4 =c06e1800, r5 =fe400000, r6 =00000000, r7 =c054f0d8
r8 =c0683000, r9 =00000000, r10=c0679380, r11=c6f20cb0
r12=c6f20cb4, ssp=c6f20c8c, slr=c023c8b0, pc =c023c8ac
[ thread pid 2 tid 100032 ]
Stopped at      ata_set_desc+0xa8:      ldr     r15, [r3, #0x01c]
db>
ここまでは2010年11月の時点で到達していたが、今回再度挑戦したが特に変わらず同じところでエラー。
とりあえず調べ中

 

FreeBSD 9でBSD-licensed grepとBSD-licensed libiconvをインストールする

FreeBSD9から脱GNUの一環としてBSD-licensed grepBSD-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しか再生できない。

続きを読む

winrar

rarコマンド使用例メモ

winrarrarはWindowsであればwinrarで主にGUIで操作できるので、
あまり不自由しないが、その他のOSだとオフィシャルでは
CUIで操作するのでそのためのメモ

#書庫を作成
rar a test.rar 1.txt 2.txt 3.txt

#圧縮レベル最高で書庫を作成
rar a -m5 test.rar 1.txt 2.txt 3.txt

#圧縮レベル最高でパスワード付き書庫を作成
# 作成時にパスワードを入力
rar a -m5 -p test.rar 1.txt 2.txt 3.txt
# コマンドからそのままパスワードも指定
rar a -m5 -pパスワード test.rar 1.txt 2.txt 3.txt

#圧縮レベル最高で中身を暗号化したパスワード付き書庫を作成
rar a -m5 -hp test.rar 1.txt 2.txt 3.txt
rar a -m5 -hpパスワード test.rar 1.txt 2.txt 3.txt

#圧縮レベル最高で中身を暗号化したパスワード付け、1%のリカバリーレコードを付けた書庫を作成
rar a -m5 -rr1 -hp test.rar 1.txt 2.txt 3.txt
rar a -m5 -rr1 -hpパスワード test.rar 1.txt 2.txt 3.txt

#既存の書庫に1%のリカバリーレコードを付ける
rar rr1 test.rar

#既存の書庫にコメントを付ける
rar c test.rar
echo “コメント” | rar c test.rar

#書庫の中身を表示
rar l test.rar
rar lt test.rar
rar lb test.rar

#書庫をここに展開
rar e test.rar