「BSD小僧の日記」
2006/08版 その2



2006/08/11 (金)

4年と180日目 (日常)

色々買ってもらっていた模様です


[View Log(0)]
Name: Comment:

2006/08/12 (土)

4年と181日目 (日常)

何度か電話がありました。色々と説明してくれましたよ。


[View Log(0)]
Name: Comment:

2006/08/13 (日)

4年と182日目 (日常)

戻ってきました。夕食は肉の万世で。おいしかったのう。


[View Log(0)]
Name: Comment:

2006/08/14 (月)

4年と183日目 (日常)

朝の停電で電車が乱れていましたがなんとかなりました。


[View Log(0)]
Name: Comment:

MacBookのインナーケースのにおい (MacBook)

インナーケースのウレタンというかクッションというかそういう素材の独特のにおいが嫌いなので、ずっと干していたのだけど (といっても部屋に転がしておくだけ)、かなりにおいが気にならなくなってきました。

問題は、MacBookを持ち出す元気が出ないくらい外が暑いってことですかね。


[View Log(0)]
Name: Comment:

2006/08/15 (火)

4年と184日目 (日常)

朝起きるのが遅すぎて、ぎりぎり間に合いました。


[View Log(0)]
Name: Comment:

OBS266落ちてました (NetBSD/evbppc)

たまに落ちますねぇ。

db> tr
0x86a5fc00: at bigcopyout+0x90
0x86a5fc30: at copyout+0x5c
0x86a5fcc0: at copyout_proc+0x5c
0x86a5fd10: at uiomove+0x198
0x86a5fd40: at mmrw+0xd4
0x86a5fd70: at spec_read+0xa4
0x86a5fdd0: at ufsspec_read+0x50
0x86a5fde0: at VOP_READ+0x40
0x86a5fe10: at vn_read+0xc8
0x86a5fe40: at dofileread+0x88
0x86a5fea0: at sys_pread+0x138
0x86a5fed0: at syscall_plain+0xe8
0x86a5ff40: user SC trap #198 by 0x41954d40: srr1=0xc030
            r1=0xfffe9dd0 cr=0x20000044 xer=0x20000000 ctr=0x41865708 esr=0 pid=
0x28
db> 


[View Log(0)]
Name: Comment:

2006/08/16 (水)

4年と185日目 (日常)

朝も夜もでした。早く帰ったつもりでも、あまり接する時間が取れないな。


[View Log(0)]
Name: Comment:

PocketPuTTYの背景 (PocketPuTTY)

この日記のトラックバックとかコメントとか、変なのが多いのですが、すごく偶然にちゃんとしたコメントを見つけてしまいました。

どうやら24termみたいに背景が白で文字が黒のPocketPuTTYを提供して欲しいとのこと。

ちょっと調べてみるとsettings.cの値を変更すればいいみたい。配列のおのおのの値はよくわからんのですが、ちょこっと直したらそれっぽく見えるようなやつができました。

--- settings.c	(revision 12)
+++ settings.c	(working copy)
@@ -662,7 +662,7 @@
 
     for (i = 0; i < 22; i++) {
 	static const char *const defaults[] = {
-	    "187,187,187", "255,255,255", "0,0,0", "85,85,85", "0,0,0",
+	    "85,85,85", "0,0,0", "255,255,255", "187,187,187", "255,255,255",
 	    "0,255,0", "0,0,0", "85,85,85", "187,0,0", "255,85,85",
 	    "0,187,0", "85,255,85", "187,187,0", "255,255,85", "0,0,187",
 	    "85,85,255", "187,0,187", "255,85,255", "0,187,187",

さて、これをどうやってコメントくれた人に知らせればいいのかな。メールアドレスとかないし、知り合いの名前でもなさそうなので困ってます。

Wikiに置いてみればいいすかね。


[View Log(39)]
Name: Comment:

2006/08/17 (木)

4年と186日目 (日常)

例によって微妙に遅い時間にでました。今日もぎりぎりで間に合いましたよっと。

何はなくとも夏は水遊びですからね。


[View Log(0)]
Name: Comment:

Mac OS Xでbuild.sh (NetBSD, MacOSX)

途中でエラーになるのでchmod +x move-if-changeというおまじないが必要でした。


[View Log(0)]
Name: Comment:

2006/08/18 (金)

4年と187日目 (日常)

朝も夜も。バーミヤンのなんとかプリンのプリン部分はお気に召さないようでした。


[View Log(0)]
Name: Comment:

epwdog.cがおかしい (NetBSD/evbarm)

evbarm/conf/ARMADILLO9を作ろうとしたのだけどarm/ep93xx/epwdog.cでエラー。

#ifdefが対応していないというメッセージなので変だなと思ってソースを見ると明らかに変。単なるポカミスだよね。これ。

--- epwdog.c.orig       2006-08-19 05:27:01.000000000 +0900
+++ epwdog.c    2006-08-19 04:57:48.000000000 +0900
@@ -78,6 +78,8 @@
 #ifdef DIAGNOSTIC
        else
                printf("%s is already configured?n", sc->sc_dev.dv_xname);
+#endif
+}

send-prしないと。


[View Log(39)]
Name: Comment:

2006/08/19 (土)

4年と188日目 (日常)

朝から駅が届きました。巨大な駅と鉄橋のレールと二つ届きました。置く場所が...

とりあえず、使いこなせていない模様です。

昼食にそうめんを食べて、プール、メビウス、Blood+という定番コースでした。


[View Log(42)]
Name: Comment:

2006/08/20 (日)

4年と189日目 (日常)

恐竜博に行ってきました。2500円という入場料はけっこう良い値段ですね。

自分が子供の頃に比べると、羽毛恐竜やスーパーザウルスやティラノザウルスの親子狩りなどが目新しい話題でした。ブロントザウルスが一番大きな恐竜だと思っていたのだけど今は違うんですね。


[View Log(48)]
Name: Comment:

send-prしたよ (NetBSD/evbarm)

例のepwdog.cの#ifdef閉じ忘れをsend-prしました。 PR34240でございます。

armadillo-devとHさんにメールしました。armadillo-devはひさしぶりだなー。


[View Log(0)]
Name: Comment:

コメントスパムがうっとおしい (日記)

コメントスパムが増えていて、ちゃとしたコメントを見落としてしまうのは困ります。GNSのバージョンをあげればWebインタフェースからコメントの管理ができるので入れ替えたいです。

毎日毎日コメントスパムと戦うのも面倒ですけど。そういう時代なんでしょう。


[View Log(0)]
Name: Comment:

Mac OS Xで秋月のUSBシリアルを使う (MacOSX)

Armadillo-9で遊ぶにはシリアルがあると何かと便利です。MacBookにはシリアルがないのでUSBシリアルという選択肢になります。安価なUSBシリアルとして秋月のUSBシリアルを愛用していますがこれまでMac OS Xで使う機会がなかったので調べてみました。

調べるとGREIF Software /KURO-BOX / Part 4bなどの情報がありProlificのサイトからドライバをダウンロードしました(なぜか今見るとMicrosoft OLE DB Provider for ODBC Driversになっている)。

ちゃんとIntel Mac用のドライバも含まれており、インストール後に再起動するとちゃんとdmesgにPL-2303/X V1.2.1 start, Prolificと表示され、/dev/cu.usbserialが出現しました。

システムプロファイラのハードウェアーUSBーUSBバスにUSB-Serial Controllerとして表示されるようになりました。

USB-Serial Controller:
  バージョン:	3.00
  バスパワー(mA):	500
  速度:	最高 12 Mb/秒
  製造元:	Prolific Technology Inc.
  製品 ID:	0x2303
  製造元 ID:	0x067b

あとはいつものようにtipで接続、と思ったらtipがありません。あろうことかcuすらありません。

先のページを良く読むとminicomやjermを使うと書いてあったのでJermialを使うことに。

Jerminalはソースを持ってきてmakeすればオッケーです(XCode入れていたからあっさり)。実行したらちゃんと動きます。Armadillo-9はシリアルの速度に合わせて-b 115200と速度を指定する必要があります (デフォルトは9600なのかな)。

macbook:~/Desktop/jerm-8095 tokuda$ ./jerm -b 115200 /dev/cu.usbserial 
Jerminal v0.8095  Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 candy
Type "Ctrl-M ~ ." to exit.
 ispeed 115200 ospeed 115200
 +IGNBRK -BRKINT -IGNPAR -PARMRK -INPCK -ISTRIP -INLCR -IGNCR -ICRNL -IXON -IXOFF -IXANY -IMAXBEL
 -OPOST -ONLCR -OXTABS -ONOEOT
 cs8 -CSTOPB +CREAD -PARENB -PARODD +HUPCL +CLOCAL -CCTS_OFLOW -CRTSCTS -CRTS_IFLOW -MDMBUF -ECHOKE -ECHOE -ECHO -ECHONL -ECHOPRT -ECHOCTL -ISIG -ICANON -ALTWERASE -IEXTEN
 -EXTPROC -TOSTOP -FLUSHO -NOKERNINFO -PENDIN -NOFLSH
Hermit v1.3-armadillo9-3 compiled at 16:20:09, Apr 21 2005
Disk drive detected: HMS360604D5CF00 DP4OC40D       DNP450B4VB3DSA 
/dev/hdc1: start=0x0000003f, size=0x00003ec1
Image.gz is found.
Copying        kernel.......done.
Uncompressing  kernel........................................................................................done.
Doing console=ttyAM0,115200

これでシリアルが使えるようになりました。すばらしい。うれしい。


[View Log(0)]
Name: Comment:

アルマジロを復活させる (NetBSD/evbarm, Armadillo)

以前MicroDriveで手順を残していたので、それに従ってパーティションを切ります。ただ、disklabelとnewfsは母艦で実施する必要があります。これまではNetBSD/i386が何らかの形で使えたので良かったのですが今は手近にNetBSD/i386な計算機がありません。ということで、Mac OS Xでやりたいなと思うのが人情です

ということで、Mac OS Xでfdisk, disklabelしてみました。

macbook:/ tokuda$ fdisk /dev/disk2
fdisk: /dev/disk2 is not a character device or a regular file
macbook:/ tokuda$ fdisk /dev/rdisk2
Disk: /dev/rdisk2       geometry: 993/16/63 [1000944 sectors]
Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: 83    0   1   1 -   12  15  63 [        63 -      13041] Linux files*
 2: A9   13   0   1 -  992  15  63 [     13104 -     987840] NetBSD      
 3: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
 4: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
macbook:/ tokuda$ disklabel /dev/disk2
disklabel: cannot create property list: Cannot parse a NULL or zero-length data
disklabel: doProps:  cannot get metadata for device /dev/disk2
macbook:/ tokuda$ disklabel /dev/rdisk2
disklabel: cannot create property list: Cannot parse a NULL or zero-length data
disklabel: doProps:  cannot get metadata for device /dev/rdisk2

fdiskはできそうですけどdisklabelはだめなのかな。一応USBのCFアダプタは光るんだけど。

toolsのdisklabelも試してみました。

macbook:/Volumes/HFSXimage/t/20060816/evbarm/bin tokuda$ ./arm--netbsdelf-disklabel /dev/disk2
arm--netbsdelf-disklabel: could not read existing label
macbook:/Volumes/HFSXimage/t/20060816/evbarm/bin tokuda$ ./arm--netbsdelf-disklabel /dev/rdisk2
arm--netbsdelf-disklabel: could not read existing label
macbook:/Volumes/HFSXimage/t/20060816/evbarm/bin tokuda$ ./arm--netbsdelf-disklabel /dev/rdisk2s1
arm--netbsdelf-disklabel: could not read existing label
macbook:/Volumes/HFSXimage/t/20060816/evbarm/bin tokuda$ ./arm--netbsdelf-disklabel /dev/rdisk2s2
arm--netbsdelf-disklabel: could not read existing label

やっぱりUSBのCFアダプタは点灯してるんですけど駄目みたい。newfsもだめだろうということであきらめです。

ここは自給自足で行こう、と思い立ち以前使っていたMicroDriveでArmadillo-9をNetBSD/evbarmで起動し、Armadillo-9のUSBを使ってCFにdisklabel, newfsしようと思い立ちました。

こんな感じでArmadillo-9に認識されます。

umass0 at uhub0 port 1 configuration 1 interface 0
umass0: BUFFALO MCR-CF/U2, rev 2.00/1.95, addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 1 lun per target
sd0 at scsibus0 target 0 lun 0:  disk removable
sd0: fabricating a geometry
sd0: 488 MB, 488 cyl, 64 head, 32 sec, 512 bytes/sect x 1000944 sectors

disklabelはこんな感じ。

a9# disklabel sd0
sd0(umass0:0:0:0): no door lock
sd0: fabricating a geometry
# /dev/rsd0c:
type: SCSI
disk: mydisk
label: fictitious-MBR
flags:
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 
8 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 c:   1000944         0     unused      0     0        # (Cyl.      0 -    488*)
 e:     13041        63 Linux Ext2      0     0        # (Cyl.      0*-      6*)
 f:    987840     13104     unused      0     0        # (Cyl.      6*-    488*)
disklabel: boot block size 0
disklabel: super block size 0

a9# disklabel -i -I /dev/sd0
sd0: fabricating a geometry
partition> P
8 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 c:   1000944         0     unused      0     0        # (Cyl.      0 -    488*)
 e:     13041        63 Linux Ext2      0     0        # (Cyl.      0*-      6*)
 f:    987840     13104     unused      0     0        # (Cyl.      6*-    488*)
partition> f
Filesystem type [?] [unused]: unused
Start offset ('x' to start after partition 'x') [6.39844c, 13104s, 6.39844M]: 0
Partition size ('$' for all remaining) [482.344c, 987840s, 482.344M]: 0
partition> P
8 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 c:   1000944         0     unused      0     0        # (Cyl.      0 -    488*)
 e:     13041        63 Linux Ext2      0     0        # (Cyl.      0*-      6*)
partition> a
Filesystem type [?] [unused]: 4.2BSD
Start offset ('x' to start after partition 'x') [0c, 0s, 0M]: e
Partition size ('$' for all remaining) [0c, 0s, 0M]: 856640
 a:    856640     13104     4.2BSD      0     0     0  # (Cyl.      6*-    424*)
partition> b
Filesystem type [?] [unused]: swap
Start offset ('x' to start after partition 'x') [0c, 0s, 0M]: a
Partition size ('$' for all remaining) [0c, 0s, 0M]: $
 b:    131200    869744       swap                     # (Cyl.    424*-    488*)
partition> P
8 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:    856640     13104     4.2BSD      0     0     0  # (Cyl.      6*-    424*)
 b:    131200    869744       swap                     # (Cyl.    424*-    488*)
 c:   1000944         0     unused      0     0        # (Cyl.      0 -    488*)
 e:     13041        63 Linux Ext2      0     0        # (Cyl.      0*-      6*)
partition> W
Label disk [n]? y
Label written
partition> Q
a9# 

あとはnewfs -O 2 /dev/sd0aしてArmadillo-9にkernelやらsetsやら転送してpaxで展開して、fstab書いたりrc.conf書いたりすればおしまい。

あぁそうだmount -t ext2fs /dev/sd0e /mntして/mnt/bootにImage.gzという名前でkernel (netbsd.binをgz圧縮したもの) を置いてあげる必要がありましたね。

ということで、ブートメッセージ。

Hermit v1.3-armadillo9-3 compiled at 16:20:09, Apr 21 2005
Disk drive detected: SanDisk SDCFB-512 HDX 2.27     016913K0505E5024 
/dev/hdc1: start=0x0000003f, size=0x000032f1
Image.gz is found.
Copying        kernel.............done.
Copying        kernel.done.
Doing console=ttyAM0,115200
Doing mtdparts=armadillo9-nor:0x10000(bootloader)ro,0x170000(kernel),0x670000(userland),-(config)
NetBSD/Armadillo-9 booting ...
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 (ARMADILLO9) #1: Mon Aug 21 00:17:09 JST 2006
        root@macbook.local:/Volumes/HFSXimage/o/20060816/evbarm/sys/arch/evbarm/compile/ARMADILLO9
total memory = 65536 KB
avail memory = 60612 KB
mainbus0 (root)
cpu0 at mainbus0: ARM920T rev 0 (ARM9TDMI core)
cpu0: DC enabled IC enabled WB enabled EABT
cpu0: 16KB/32B 64-way Instruction cache
cpu0: 16KB/32B 64-way write-back-locking-A Data cache
epsoc0 at mainbus0: Cirrus Logic EP93xx SoC rev E0
epsoc0: fclk 200.02 MHz hclk 100.01 MHz pclk 50.00 MHz
epclk0 at epsoc0 addr 0x80810000-0x8081008f intr 4
epgpio0 at epsoc0 addr 0x80840000-0x808400cb intr 59
gpio0 at epgpio0: port A: 8 pins
gpio1 at epgpio0: port B: 8 pins
gpio2 at epgpio0: port C: 8 pins
gpio3 at epgpio0: port D: 8 pins
gpio4 at epgpio0: port E: 8 pins
gpio5 at epgpio0: port F: 8 pins
gpio6 at epgpio0: port G: 8 pins
gpio7 at epgpio0: port H: 8 pins
epled0 at epgpio0: port E bit1 0 bit2 1
armadillo9iic0 at epgpio0: port B bit1 4 bit2 5
iic0 at armadillo9iic0: I2C bus
seeprom0 at iic0 addr 0x50: AT24Cxx EEPROM
ohci0 at epsoc0 addr 0x80020000-0x80020fff intr 56
epe0 at epsoc0 addr 0x80010000-0x8001ffff intr 39
epe0: MAC address 00:11:0c:02:06:23
lxtphy0 at epe0 phy 0: LXT971/2 10/100 media interface, rev. 2
lxtphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
epcom0 at epsoc0 addr 0x808c0000-0x808c0fff intr 52
epcom0: console
epcom1 at epsoc0 addr 0x808d0000-0x808d0fff intr 54
epwdog0 at epsoc0 addr 0x80940000-0x80940007 intr 36
eppcic0 at epsoc0 addr 0x80080020-0x80080043 intr 49
pcmcia0 at eppcic0
eprtc0 at epsoc0 addr 0x80920000-0x8092010b intr 37
ohci0: OHCI version 1.0
usb0 at ohci0: USB revision 1.0
uhub0 at usb0
uhub0: Cirrus Logic OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 3 ports with 3 removable, self powered
wdc0 at pcmcia0 function 0: <SanDisk, SDP, 5/3 0.6>
wdc0: i/o mapped mode
atabus0 at wdc0 channel 0
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
boot device: <unknown>
root device: wd0a
dump device (default wd0b): 
file system (default generic): 
root on wd0a dumps on wd0b
root file system type: ffs
WARNING: preposterous time in file system
WARNING: CHECK AND RESET THE DATE!
init path (default /sbin/init): 
init: trying /sbin/init
Thu Jan  1 00:02:46 UTC 1970
swapctl: adding /dev/wd0b as swap device at priority 0
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.
Hostname: a9
IPv6 mode: host
Configuring network interfaces: epe0.
add net default: gateway 192.168.100.1
Adding interface aliases:
Building databases...
Starting syslogd.
Checking for core dump...
savecore: no core dump
Setting date via ntp.
Mounting all filesystems...
Clearing /tmp.
Creating a.out runtime link editor directory cache.
Checking quotas: done.
Setting securelevel: kern.securelevel: 0 -> 1
Starting virecover.
Starting local daemons:.
Updating motd.
Starting sshd.
postfix: /etc/mail/aliases newer than /etc/mail/aliases.db, regenerating
postfix/postfix-script: starting the Postfix mail system
Starting inetd.
Starting cron.
Sun Aug 20 16:57:00 UTC 2006
NetBSD/evbarm (a9) (console)
login: 

我が家で4.99なcurrent一番乗り。

ちょっとまてよ、CFだったらswap切ったらいけないんじゃなかったっけ。し、しまった。やりなおしか?


[View Log(0)]
Name: Comment:


メールはこちらへ...[BSD小僧 (tokuda @(at) tokuda .(dot) net)]

この日記は、GNSを使用して作成されています。