玄柴 (eSATA 付き SheevaPlug) に eSATA HDD を接続して 8-STABLE をインス
トールしてみました。いくつかひっかかった所があったので、報告します。

1. GbE リンクアップ

ノート PC の 100BASE-TX ポートとストレートケーブルで直結して使っていて、
U-Boot/Linux では全く問題なかったのですが、 FreeBSD 8 ではリンクアップし
ませんでした。

接続相手を GbE スイッチに変えたところ、リンクアップするようになりました。

2. SATA 対応カーネル

src/sys/arm/conf/SHEEVAPLUG に device ata/atadisk を追加してカーネルを作
り直したところ、 eSATA HDD を認識するようになりました。

3. mount オプション

eSATA HDD を gpart, newfs して mount して読み書きしていると、ファイルが
壊れたり panic したりする問題が発生しました。

mount オプションに noclusterr,noclusterw を指定すれば回避できると教えて
もらい、問題が発生しなくなる事を確認しました。

ただしルートファイルシステムについてはオプションを指定できない為、ソース
を書き換えて (オプションを埋め込んで) 回避しました。

4. マルチユーザモード

起動モードを指定できない為、デフォルトのシングルユーザモードで起動してし
まいます。

これもソースを書き換えて、デフォルトでマルチユーザモードで起動するように
しました。

5. UFS 対応 U-Boot

標準の U-Boot は UFS が読めないので、以下のパッチをあてて作り直しました。

  http://blog.springdaemons.com/2008/10/31/u-boot-ffs-ufs-support

----

玄柴で build した FreeBSD/arm バイナリ tree 、 SATA 対応 SHEEVAPLUG カー
ネル (NFS root 用) 、およびパッチを以下に置きました。

  http://www.naobsd.org/sheeva/freebsd/

ちなみに buildworld に 7 時間、 buildkernel に 20 分かかりました。

UFS 対応 U-Boot バイナリも以下にあります。

  http://www.naobsd.org/sheeva/u-boot-rd88f6281Sheevaplug_400db_nand.bin

(こちらはちょっと場所が変わるかもしれません)


最後に、 dmesg を付けておきます。 (NFS root 用カーネルでの起動時)

みなさんも玄柴 (or SheevaPlug) を手に入れて遊んでみませんか ?

--
ふかうみ なおき

         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_ 
| | | |___|  _ \ / _ \ / _ \| __| 
| |_| |___| |_) | (_) | (_) | |_ 
 \___/    |____/ \___/ \___/ \__| 
 ** MARVELL BOARD: SHEEVA PLUG LE 

U-Boot 1.1.4 (Dec 28 2009 - 22:23:56) Marvell version: 3.4.27

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFB00

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
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:512 MB
Flash:  0 kB

CPU : Marvell Feroceon (Rev 1)

Streaming disabled 
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  0 
Marvell>> tftp 900000 kernel.bin
Using egiga0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.48
Filename 'kernel.bin'.
Load address: 0x900000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ############################
done
Bytes transferred = 2802356 (2ac2b4 hex)
Marvell>> go 900000
## Starting application at 0x00900000 ...
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2009 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 8.0-STABLE #0: Thu Dec 31 15:05:19 UTC 2009
    r...@arm-fbsd8.naobsd.org:/usr/obj/usr/src/sys/SHEEVAPLUG arm
Preloaded elf kernel "elf kernel" at 0xc0bc5d04.
CPU: Feroceon 88FR131 rev 1 (write-through core)
  WB enabled EABT branch prediction enabled
  16KB/32B 4-way Instruction cache
  16KB/32B 4-way write-back-locking-C Data cache
real memory  = 536870912 (512 MB)
Physical memory chunk(s):
00000000 - 0x8fffff, 9437184 bytes (2304 pages)
0xcbb000 - 0x1f64bfff, 513347584 bytes (125329 pages)
avail memory = 520552448 (496 MB)
SOC: (0x6281:0x02) Marvell 88F6281 rev A0, TClock 200MHz
null: <null device, zero device>
random: <entropy source, Software, Yarrow>
nfslock: pseudo-device
mem: <memory>
mbus0: <Marvell Internal Bus (Mbus)> on motherboard
ic0: <Marvell Integrated Interrupt Controller> at mem 0xf1020200-0xf102023b on 
mbus0
timer0: <Marvell CPU Timer> at mem 0xf1020300-0xf102032f irq 1 on mbus0
timer0: [FILTER]
rtc0: <Marvell Integrated RTC> at mem 0xf1010300-0xf1010307 on mbus0
rtc0: registered as a time-of-day clock (resolution 1000000us)
gpio0: <Marvell Integrated GPIO Controller> at mem 0xf1010100-0xf101011f irq 
35,36,37,38,39,40,41 on mbus0
gpio0: [FILTER]
gpio0: [FILTER]
gpio0: [FILTER]
gpio0: [FILTER]
gpio0: [FILTER]
gpio0: [FILTER]
gpio0: [FILTER]
uart0: <16550 or compatible> at mem 0xf1012000-0xf101201f irq 33 on mbus0
uart0: [FILTER]
uart0: fast interrupt
uart0: console (115740,n,8,1)
uart1: <16550 or compatible> at mem 0xf1012100-0xf101211f irq 34 on mbus0
uart1: [FILTER]
uart1: fast interrupt
ehci0: <Marvell Integrated USB 2.0 controller> at mem 0xf1050000-0xf1050fff irq 
48,19 on mbus0
ehci0: [FILTER]
ehci0: [MPSAFE]
ehci0: [ITHREAD]
ehci0: 5.24 GL USB-2 workaround enabled
usbus0: EHCI version 1.0
usbus0: set host controller mode
usbus0: <Marvell Integrated USB 2.0 controller> on ehci0
mge0: <Marvell Gigabit Ethernet controller> at mem 0xf1072000-0xf1073fff irq 
12,13,14,11,46 on mbus0
mge0: bpf attached
mge0: Ethernet address: **:**:**:**:**:**
miibus0: <MII bus> on mge0
e1000phy0: <Marvell 88E1116R Gigabit PHY> PHY 0 on miibus0
e1000phy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 
1000baseT-FDX, auto
mge0: [MPSAFE]
mge0: [ITHREAD]
mge0: [MPSAFE]
mge0: [ITHREAD]
sata0: <Marvell Integrated SATA Controller> at mem 0xf1080000-0xf1085fff irq 21 
on mbus0
sata0: [MPSAFE]
sata0: [ITHREAD]
ata0: <Marvell Integrated SATA Channel> on sata0
ata0: hardware reset ...
ata0: SATA connect timeout status=00000000
ata0: [MPSAFE]
ata0: [ITHREAD]
ata1: <Marvell Integrated SATA Channel> on sata0
ata1: hardware reset ...
ata1: SATA connect time=0ms status=00000123
ata1: reset tp1 mask=01 ostat0=80 ostat1=00
ata1: stat0=0x50 err=0x01 lsb=0x00 msb=0x00
ata1: reset tp2 stat0=50 stat1=00 devices=0x1
ata1: [MPSAFE]
ata1: [ITHREAD]
Timecounter "CPU Timer" frequency 200000000 Hz quality 1000
Timecounters tick every 1.000 msec
vlan: initialized, using hash tables with chaining
lo0: bpf attached
ata0: Identifying devices: 00000000
ata0: New devices: 00000000
ata1: Identifying devices: 00000001
ata1: New devices: 00000001
usbus0: 480Mbps High Speed USB v2.0
ata1-master: pio=PIO4 wdma=WDMA2 udma=UDMA133 cable=40 wire
ad0: setting UDMA100
ad0: 238475MB <SAMSUNG HM250HI ********> at ata1-master UDMA100 SATA 3Gb/s
ad0: 488397168 sectors [484521C/16H/63S] 16 sectors/interrupt 1 depth queue
bootpc_init: wired to interface 'mge0'
Sending DHCP Discover packet from interface mge0 (**:**:**:**:**:**)
GEOM: new disk ad0
ugen0.1: <Marvell> at usbus0
uhub0: <Marvell EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
uhub0: 1 port with 1 removable, self powered
mge0: link state changed to UP
Received DHCP Offer packet on mge0 from 192.168.1.1 (accepted) (no root path)
Sending DHCP Request packet from interface mge0 (**:**:**:**:**:**)
Received DHCP Ack packet on mge0 from 192.168.1.1 (accepted) (got root path)
mge0 at 192.168.1.48 server 192.168.1.1
subnet mask 255.255.255.0 router 192.168.1.1 root_server 192.168.1.1 rootfs 
/home/sheeva 
Adjusted interface mge0
ifa_del_loopback_route: deletion failed
Trying to mount root from nfs:
NFS ROOT: 192.168.1.1:/home/sheeva
ct_to_ts([2009-12-31 17:08:41]) = 1262279321.000000000
ct_to_ts([2009-12-31 17:08:41]) = 1262279321.000000000
start_init: trying /sbin/init
Enter full pathname of shell or RETURN for /bin/sh: 

メールによる返信