やっと700台にのせました。通常曲だとヘリングローのExtができないすね。あとはExtra Stageのクラパ3のExtとOne PhraseのAdv, Extかな。One Phrase Advは試してもいないなぁ。
しかし、5倍速効果すごいね。
先週の日曜日にIKEAで買ってきた照明をPCを使うデスクの近くに取り付けました。
10Wの小さな照明を二つ、木ネジで棚板に取り付けました。蛍光灯ではなく電球なので良く言えば暖かみのある色で、悪く言えばOA向きっぽくない色の照明です。
確かに明るくなるのですが、なんかしっくりこないですねぇ。やっぱり蛍光灯の白い光に慣れているからなのでしょうか?
stand/bootでエラーが出たので、ちょこちょこと直すとreleaseできました。あとはport-sh3 2006-08-24のパッチを当てました。
--- sys/arch/landisk/stand/boot/getsecs.c.orig 2006-09-14 12:55:50.000000000 +0900 +++ sys/arch/landisk/stand/boot/getsecs.c 2006-09-14 21:39:46.000000000 +0900 @@ -14,7 +14,7 @@ #include <sh3/devreg.h> #include <sh3/scireg.h> -#include <arch/landisk/dev/rs5c313reg.h> +#include <dev/ic/rs5c313reg.h> /** * RICOH RS5C313 @@ -173,19 +173,19 @@ #endif time_t secs; - sec = rtc_read(RS5C313_ADDR_SEC1); - sec += rtc_read(RS5C313_ADDR_SEC10) * 10; - min = rtc_read(RS5C313_ADDR_MIN1); - min += rtc_read(RS5C313_ADDR_MIN10) * 10; - hour = rtc_read(RS5C313_ADDR_HOUR1); - hour += rtc_read(RS5C313_ADDR_HOUR10) * 10; - day = rtc_read(RS5C313_ADDR_DAY1); - day += rtc_read(RS5C313_ADDR_DAY10) * 10; + sec = rtc_read(RS5C313_SEC1); + sec += rtc_read(RS5C313_SEC10) * 10; + min = rtc_read(RS5C313_MIN1); + min += rtc_read(RS5C313_MIN10) * 10; + hour = rtc_read(RS5C313_HOUR1); + hour += rtc_read(RS5C313_HOUR10) * 10; + day = rtc_read(RS5C313_DAY1); + day += rtc_read(RS5C313_DAY10) * 10; #if 0 - mon = rtc_read(RS5C313_ADDR_MON1); - mon += rtc_read(RS5C313_ADDR_MON10) * 10; - year = rtc_read(RS5C313_ADDR_YEAR1); - year += rtc_read(RS5C313_ADDR_YEAR10) * 10; + mon = rtc_read(RS5C313_MON1); + mon += rtc_read(RS5C313_MON10) * 10; + year = rtc_read(RS5C313_YEAR1); + year += rtc_read(RS5C313_YEAR10) * 10; #endif secs = sec;
512MbytesのSanDiskのCFを使います。母艦は古いバージョンがインストールされたUSL-5Pです。
まずは、CFの認識っぷりです。
Sep 16 16:18:24 usl-5p /netbsd: umass0 at uhub2 port 1 configuration 1 interface 0 Sep 16 16:18:25 usl-5p /netbsd: Sep 16 16:18:25 usl-5p /netbsd: umass0: BUFFALO MCR-CF/U2, rev 2.00/1.95, addr 2 Sep 16 16:18:25 usl-5p /netbsd: umass0: using SCSI over Bulk-Only Sep 16 16:18:25 usl-5p /netbsd: scsibus0 at umass0: 2 targets, 1 lun per target Sep 16 16:18:25 usl-5p /netbsd: sd0 at scsibus0 target 0 lun 0: <BUFFALO, MCR HS-CF, 1.95> disk removable Sep 16 16:18:25 usl-5p /netbsd: sd0: fabricating a geometry Sep 16 16:18:25 usl-5p /netbsd: sd0: 488 MB, 488 cyl, 64 head, 32 sec, 512 bytes/sect x 1000944 sectors
fdiskで様子を確認します。DOSの領域がありますね。
usl-5p# fdisk sd0 Disk: /dev/rsd0d NetBSD disklabel disk geometry: cylinders: 488, heads: 64, sectors/track: 32 (2048 sectors/cylinder) total sectors: 1000944 BIOS disk geometry: cylinders: 993, heads: 16, sectors/track: 63 (1008 sectors/cylinder) total sectors: 1000944 Partition table: 0: Primary 'big' DOS, 16-bit FAT (> 32MB) (sysid 6) start 63, size 1000881 (489 MB, Cyls 0-993), Active 1: <UNUSED> 2: <UNUSED> 3: <UNUSED> usl-5p#
disklabelも確認しておきます。
usl-5p# disklabel sd0 # /dev/rsd0d: type: SCSI disk: mydisk label: fictitious flags: removable bytes/sector: 512 sectors/track: 32 tracks/cylinder: 64 sectors/cylinder: 2048 cylinders: 488 total sectors: 1000944 rpm: 3600 interleave: 1 trackskew: 0 cylinderskew: 0 headswitch: 0 # microseconds track-to-track seek: 0 # microseconds drivedata: 0 5 partitions: # size offset fstype [fsize bsize cpg/sgs] d: 1000944 0 unused 0 0 # (Cyl. 0 - 488*) e: 1000881 63 MSDOS # (Cyl. 0*- 488*) disklabel: boot block size 0 disklabel: super block size 0 usl-5p#
ddを使ってセクタの先頭を破壊し、MBRを書き込みます。
usl-5p# dd if=/dev/zero of=/dev/rsd0d count=100 100+0 records in 100+0 records out 51200 bytes transferred in 0.313 secs (163578 bytes/sec) usl-5p# dd if=usr/mdec/mbr of=/dev/rsd0d bs=512 count=1 1+0 records in 1+0 records out 512 bytes transferred in 0.015 secs (34133 bytes/sec) usl-5p#
ddの結核ぉfdiskで確認します。
usl-5p# fdisk sd0 Disk: /dev/rsd0d NetBSD disklabel disk geometry: cylinders: 488, heads: 64, sectors/track: 32 (2048 sectors/cylinder) total sectors: 1000944 BIOS disk geometry: cylinders: 488, heads: 64, sectors/track: 32 (2048 sectors/cylinder) total sectors: 1000944 Partition table: 0: <UNUSED> 1: <UNUSED> 2: <UNUSED> 3: <UNUSED> usl-5p#
fdiskでNetBSDのパーティション(sysid 169)を作ります。
usl-5p# fdisk -0 -u sd0 Disk: /dev/rsd0d NetBSD disklabel disk geometry: cylinders: 488, heads: 64, sectors/track: 32 (2048 sectors/cylinder) total sectors: 1000944 BIOS disk geometry: cylinders: 488, heads: 64, sectors/track: 32 (2048 sectors/cylinder) total sectors: 1000944 Do you want to change our idea of what BIOS thinks? [n] Partition 0: <UNUSED> The data for partition 0 is:sysid: [0..255 default: 169] start: [0..489cyl default: 32, 0cyl, 0MB] size: [0..489cyl default: 1000912, 489cyl, 489MB] We haven't written the MBR back to disk yet. This is your last chance. Partition table: 0: NetBSD (sysid 169) start 32, size 1000912 (489 MB, Cyls 0-488/47/17) 1: <UNUSED> 2: <UNUSED> 3: <UNUSED> Should we write new partition table? [n] y
作成した領域をアクティブにします。
usl-5p# fdisk -a sd0 Disk: /dev/rsd0d NetBSD disklabel disk geometry: cylinders: 488, heads: 64, sectors/track: 32 (2048 sectors/cylinder) total sectors: 1000944 BIOS disk geometry: cylinders: 489, heads: 64, sectors/track: 32 (2048 sectors/cylinder) total sectors: 1000944 Partition table: 0: NetBSD (sysid 169) start 32, size 1000912 (489 MB, Cyls 0-488/47/17) 1: <UNUSED> 2: <UNUSED> 3: <UNUSED> Do you want to change the active partition? [n] y Choosing 4 will make no partition active. active partition: [0..4 default: 4] 0 Are you happy with this choice? [n] y We haven't written the MBR back to disk yet. This is your last chance. Should we write new partition table? [n] y usl-5p#
disklabelを作成します。sd0aに領域の全体を割り当てます。sd0eはいらないので消しててしまいました。
usl-5p# disklabel -i -I sd0 partition> P 5 partitions: # size offset fstype [fsize bsize cpg/sgs] c: 1000912 32 unused 0 0 # (Cyl. 0*- 488*) d: 1000944 0 unused 0 0 # (Cyl. 0 - 488*) e: 1000912 32 4.2BSD 0 0 0 # (Cyl. 0*- 488*) partition> a Filesystem type [?] [unused]: 4.2BSD Start offset ('x' to start after partition 'x') [0c, 0s, 0M]: 32 Partition size ('$' for all remaining) [0c, 0s, 0M]: $ a: 1000912 32 4.2BSD 0 0 0 # (Cyl. 0*- 488*) partition> e Filesystem type [?] [4.2BSD]: unused Start offset ('x' to start after partition 'x') [0.015625c, 32s, 0.015625M]: 0 Partition size ('$' for all remaining) [488.727c, 1000912s, 488.727M]: 0 partition> P 5 partitions: # size offset fstype [fsize bsize cpg/sgs] a: 1000912 32 4.2BSD 0 0 0 # (Cyl. 0*- 488*) c: 1000912 32 unused 0 0 # (Cyl. 0*- 488*) d: 1000944 0 unused 0 0 # (Cyl. 0 - 488*) partition> w Unknown command w partition> W Label disk [n]? y Label written partition> Q usl-5p#
newfsします。FFSv1でnewfsします。
usl-5p# newfs /dev/rsd0a /dev/rsd0a: 488.7MB (1000912 sectors) block size 8192, fragment size 1024 using 11 cylinder groups of 44.43MB, 5687 blks, 11008 inodes. super-block backups (for fsck -b #) at: 32, 91024, 182016, 273008, 364000, 454992, 545984, 636976, 727968, 818960, 909952, usl-5p#
installbootでbootxx_ffsv1をインストールします。landiskに対応したinstallbootを使う必要があります。
usl-5p# installboot -m landisk -v /dev/rsd0a usr/mdec/bootxx_ffsv1 File system: /dev/rsd0a File system type: ffs (blocksize 8192, needswap 0) Primary bootstrap: usr/mdec/bootxx_ffsv1 Ignoring MBR with invalid magic in sector 0 of `/dev/rsd0a' usl-5p#
bootを/にコピーします。
usl-5p# mount /dev/sd0a /mnt && cp usr/mdec/boot /mnt usl-5p#
base.tgz, etc.tgz, kernelを展開します。build.sh releaseで作るとGENERICなkernelは作られますがUSL-5P用のkernelは作成されないので事前にbuild.sh kernel=USL-5Pなどと作成しておきます。
usl-5p# cp /mnt usl-5p# pax -rzpe -f /tmp/base.tgz usl-5p# pax -rzpe -f /tmp/etc.tgz usl-5P# gunzip -c /tmp/netbsd-USL-5P.gz > ./netbsd
MAKEDEVします。
usl-5p# cd dev usl-5p# ./MAKEDEV all
fstabを作成、rc.confを編集しマルチユーザモードで起動するよう設定します。swapは作成しませんでした。仮想記憶を食いつぶすような大きなプログラムを動かすとき(pkgsrcなど)はNFS経由のswapを使うことで対応するつもりです。
usl-5p# cd ../etc usl-5p# cat /etc/fstab /dev/wd0a / ffs rw,softdep 1 1 usl-5p# echo /dev/wd0a / ffs rw,softdep 1 1 /dev/wd0a / ffs rw,softdep 1 1 usl-5p# echo /dev/wd0a / ffs rw,softdep 1 1 > ./fstab usl-5p# ed rc.conf 517 /NO # Use program=YES to enable program, NO to disable it. program_flags are / rc_configured=NO s/NO/YES rc_configured=YES w 518 q usl-5p# sync
umountします。
usl-5p# cd / usl-5p# umount /mnt
母艦での作業は以上で完了です。いざ、bootです。
usl-5p# tip com1 connected SH IPL+g version 0.9, Copyright (C) 2000 Free Software Foundation, Inc. This software comes with ABSOLUTELY NO WARRANTY; for details type `w'. This is free software, and you are welcome to redistribute it under certain conditions; type `l' for details. 2002/09/09 Making. 2004/09/08 I-O DATA NSU Update. 266:133:33 on base clock 22.22MHz and SDRAM 4 burst. CF boot. PCIC initialization done. MASTER:48bit LBA mode non support Disk drive detected: SanDisk SDCFB-512 HDX 2.27 020801K0405P0125 LBA: 000F45F0 DiskSize: 512483328Byte PIO MODE1 Set Transfer Mode result: 50 > b Set Transfer Mode result: 50 Initialize Device Parameters result: 50 IDLE result: 50 NetBSD MBR boot NetBSD/landisk ffsv1 Primary Bootstrap >> NetBSD/landisk Boot, Revision 1.0 >> (root@macbook.local, Thu Sep 14 16:13:11 JST 2006) Press return to boot now, any other key for boot menu booting hd0a:netbsd - starting in 0 3598944+195592 [206880+199140]=0x401c38 Start @ 0x8c001000 [1=0x8c39f668-0x8c402c38]... Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 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 4.99.1 (USL-5P) #0: Sun Sep 17 02:08:40 JST 2006 tokuda@macbook.local:/Volumes/HFSXimage/o/20060911/sys/arch/landisk/compile/USL-5P Model: I-O DATA LANDISK total memory = 65536 KB avail memory = 58356 KB sysctl_createv: sysctl_create(security) returned 17 mainbus0 (root) cpu0 at mainbus0: HITACHI SH4 266.666 MHz PCLOCK 33.333 MHz cpu0: 8KB/32B direct-mapped Instruction cache. cpu0: 16KB/32B direct-mapped Data cache. cpu0: P0, U0, P3 write-through; P1 write-through cpu0: full-associative 4 ITLB, 64 UTLB entries cpu0: multiple virtual storage mode, SQ access: kernel, wired 61 shpcic0 at mainbus0: HITACHI SH7751R pci0 at shpcic0 pci0: i/o space, memory space enabled rtk0 at pci0 dev 0 function 0: Realtek 8139 10/100BaseTX rtk0: interrupting at irq 5 rtk0: Ethernet address 00:a0:b0:65:15:c2 rlphy0 at rtk0 phy 7: Realtek internal PHY rlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto ohci0 at pci0 dev 2 function 0: NEC USB Host Controller (rev. 0x43) ohci0: interrupting at irq 7 ohci0: OHCI version 1.0 usb0 at ohci0: USB revision 1.0 uhub0 at usb0 uhub0: NEC OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 3 ports with 3 removable, self powered ohci1 at pci0 dev 2 function 1: NEC USB Host Controller (rev. 0x43) ohci1: interrupting at irq 8 ohci1: OHCI version 1.0 usb1 at ohci1: USB revision 1.0 uhub1 at usb1 uhub1: NEC OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered ehci0 at pci0 dev 2 function 2: NEC USB Host Controller (rev. 0x04) ehci0: interrupting at irq 5 ehci0: BIOS has given up ownership ehci0: EHCI version 1.0 ehci0: companion controllers, 3 ports each: ohci0 ohci1 usb2 at ehci0: USB revision 2.0 uhub2 at usb2 uhub2: NEC EHCI root hub, class 9/0, rev 2.00/1.00, addr 1 uhub2: 5 ports with 5 removable, self powered shb0 at mainbus0 scif0 at shb0 scif0: console rs5c313rtc0 at shb0: RS5C313 real time clock obio0 at mainbus0 wdc0 at obio0 port 0x14000000-0x1400000f irq 10 atabus0 at wdc0 channel 0 btn0 at obio0 irq 12: USL-5P Button pwrsw0 at obio0 irq 11: Power Switch Kernelized RAIDframe activated wd0 at atabus0 drive 0: <SanDisk SDCFB-512> wd0: drive supports 1-sector PIO transfers, LBA addressing wd0: 488 MB, 993 cyl, 16 head, 63 sec, 512 bytes/sect x 1000944 sectors wd0: drive supports PIO mode 4, DMA mode 2 boot device: wd0 root on wd0a dumps on wd0b Sat Sep 16 18:16:50 UTC 2006 Checking for botched superblock upgrades: done. Starting file system checks: /dev/rwd0a: file system is clean; not checking Setting tty flags. Setting sysctl variables: Starting network. /etc/rc: WARNING: $hostname not set. IPv6 mode: host Configuring network interfaces:. Adding interface aliases: Building databases... Starting syslogd. Checking for core dump... savecore: /dev/wd0b: Device not configured Sep 16 18:17:02 savecore: /dev/wd0b: Device not configured Mounting all filesystems... Clearing /tmp. Checking quotas: done. Setting securelevel: kern.securelevel: 0 -> 1 /etc/rc: WARNING: No swap space configured! Starting virecover. Starting local daemons:. Updating motd. postfix: rebuilding /etc/mail/aliases (missing /etc/mail/aliases.db) newaliases: warning: valid_hostname: empty hostname newaliases: fatal: unable to use my own hostname Sep 16 18:17:08 postfix/sendmail[404]: fatal: unable to use my own hostname Starting inetd. Starting cron. Sat Sep 16 18:17:10 UTC 2006 NetBSD/landisk (Amnesiac) (console) login:
あれ? rootでログインパスワード聞かれるんだけどなんでだろ?
しかたないのでPowerスイッチを押してshutdownします。ボタンが使えるので便利ですね。
login: pwrsw0: power button pressed, shutting down! syncing disks... done unmounting file systems... done
ブート時のカウントダウンのとき(Press return to boot now, any other key for boot menu と表示されている)にスペースキーを押して、プロンプトにboot -sと入力すればシングルユーザモードで起動するので、それを使ってログインします。
どうやらパーミッションがおかしいみたい。uid 501, gid 99になっているようです。Mac OS Xではgid 99はunknownですがuid 501は存在しません。いったいなんなんだろう。idコマンドで調べるとMac OS Xでの自分のユーザIDでした。
しかたないので、ルートディレクトリでchown -R root:wheelして応急処置です。
Mac OS Xでのbuild.shだとrelease時のtgzを作るときにpermissionをちゃんと設定できていないのでしょうか?
build.shの-Uオプションが必要なのかなぁ。sudoで実行しているのも関係しているのだろうか?
どうやらbuild.shに-Uをつけて作れば良いことがわかりました。sudo不要ですね。
中途半端にsudoでbuild.shしたあとに-Uをつけてbuild.sh releaseするとrelease物にファイルが不足する事態が発生しましたが、おそらくパーミッションが想定する物でなかったためでしょう。きれいに一から作り直せばちゃんとしたものができました。
思い立ち、miniにNetBSDを入れることにしました。
relengからsnapshotをもらってきてインストールです。例によって、OpenFirmwareのブート方法を忘れるなど、色々と楽しいものです。
ひととおりはまりましたけど、インストールは完了しました。
pkgsrcから色々作ってインストールしないとね。
メールはこちらへ...[BSD小僧 (tokuda @(at) tokuda .(dot) net)]
この日記は、GNSを使用して作成されています。