なぜかあっさり寝た。
また鼻水が。二日連続でサクっと寝た。
大量に補間。もはや忘れ去っている。
これからは真面目にかこう。
mpc860-031012.tar.gzをためす。藤原さんと同じところで止まるのでuserlandは置いといてkernelを作る。
mpc860/mpc860/trap.cのtrapsignalで止まるので調べてみるとsys/signalvar.hで
#ifdef __HAVE_SIGINFO void trapsignal __P((struct lwp *, const struct ksiginfo *)); #else void trapsignal __P((struct lwp *, int, u_long)); #endifという定義が見つかった。powerpc/powerpc/trap.cを見ると
KSI_INIT_TRAP(&ksi);
ksi.ksi_signo = SIGTRAP;
ksi.ksi_addr = (void *)frame->srr0;
ksi.ksi_trap = EXC_TRC;
ksi.ksi_code = TRAP_TRACE;
trapsignal(l, &ksi);
という記述になっているので、単純にsigno, trapを併せて書き換えるとcompileがとおってkernelができたようだ。
動かすの面倒だな。
ひさしぶりに自転車。やっぱし楽だなぁ。
某所からの指令でNetBSD/evbppcを作ることにした。
NFS bootは相変わらず動いていないみたい。
なんか/sbin/initが動いた時点からconsoleが文字化けするという事象が起きているらしい。
と、思ったらNFS boot直っているらしいとの情報。今作っているのは、えーっと、いつのやつだっけ。
元気だが鼻水が。
自作release scriptで作っていたのが災いして、すべてのsrc, destdir, objdirをきれいさっぱり消していた。
ので、つくりなおす。
昼寝をしたつもりが18:40って。
藤原さんのところでも動いていないみたいですねぇ。
ここ最近に再インストールしてXFree86.orgから最新の版をもってきたり、あれこれ試しましたがXFree86-4では真っ暗になってしまい駄目でした。結局のところXFree86-3で動かしています。
FreeBSDならアッサリとXFree86-4で動いたので悔しいなと。
本家のsource treeに入って初めてOPENBLOCKS266なkernelを作る。
環境を一から作りなおしたのでtftpdとかNFSの設定とかいろいろやり直す。
んで、これまで壊れていたNFS bootが動くようになっているのでとても便利になった。
IDEコントローラのHPT371が認識されなくなっているようだ。まぁ、当然か。
んで、噂どおり/sbin/initの実行直後から文字化けする。
405GPr 1.2 ROM Monitor (5/25/02)
--------------------- System Info ----------------------
Processor = 405GPr (New mode), PVR: 50910951
CPU speed = 266 MHz
PLB speed = 133 MHz
OPB speed = 66 MHz
EBC speed = 66 MHz
PCI Bus speed = 33 MHz (Async)
VCO speed = 800 MHz
Feedback Clock = CPU
Amount of SDRAM = 64 MBytes
Internal PCI arbiter enabled
--------------------------------------------------------
--- Device Configuration ---
Power-On Test Devices:
000 Enabled System Memory [RAM]
002 Enabled Ethernet [ENET]
003 Enabled PCI Ethernet [PCIENET]
----------------------------
Boot Sources:
001 Enabled System FLASH [FLASH]
002 Enabled Ethernet [ENET]
LOCAL: 192.168.100.61
REMOTE: 192.168.100.37
MAC: 000A8501858E
004 Enabled Serial Port 1 [S1]
----------------------------
Debugger: Disabled
----------------------------
-- FLASH BOOT Update --
Sending bootp request ...
BOOTP failed.
Network boot failed.
Booting from [FLASH] System FLASH ...
+4000000,
00025000-04000000 -> 00338000-04000000 = 3cc8000
Loading pages
Done
Board config data:
usr_config_ver = 1.4
rom_sw_ver = 1.2
mem_size = 67108864
mac_address_local = 00:0a:85:01:85:8e
mac_address_pci = 00:0a:85:01:05:8e
processor_speed = 266666666
plb_speed = 133333333
pci_speed = 33333333
Loaded initial symtab at 0x293718, strtab at 0x2b2e74, # entries 7994
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
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 1.6ZD (OPENBLOCKS266) #0: Sat Oct 25 17:40:39 UTC 2003
tokuda@cube:/usr/export/s/20031023/src/sys/arch/evbppc/compile/OPENBLOCKS266
Model: OpenBlockS266 IBM PowerPC 405GPr Board
total memory = 65536 KB
avail memory = 58304 KB
using 211 buffers containing 3376 KB of memory
plb0 (root)
cpu0 at plb0: 266MHz 405GPr (Revision 9.81)
Instruction cache size 16384 line size 32
Data cache size 16384 line size 32
PVR: owner 509 core family 1 cache 2 version 5 asic 11
ecc0 at plb0 irq 16: ECC controller
opb0 at plb0
com0 at opb0 addr 0xef600300 irq 0: ns16550a, working fifo
com0: console
com1 at opb0 addr 0xef600400 irq 1: ns16550a, working fifo
emac0 at opb0 addr 0xef600800 irq 9: 405GP EMAC
emac0: interrupting at irqs 9 .. 15
emac0: Ethernet address 00:0a:85:01:85:8e
lxtphy0 at emac0 phy 0: LXT971 10/100 media interface, rev. 2
lxtphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
gpio at opb0 addr 0xef600700 not configured
gpiic0 at opb0 addr 0xef600500 irq 2: On-Chip IIC controller
iic0 at gpiic0: I2C bus
xrtc0 at iic0 addr 0x6f: Xicor X1226 Real-time Clock/NVRAM
wdog0 at opb0: 4 second period
pchb0 at plb0
pchb0: IBM PPC 405GP PCI Bridge (rev. 0x21)
pci0 at pchb0
pci0: i/o space, memory space enabled
IBM PPC 405GP PCI Bridge (host bridge, revision 0x21) at pci0 dev 0 function 0 not configured
Triones Technologies product 0x0007 (RAID mass storage, revision 0x02) at pci0 dev 3 function 0 not configured
tlp0 at pci0 dev 4 function 0: Davicom DM9102A Ethernet, pass 4.0
tlp0: broken MicroWire interface detected; setting SROM size to 1Kb
tlp0: interrupting at irq 31
tlp0: Ethernet address 00:0a:85:01:05:8e
ukphy0 at tlp0 phy 1: Generic IEEE 802.3u media interface
ukphy0: OUI 0x000676, model 0x0004, rev. 1
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
pbus at plb0 not configured
biomask 1c00 netmask 1c01 ttymask 1c01
Setting PIT to 266666666/100 = 2666666
root device: emac0
dump device:
file system (default generic): nfs
root on emac0
nfs_boot: trying DHCP/BOOTP
nfs_boot: BOOTP next-server: 192.168.100.37
nfs_boot: my_name=obs266
nfs_boot: my_addr=192.168.100.61
nfs_boot: my_mask=255.255.255.0
root on r1:/usr/obs266
root time: 0x3f9ad15a
inittodr: Clock has lost 12351 day(s) - CHECK AND RESET THE DATE.
init path (default /sbin/init):
init: copying out path `/sbin/init' 11
この直後から文字化け
少し前に作ったmpc860-031012.tar.gzなkernelをやっと試す。
userlandが1.6T相当なのでちょっと不安だったけれどちゃんと動いた。
などと書きつつ、ふとNetBSD/mpc860のリリースが土曜日に集中していることを思いだし、nandraを覗いてみると... ががーん。mpc860-031025.tar.gzがあるじゃないか...
>> OpenBlockS Boot, Revision 1.2
>> (tokuda@cube.home.tokuda.net, Tue Apr 1 08:00:45 JST 2003)
1234444+158684 [78672+63539]=0x176ff8
start=0x10000
ssym = 1641e8, esym = 18f000
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
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 1.6ZC (MPC860) #0: Wed Oct 22 16:01:33 UTC 2003
tokuda@cube:/usr/export/s/20031012/src/sys/arch/mpc860/compile/MPC860
total memory = 16384 KB
avail memory = 13416 KB
using 230 buffers containing 920 KB of memory
mainbus0 (root)
cpu0 at mainbus0: 860 (Revision 0)
pbus0 at mainbus0
scc0 at pbus0: vec 9 (console)
fec0 at pbus0: vec 7 address 00:80:6d:47:29:d5
tqphy0 at fec0 phy 1: 78Q2120 10/100 media interface, rev. 11
tqphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
sce0 at pbus0: vec 9 address 00:80:6d:47:29:d6
wdc0 at pbus0: vec 8
atabus0 at wdc0 channel 0
wd0 at atabus0 drive 0:
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 777 MB, 1580 cyl, 16 head, 63 sec, 512 bytes/sect x 1592728 sectors
wd0: drive supports PIO mode 4, DMA mode 2
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
Sat Oct 25 20:09:37 UTC 2003
swapctl: adding /dev/wd0b as swap device at priority 0
Starting file system checks:
/dev/rwd0a: file system is clean; not checking
Setting tty flags.
Setting sysctl variables:
Starting network.
Hostname: obs.home.tokuda.net
Configuring network interfaces: fec0.
Adding interface aliases:
Building databases...
kvm_mkdb: machdep.booted_kernel: the value is not available: No such file or directory
Starting syslogd.
Checking for core dump...
savecore: no core dump
Mounting all filesystems...
Clearing /tmp.
Checking quotas: done.
Setting securelevel: kern.securelevel: 0 -> 1
Starting virecover.
Starting local daemons:.
Updating motd.
Starting sshd.
Starting inetd.
Starting cron.
Sat Oct 25 20:10:14 UTC 2003
NetBSD/mpc860 (obs.home.tokuda.net) (tty00)
login:
今日は新宿にいった。ハロウィンということで色々と購入。
ヨドバシでLet's Noteのメモリ (MS133-A128MY) を購入した。
128MbytesのMicroDIMMで6,800円。相場が良くわからないけど、まぁこんなもんなんだろうか。
これで少しは快適になるのかな。
咳がひどくなっているらしい。
lib/libc/arch/powerpc/string/Makefile.incからmemset.cを外してしまえば良いのかなぁと思い、とりあえず次のような修正を加えてbuild.shしてみる。
--- ./lib/libc/arch/powerpc/string/Makefile.inc.orig 2003-10-27 23:07:33.000000000 +0900
+++ ./lib/libc/arch/powerpc/string/Makefile.inc 2003-10-27 23:07:47.000000000 +0900
@@ -2,7 +2,7 @@
SRCS+= ffs.S
-SRCS+= bcmp.c bcopy.c bzero.c index.c memchr.c memcmp.c memset.c \
+SRCS+= bcmp.c bcopy.c bzero.c index.c memchr.c memcmp.c \
rindex.c strcat.c strcmp.c strcpy.c strcspn.c strlen.c \
strncat.c strncmp.c strncpy.c strpbrk.c strsep.c \
strspn.c strstr.c swab.c
とりえあず、先には進んでいるようだ。動くかどうかは不明だけど。
いずれにせよ、distribあたりの修正をしないといけないな。
うー、やっぱしtwmにしよう。
発熱。38度台は危険。
予想どおりcheckflistで止まっていたのでちまちまとファイルの整理をしてreleaseできるように作業する。
ダウン。応援を頼むことに。
熱は下がったが、本日も休むことにした。
ハロウィンということでイベントだけ参加。
release物をテストする。
kernelを起動してinitを実行すると死亡するらしい。
>> OpenBlockS Boot, Revision 1.2 >> (tokuda@cube.home.tokuda.net, Tue Apr 1 08:00:45 JST 2003) 中略 boot device: fec0 root on fec0 nfs_boot: trying DHCP/BOOTP nfs_boot: BOOTP next-server: 192.168.100.39 nfs_boot: my_name=obs.home.tokuda.net nfs_boot: my_addr=192.168.100.60 nfs_boot: my_mask=255.255.255.0 root on cube:/usr/obs root file system type: nfs Process (pid 1) got signal 11 Process (pid 1) got signal 11 Process (pid 1) got signal 11 Process (pid 1) got signal 11 以下、このメッセージが延々と続く
以前20031012なkernelでは動いていたので「なぜかなぁ?」と考えると前回はkernelだけを入れ換えていたことを思い出したのでkernel, init, userlandをいろいろなパターンで試してみる。
| kernel | init | userland | result |
|---|---|---|---|
| 0517 | 0517 | 0517 | OK |
| 1025 | 0517 | 0517 | OK |
| 0517 | 1025 | 0517 | OK |
| 1025 | 1025 | 0517 | OK |
| 0517 | 0517 | 1025 | NG (SIGSEGV) |
| 1025 | 0517 | 1025 | NG (SIGSEGV) |
| 0517 | 1025 | 1025 | NG (SIGSEGV) |
| 1025 | 1025 | 1025 | NG (SIGSEGV) |
結局のところuserlandに依存しているわけで、原因はどこだかわからない。
で、良く考えてみるとlibcのcompileを通すためにMakefile.incを書き換えたのを思い出し、libcあたりが怪しいのではないかと思って/libだけ入れ換えてみると挙動が変わった。
root on cube:/usr/obs root file system type: nfs panic: init died (signal 0, exit 1) Stopped in pid 1.1 (init.20031025) at netbsd:cpu_Debugger+0x14: addi 1 ,1,16 db>
うーむ、じゃあlibcだけコピーしてrevを合わせてやるとSIGSEGVっつーことで進展せず。
じゃぁ、initだけstatic linkにしてみるかと思って、0517な/rescue/initを1025な環境にコピーする。
するとinitはちゃんと動作し (あたりまえか)、そのあとでSegmentation faultしてしまう。
boot device: fec0 root on fec0 nfs_boot: trying DHCP/BOOTP nfs_boot: BOOTP next-server: 192.168.100.39 nfs_boot: my_name=obs.home.tokuda.net nfs_boot: my_addr=192.168.100.60 nfs_boot: my_mask=255.255.255.0 root on cube:/usr/obs root file system type: nfs Oct 31 18:46:36 init: /bin/sh on /etc/rc terminated abnormally, going to single user mode Enter pathname of shell or RETURN for /rescue/sh: [1] Segmentation fault (core dumped) tset -sQrm "unknown:?unknown" We recommend creating a non-root account and using su(1) for root access. Oct 31 18:46:55 init: single user shell terminated, restarting Enter pathname of shell or RETURN for /rescue/sh: [1] Segmentation fault (core dumped) tset -sQrm "unknown:?unknown" We recommend creating a non-root account and using su(1) for root access. Oct 31 18:47:55 init: single user shell terminated, restarting Enter pathname of shell or RETURN for /rescue/sh:
とりあえず、libcのad hocな修正が影響している可能性が高いので別の解決策を考えた方が良さそうだ。
メールはこちらへ...[BSD小僧 (tokuda @(at) tokuda .(dot) net)]
この日記は、GNSを使用して作成されています。