Mar 7, 2001 onl5v4: Solaris 7 cc ドライバのテスト. cc ドライバのインストール#04 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (http://www-online.kek.jp/~inoue/CAMAC/ onl5v4-sol7/camac-step01.txt) 高エネルギー加速器研究機構 素粒子原子核研究所 物理、オンライングループ 井上 栄二 (1). 現状確認 (A). SPARC CPU-5V、Solaris7 を入手した。 (B). FORCE,CPU-5V(microSPARC-II)、に Solaris 7 のシステムを インストールした。 (C). /etc の下の各設定、および /export/home の作成をした。 (D). CPU-5V に Solaris7用の VMEドライバ、FRCdrv-2.7(FRCvme v2.4.1) をインストールした。 (2). ここでやるべきこと ccドライバを onl5v4 にインストールする。 (3). ccドライバのキットを入手、インストールする (3-1). キットの入手 onl5v4[37]% pwd /export/home/onl5v4/inoue/CAMAC onl5v4[38]% ls -l total 0 onl5v4[39]% ftp online Connected to onlax2. 220 onlax2.kek.jp FTP server (Compaq Tru64 UNIX Version 5.60) ready. Name (online:inoue): anonymous 331 Guest login ok, send ident as password. Password: 230 Guest login ok, access restrictions apply. ftp> cd pub/kek/camac 250 CWD command successful. ftp> dir 200 PORT command successful. 150 Opening ASCII mode data connection for /bin/ls (130.87.153.49,32792). total 3560 -rw-r--r-- 1 0 10 1173 Apr 19 1995 122d_to_e.tar.gz -rw-r--r-- 1 0 10 89611 Oct 20 16:14 FORCE-50T-sol2.6-list.tar. Z -rw-r--r-- 1 0 10 48627 Oct 20 16:14 FORCE-50T-sol2.6-list.tar. gz -rw-r--r-- 1 0 10 24125 Jul 26 1999 FORCE-50T-sol2.6.tar.gz -rw-r--r-- 1 0 10 68469 Feb 7 15:50 FORCE-50T-sol7.tar.Z -rw-r--r-- 1 0 10 39636 Feb 7 15:50 FORCE-50T-sol7.tar.gz -rw-r--r-- 1 0 10 22160 Nov 19 1997 FORCE-5V-sol2.5.tar.gz -rw-r--r-- 1 0 10 2494 Dec 2 1994 README -rw-r--r-- 1 0 10 37083 Oct 27 11:19 SPARC-status.html -rw-r--r-- 1 0 10 21435 Dec 13 1994 camac.sol2-1.30.tar.gz -rw-r--r-- 1 0 10 169539 Aug 18 1993 camac.sparc-1.22b.tar.Z -rw-r--r-- 1 0 10 91662 Aug 18 1993 camac.sparc-1.22b.tar.gz -rw-r--r-- 1 0 10 198417 Aug 19 1993 camac.sparc-1.22c.tar.Z -rw-r--r-- 1 0 10 110755 Aug 19 1993 camac.sparc-1.22c.tar.gz -rw-r--r-- 1 0 10 199103 Sep 4 1993 camac.sparc-1.22d.tar.Z -rw-r--r-- 1 0 10 110752 Sep 4 1993 camac.sparc-1.22d.tar.gz -rw-r--r-- 1 0 10 287493 Apr 20 1995 camacv1.01_decs.tar.Z -rw-r--r-- 1 0 10 231505 Dec 2 1994 camacv1.01_hprt.tar.Z -rw-r--r-- 1 0 10 132002 Dec 2 1994 camacv1.01_hprt.tar.gz -rw-r--r-- 1 0 10 283202 Dec 2 1994 camacv1.0_decs.tar.Z -rw-r--r-- 1 0 10 159495 Dec 2 1994 camacv1.0_decs.tar.gz -rw-r--r-- 1 0 10 216777 Sep 13 1994 camacv1.0_hprt.tar.Z -rw-r--r-- 1 0 10 122114 Sep 13 1994 camacv1.0_hprt.tar.gz -rw-r--r-- 1 0 10 87379 Nov 30 1994 camlib-docs-1.0.tar.Z -rw-r--r-- 1 0 10 51118 Nov 30 1994 camlib-docs-1.0.tar.gz drwxr-xr-x 2 0 10 512 Jul 24 2000 doc -rw-r--r-- 1 0 10 13589 Jan 17 1995 sparc-3ce.tar.gz -rw-r--r-- 1 0 10 233395 Aug 18 1993 tdaq-1.00.tar.Z -rw-r--r-- 1 0 10 121288 Apr 2 1992 tdaq-1.00.tar.gz -rw-r--r-- 1 0 10 277799 Jan 20 1995 vme-3CE.tar.gz 226 Transfer complete. 2288 bytes received in 0.51 seconds (4.34 Kbytes/s) ftp> binary 200 Type set to I. ftp> get FORCE-50T-sol2.6-list.tar.gz 200 PORT command successful. 150 Opening BINARY mode data connection for FORCE-50T-sol2.6-list.tar.gz (130.87 .153.49,32793) (48627 bytes). 226 Transfer complete. local: FORCE-50T-sol2.6-list.tar.gz remote: FORCE-50T-sol2.6-list.tar.gz 48627 bytes received in 0.083 seconds (570.12 Kbytes/s) ftp> quit 221 Goodbye. onl5v4[40]% onl5v4[41]% ls -l total 96 -rw-r--r-- 1 inoue kek 48627 Feb 28 10:49 FORCE-50T-sol2.6-list.tar. gz onl5v4[42]% gzip -d FORCE-50T-sol2.6-list.tar.gz onl5v4[43]% ls -l total 528 -rw-r--r-- 1 inoue kek 254976 Oct 20 16:07 FORCE-50T-sol2.6-list.tar onl5v4[44]% tar xvf FORCE-50T-sol2.6-list.tar x FORCE-50T-sol2.6-list, 0 bytes, 0 tape blocks x FORCE-50T-sol2.6-list/Makefile, 2041 bytes, 4 tape blocks x FORCE-50T-sol2.6-list/README, 4099 bytes, 9 tape blocks x FORCE-50T-sol2.6-list/cam1.c, 1170 bytes, 3 tape blocks x FORCE-50T-sol2.6-list/cam2.f, 2295 bytes, 5 tape blocks x FORCE-50T-sol2.6-list/cam3.c, 2055 bytes, 5 tape blocks x FORCE-50T-sol2.6-list/camlib.c, 9803 bytes, 20 tape blocks x FORCE-50T-sol2.6-list/camlib.h, 1415 bytes, 3 tape blocks x FORCE-50T-sol2.6-list/cc.c, 82172 bytes, 161 tape blocks x FORCE-50T-sol2.6-list/cc.conf, 288 bytes, 1 tape blocks x FORCE-50T-sol2.6-list/cc.h, 2829 bytes, 6 tape blocks x FORCE-50T-sol2.6-list/cc_common.h, 2288 bytes, 5 tape blocks x FORCE-50T-sol2.6-list/cc_config.h, 876 bytes, 2 tape blocks x FORCE-50T-sol2.6-list/forlib.c, 3289 bytes, 7 tape blocks x FORCE-50T-sol2.6-list/k2917.h, 4058 bytes, 8 tape blocks x FORCE-50T-sol2.6-list/camasm, 0 bytes, 0 tape blocks x FORCE-50T-sol2.6-list/camasm/Makefile, 448 bytes, 1 tape blocks x FORCE-50T-sol2.6-list/camasm/asm_code.h, 11250 bytes, 22 tape blocks x FORCE-50T-sol2.6-list/camasm/camasm.c, 24762 bytes, 49 tape blocks x FORCE-50T-sol2.6-list/camasm/err_code.h, 1646 bytes, 4 tape blocks x FORCE-50T-sol2.6-list/camasm/camasm, 27536 bytes, 54 tape blocks x FORCE-50T-sol2.6-list/camlist, 0 bytes, 0 tape blocks x FORCE-50T-sol2.6-list/camlist/Makefile, 1415 bytes, 3 tape blocks x FORCE-50T-sol2.6-list/camlist/camtest4c.c, 2151 bytes, 5 tape blocks x FORCE-50T-sol2.6-list/camlist/camtest4single.asm, 603 bytes, 2 tape blocks x FORCE-50T-sol2.6-list/camlist/camtest5c.c, 2040 bytes, 4 tape blocks x FORCE-50T-sol2.6-list/camlist/camtest5c1.c, 2027 bytes, 4 tape blocks x FORCE-50T-sol2.6-list/camlist/camtest4int.asm, 903 bytes, 2 tape blocks x FORCE-50T-sol2.6-list/camlist/camtest5c2.c, 1994 bytes, 4 tape blocks x FORCE-50T-sol2.6-list/camlist/camtest4dma.asm, 709 bytes, 2 tape blocks x FORCE-50T-sol2.6-list/camlist-kine, 0 bytes, 0 tape blocks x FORCE-50T-sol2.6-list/camlist-kine/Makefile, 1296 bytes, 3 tape blocks x FORCE-50T-sol2.6-list/camlist-kine/cam6.c, 1880 bytes, 4 tape blocks x FORCE-50T-sol2.6-list/camlist-kine/cam6.asm, 708 bytes, 2 tape blocks x FORCE-50T-sol2.6-list/camlist-kine/cam6a.c, 1541 bytes, 4 tape blocks x FORCE-50T-sol2.6-list/camlist-kine/cam6b.c, 2983 bytes, 6 tape blocks x FORCE-50T-sol2.6-list/camlist-kine/cam7.c, 2021 bytes, 4 tape blocks x FORCE-50T-sol2.6-list/camlist-kine/cam7a.asm, 322 bytes, 1 tape blocks x FORCE-50T-sol2.6-list/camlist-kine/cam7b.asm, 679 bytes, 2 tape blocks x FORCE-50T-sol2.6-list/camlist-kine/cam7A.c, 2582 bytes, 6 tape blocks x FORCE-50T-sol2.6-list/camlist-kine/cam7aA.asm, 322 bytes, 1 tape blocks x FORCE-50T-sol2.6-list/camlist-kine/cam7bA.asm, 812 bytes, 2 tape blocks x FORCE-50T-sol2.6-list/camlist-kine/cam7cA.asm, 353 bytes, 1 tape blocks x FORCE-50T-sol2.6-list/camlist-kine/cam7B.c, 1753 bytes, 4 tape blocks x FORCE-50T-sol2.6-list/script, 0 bytes, 0 tape blocks x FORCE-50T-sol2.6-list/script/awk1.txt, 66 bytes, 1 tape blocks x FORCE-50T-sol2.6-list/script/awk2.txt, 37 bytes, 1 tape blocks x FORCE-50T-sol2.6-list/script/cc_build.gcc.sh, 233 bytes, 1 tape blocks x FORCE-50T-sol2.6-list/script/cc_build.sh, 234 bytes, 1 tape blocks x FORCE-50T-sol2.6-list/script/cc_link.sh, 528 bytes, 2 tape blocks x FORCE-50T-sol2.6-list/script/cc_load.sh, 808 bytes, 2 tape blocks x FORCE-50T-sol2.6-list/script/cc_unload.sh, 270 bytes, 1 tape blocks onl5v4[45]% オンライン・グループの anonymous ftp サイトから入手したキットを使って コンパイル、ロードする。 (3-2). 展開したキットをコンパイルする (3-2-1). コンパイラのバージョンをチェック onl5v4[46]% which cc /kek/compilers/ws5.0/SUNWspro/bin/cc onl5v4[47]% which f77 /kek/compilers/ws5.0/SUNWspro/bin/f77 onl5v4[48]% cc -V cc: WorkShop Compilers 5.0 98/12/15 C 5.0 usage: cc [ options] files. Use 'cc -flags' for details onl5v4[49]% f77 -V f77: WorkShop Compilers 5.0 98/12/15 FORTRAN 77 5.0 Usage: f77 [ options ] files. Use 'f77 -flags' for details onl5v4[50]% (3-2-2). CAMACドライバをコンパイルする onl5v4[54]% pwd /export/home/onl5v4/inoue/CAMAC/FORCE-50T-sol2.6-list onl5v4[55]% make clean \rm -f cc *.o libcamac.a cam1 cam2 cam3 *~ core onl5v4[56]% ls -l total 256 -rw-r--r-- 1 inoue kek 2041 Jun 23 2000 Makefile -rw-r--r-- 1 inoue kek 4099 Oct 20 15:35 README -rw-r--r-- 1 inoue kek 1170 Jun 23 2000 cam1.c -rw-r--r-- 1 inoue kek 2295 Jun 23 2000 cam2.f -rw-r--r-- 1 inoue kek 2055 Jul 28 2000 cam3.c drwxr-xr-x 2 inoue kek 512 Oct 20 15:41 camasm/ -rw-r--r-- 1 inoue kek 9803 Oct 3 17:15 camlib.c -rw-r--r-- 1 inoue kek 1415 Jun 23 2000 camlib.h drwxr-xr-x 2 inoue kek 512 Oct 20 16:05 camlist/ drwxr-xr-x 2 inoue kek 512 Oct 20 16:05 camlist-kine/ -rw-r--r-- 1 inoue kek 82172 Oct 13 10:59 cc.c -rw-r--r-- 1 inoue kek 288 Jun 23 2000 cc.conf -rw-r--r-- 1 inoue kek 2829 Oct 13 10:59 cc.h -rw-r--r-- 1 inoue kek 2288 Jun 23 2000 cc_common.h -rw-r--r-- 1 inoue kek 876 Jun 23 2000 cc_config.h -rw-r--r-- 1 inoue kek 3289 Jun 23 2000 forlib.c -rw-r--r-- 1 inoue kek 4058 Jun 23 2000 k2917.h drwxr-xr-x 2 inoue kek 512 Oct 2 16:39 script/ onl5v4[57]% onl5v4[57]% make ./script/cc_build.sh [Building for sun4m] "cc.c", line 177: warning: initialization type mismatch "cc.c", line 962: warning: improper pointer/integer combination: arg #1 "cc.c", line 1038: warning: argument #1 is incompatible with prototype: prototype: pointer to function(pointer to void) returning void : "/usr/i nclude/sys/systm.h", line 100 argument : pointer to function(pointer to char) returning void "cc.c", line 1038: warning: improper pointer/integer combination: op "=" "cc.c", line 1048: warning: improper pointer/integer combination: arg #1 "cc.c", line 2191: warning: argument #1 is incompatible with prototype: prototype: pointer to function(pointer to void) returning void : "/usr/i nclude/sys/systm.h", line 100 argument : pointer to function(pointer to char) returning void "cc.c", line 2191: warning: improper pointer/integer combination: op "=" "cc.c", line 2197: warning: improper pointer/integer combination: arg #1 "cc.c", line 2232: warning: argument #1 is incompatible with prototype: prototype: pointer to function(pointer to void) returning void : "/usr/i nclude/sys/systm.h", line 100 argument : pointer to function(pointer to char) returning void "cc.c", line 2232: warning: improper pointer/integer combination: op "=" "cc.c", line 2238: warning: improper pointer/integer combination: arg #1 "cc.c", line 3012: warning: argument #1 is incompatible with prototype: prototype: pointer to function(pointer to void) returning void : "/usr/i nclude/sys/systm.h", line 100 argument : pointer to function(pointer to char) returning void "cc.c", line 3012: warning: improper pointer/integer combination: op "=" rm -f cc.o cc -O -c camlib.c -o camlib.o -I. cc -O -c forlib.c -o forlib.o -I. rm -f libcamac.a ar rcv libcamac.a camlib.o forlib.o a - camlib.o a - forlib.o ar: writing libcamac.a cc -O cam1.c -o cam1 -I. -L. -lcamac f77 -fast -O3 -u cam2.f -o cam2 -I. -L. -lcamac cam2.f: MAIN: cc -O cam3.c -o cam3 -I. -L. -lcamac onl5v4[58]% (3-2-2-a). 参考 --- FORCE-50T-sol2.6 を使ってコンパイルしてみる 上記の項目(3-2-2)で見たとおり、FORCE-50T-sol2.6-list のキットを コンパイルした結果では、いくつかの warningメッセージが出力された。 この warningメッセージは、CPU-8VT を使って FORCE-50T-sol2.6 のキットをコンパ イルした時には見られなかった。 これは CPU ボードの違いによるものなのか、 それともキットの違いによるものなのか確認するために、CPU-8VT でテストした 時と同じ FORCE-50T-sol2.6 のキットを CPU-5V上でコンパイルしてみる。 : 226 Transfer complete. local: FORCE-50T-sol2.6.tar.gz remote: FORCE-50T-sol2.6.tar.gz 24125 bytes received in 0.046 seconds (515.77 Kbytes/s) ftp> quit 221 Goodbye. onl5v4[61]% ls -l total 578 drwxr-xr-x 6 inoue kek 512 Feb 28 11:01 FORCE-50T-sol2.6-list/ -rw-r--r-- 1 inoue kek 254976 Oct 20 16:07 FORCE-50T-sol2.6-list.tar -rw-r--r-- 1 inoue kek 24125 Feb 28 11:04 FORCE-50T-sol2.6.tar.gz onl5v4[62]% gzip -d FORCE-50T-sol2.6.tar.gz onl5v4[63]% ls FORCE-50T-sol2.6-list/ FORCE-50T-sol2.6.tar FORCE-50T-sol2.6-list.tar onl5v4[64]% ls -l total 818 drwxr-xr-x 6 inoue kek 512 Feb 28 11:01 FORCE-50T-sol2.6-list/ -rw-r--r-- 1 inoue kek 254976 Oct 20 16:07 FORCE-50T-sol2.6-list.tar -rw-r--r-- 1 inoue kek 132096 Jul 26 1999 FORCE-50T-sol2.6.tar onl5v4[65]% tar xvf FORCE-50T-sol2.6.tar x FORCE-50T-sol2.6, 0 bytes, 0 tape blocks x FORCE-50T-sol2.6/Makefile, 2041 bytes, 4 tape blocks x FORCE-50T-sol2.6/README, 3624 bytes, 8 tape blocks x FORCE-50T-sol2.6/cam1.c, 1170 bytes, 3 tape blocks x FORCE-50T-sol2.6/cam2.f, 2295 bytes, 5 tape blocks x FORCE-50T-sol2.6/cam3.c, 2055 bytes, 5 tape blocks x FORCE-50T-sol2.6/camlib.c, 9740 bytes, 20 tape blocks x FORCE-50T-sol2.6/camlib.h, 1415 bytes, 3 tape blocks x FORCE-50T-sol2.6/cc.c, 74943 bytes, 147 tape blocks x FORCE-50T-sol2.6/cc.conf, 288 bytes, 1 tape blocks x FORCE-50T-sol2.6/cc.h, 2931 bytes, 6 tape blocks x FORCE-50T-sol2.6/cc_common.h, 2288 bytes, 5 tape blocks x FORCE-50T-sol2.6/cc_config.h, 876 bytes, 2 tape blocks x FORCE-50T-sol2.6/forlib.c, 3289 bytes, 7 tape blocks x FORCE-50T-sol2.6/k2917.h, 4058 bytes, 8 tape blocks x FORCE-50T-sol2.6/script, 0 bytes, 0 tape blocks x FORCE-50T-sol2.6/script/cc_build.sh, 234 bytes, 1 tape blocks x FORCE-50T-sol2.6/script/cc_load.sh, 808 bytes, 2 tape blocks x FORCE-50T-sol2.6/script/cc_unload.sh, 270 bytes, 1 tape blocks x FORCE-50T-sol2.6/script/cc_build.gcc.sh, 233 bytes, 1 tape blocks x FORCE-50T-sol2.6/script/cc_link.sh, 528 bytes, 2 tape blocks x FORCE-50T-sol2.6/script/awk1.txt, 66 bytes, 1 tape blocks x FORCE-50T-sol2.6/script/awk2.txt, 37 bytes, 1 tape blocks onl5v4[66]% ls -l total 820 drwxr-xr-x 3 inoue kek 512 Jul 26 1999 FORCE-50T-sol2.6/ drwxr-xr-x 6 inoue kek 512 Feb 28 11:01 FORCE-50T-sol2.6-list/ -rw-r--r-- 1 inoue kek 254976 Oct 20 16:07 FORCE-50T-sol2.6-list.tar -rw-r--r-- 1 inoue kek 132096 Jul 26 1999 FORCE-50T-sol2.6.tar onl5v4[67]% cd FORCE-50T-sol2.6 /export/home/onl5v4/inoue/CAMAC/FORCE-50T-sol2.6 onl5v4[68]% ls -l total 234 -rw-r--r-- 1 inoue kek 2041 Jul 19 1999 Makefile -rw-r--r-- 1 inoue kek 3624 Jul 26 1999 README -rw-r--r-- 1 inoue kek 1170 Jul 16 1999 cam1.c -rw-r--r-- 1 inoue kek 2295 Jul 16 1999 cam2.f -rw-r--r-- 1 inoue kek 2055 Jul 16 1999 cam3.c -rw-r--r-- 1 inoue kek 9740 Jul 16 1999 camlib.c -rw-r--r-- 1 inoue kek 1415 Jul 16 1999 camlib.h -rw-r--r-- 1 inoue kek 74943 Jul 26 1999 cc.c -rw-r--r-- 1 inoue kek 288 Jul 16 1999 cc.conf -rw-r--r-- 1 inoue kek 2931 Jul 26 1999 cc.h -rw-r--r-- 1 inoue kek 2288 Jul 16 1999 cc_common.h -rw-r--r-- 1 inoue kek 876 Jul 16 1999 cc_config.h -rw-r--r-- 1 inoue kek 3289 Jul 16 1999 forlib.c -rw-r--r-- 1 inoue kek 4058 Jul 16 1999 k2917.h drwxr-xr-x 2 inoue kek 512 Jul 16 1999 script/ onl5v4[69]% make clean \rm -f cc *.o libcamac.a cam1 cam2 cam3 *~ core onl5v4[70]% make ./script/cc_build.sh [Building for sun4m] "cc.c", line 174: warning: initialization type mismatch "cc.c", line 943: warning: improper pointer/integer combination: arg #1 "cc.c", line 1019: warning: argument #1 is incompatible with prototype: prototype: pointer to function(pointer to void) returning void : "/usr/i nclude/sys/systm.h", line 100 argument : pointer to function(pointer to char) returning void "cc.c", line 1019: warning: improper pointer/integer combination: op "=" "cc.c", line 1029: warning: improper pointer/integer combination: arg #1 "cc.c", line 2801: warning: argument #1 is incompatible with prototype: prototype: pointer to function(pointer to void) returning void : "/usr/i nclude/sys/systm.h", line 100 argument : pointer to function(pointer to char) returning void "cc.c", line 2801: warning: improper pointer/integer combination: op "=" rm -f cc.o cc -O -c camlib.c -o camlib.o -I. cc -O -c forlib.c -o forlib.o -I. rm -f libcamac.a ar rcv libcamac.a camlib.o forlib.o a - camlib.o a - forlib.o ar: writing libcamac.a cc -O cam1.c -o cam1 -I. -L. -lcamac f77 -fast -O3 -u cam2.f -o cam2 -I. -L. -lcamac cam2.f: MAIN: cc -O cam3.c -o cam3 -I. -L. -lcamac onl5v4[71]% 同じく warningメッセージが出力されている。 コンパイラのバージョンは CPU-8VT のテスト時と同じなので、CPUボードの違いによるもののようだ。 cc.cファイルを修正する。 (3-3). cc.cファイルを修正する warningメッセージ再掲。 "cc.c", line 177: warning: initialization type mismatch "cc.c", line 962: warning: improper pointer/integer combination: arg #1 "cc.c", line 1038: warning: argument #1 is incompatible with prototype: prototype: pointer to function(pointer to void) returning void : "/usr/i nclude/sys/systm.h", line 100 argument : pointer to function(pointer to char) returning void "cc.c", line 1038: warning: improper pointer/integer combination: op "=" "cc.c", line 1048: warning: improper pointer/integer combination: arg #1 "cc.c", line 2191: warning: argument #1 is incompatible with prototype: prototype: pointer to function(pointer to void) returning void : "/usr/i nclude/sys/systm.h", line 100 argument : pointer to function(pointer to char) returning void "cc.c", line 2191: warning: improper pointer/integer combination: op "=" "cc.c", line 2197: warning: improper pointer/integer combination: arg #1 "cc.c", line 2232: warning: argument #1 is incompatible with prototype: prototype: pointer to function(pointer to void) returning void : "/usr/i nclude/sys/systm.h", line 100 argument : pointer to function(pointer to char) returning void "cc.c", line 2232: warning: improper pointer/integer combination: op "=" "cc.c", line 2238: warning: improper pointer/integer combination: arg #1 "cc.c", line 3012: warning: argument #1 is incompatible with prototype: prototype: pointer to function(pointer to void) returning void : "/usr/i nclude/sys/systm.h", line 100 argument : pointer to function(pointer to char) returning void "cc.c", line 3012: warning: improper pointer/integer combination: op "=" (3-3-1). "cc.c", line 177: warning: initialization type mismatch のチェック 123 /*********************************************************************** *** 124 * Prototypes. * 125 * These are the entry points into our driver that are called when the 126 * driver is loaded, during a system call. or in response to an interrup t. 127 *********************************************************************** ***/ : 138 /* static int cc_ioctl(dev_t dev, int cmd, int arg, int flag, cred_t *cr ed_p, int *rval_p); */ 139 static int cc_ioctl(dev_t dev, int cmd, intptr_t arg, int flag, cred_t * cred_p, int *rval_p); <--- 修正 : 169 static struct cb_ops cc_cb_ops = { 170 cc_open, /* open */ 171 cc_close, /* close */ 172 nodev, /* strategy (not block device) */ 173 nodev, /* print (no print routine) */ 174 nodev, /* dump (no dump routine) */ 175 nodev, /* read (no read routine; write-only device */ 176 cc_write, /* write */ 177 cc_ioctl, /* ioctl */ 178 nodev, /* devmap (no devmap routine) */ : 970 /****************************************************** 971 * ccioctl * 972 ******************************************************/ 973 static int 974 /* cc_ioctl(dev_t dev, int cmd, int arg, int flag, cred_t *cred_p, int * rval_p) */ 975 cc_ioctl(dev_t dev, int cmd, intptr_t arg, int flag, cred_t *cred_p, int *rval_p) <--- 修正 976 { : onl5v4[106]% onl5v4[107]% make ./script/cc_build.sh [Building for sun4m] "cc.c", line 962: warning: improper pointer/integer combination: arg #1 "cc.c", line 1039: warning: argument #1 is incompatible with prototype: prototype: pointer to function(pointer to void) returning void : "/usr/i nclude/sys/systm.h", line 100 argument : pointer to function(pointer to char) returning void "cc.c", line 1039: warning: improper pointer/integer combination: op "=" "cc.c", line 1049: warning: improper pointer/integer combination: arg #1 "cc.c", line 2192: warning: argument #1 is incompatible with prototype: prototype: pointer to function(pointer to void) returning void : "/usr/i nclude/sys/systm.h", line 100 argument : pointer to function(pointer to char) returning void "cc.c", line 2192: warning: improper pointer/integer combination: op "=" "cc.c", line 2198: warning: improper pointer/integer combination: arg #1 "cc.c", line 2233: warning: argument #1 is incompatible with prototype: prototype: pointer to function(pointer to void) returning void : "/usr/i nclude/sys/systm.h", line 100 argument : pointer to function(pointer to char) returning void "cc.c", line 2233: warning: improper pointer/integer combination: op "=" "cc.c", line 2239: warning: improper pointer/integer combination: arg #1 "cc.c", line 3013: warning: argument #1 is incompatible with prototype: prototype: pointer to function(pointer to void) returning void : "/usr/i nclude/sys/systm.h", line 100 argument : pointer to function(pointer to char) returning void "cc.c", line 3013: warning: improper pointer/integer combination: op "=" rm -f cc.o onl5v4[108]% ok. ""cc.c", line 177: warning: initialization type mismatch" の warningは出なくなった。 (3-3-2). "cc.c", line 962: warning: improper pointer/integer combination: arg #1 のチェック onl5v4[41]% vi cc.c : 105 /* E.Inoue 106 int timeout_id; 107 end */ 108 timeout_id_t timeout_id; <--- 修正 : 906 /****************************************************** 907 * cc_intr * 908 ******************************************************/ 909 static u_int 910 cc_intr(int unit) 911 { : 962 untimeout(cc->timeout_id); 963 cv_signal(&cc->cv); 964 mutex_exit(&cc->mutex); /* end MUTEX */ : 973 /****************************************************** 974 * ccioctl * 975 ******************************************************/ 976 static int 977 /* cc_ioctl(dev_t dev, int cmd, int arg, int flag, cred_t *cred_p, int * rval_p) */ 978 cc_ioctl(dev_t dev, int cmd, intptr_t arg, int flag, cred_t *cred_p, int *rval_p) 979 { : 1039 /* E.Inoue 1040 cc->timeout_id = timeout(cc_timeout, (caddr_t)&unit, data * hz); 1041 */ 1042 /* E.Inoue 1043 cc->timeout_id = timeout(cc_timeout, (caddr_t)&unit, cc->data1 * hz); 1044 */ 1045 cc->timeout_id = timeout(cc_timeout, (void *)unit, cc->data1 * hz ); <--- 修正 1046 /* mutex_enter(&cc->mutex); */ /* start MUTE X */ : 2181 int cc_waitint(int unit) 2182 { : 2197 #ifdef CC_SPARC_LIST_EXTENSION 2198 /* E.Inoue 2199 cc->timeout_id = timeout(cc_timeout, (caddr_t)&unit, cc->a_reg * hz) ; 2200 end */ 2201 cc->timeout_id = timeout(cc_timeout, (void *)unit, cc->a_reg * hz); <--- 修正 2202 #else 2203 /* E.Inoue 2204 cc->timeout_id = timeout(cc_timeout, (caddr_t)&unit, CC_TIMEOUT_LAM * hz); 2205 end */ 2206 cc->timeout_id = timeout(cc_timeout, (void *)unit, CC_TIMEOUT_LAM * hz); <--- 修正 2207 #endif : 2227 int cc_waitevent(int unit) 2228 { : 2244 #ifdef CC_SPARC_LIST_EXTENSION 2245 /* E.Inoue 2246 cc->timeout_id = timeout(cc_timeout, (caddr_t)&unit, cc->a_reg * hz) ; 2247 end */ 2248 cc->timeout_id = timeout(cc_timeout, (void *)unit, cc->a_reg * hz); <--- 修正 2249 #else 2250 /* E.Inoue 2251 cc->timeout_id = timeout(cc_timeout, (caddr_t)&unit, CC_TIMEOUT_LAM * hz); 2252 end */ 2253 cc->timeout_id = timeout(cc_timeout, (void *)unit, CC_TIMEOUT_LAM * hz); <--- 修正 2254 #endif : 2881 static int cc_strategy(struct buf *bp) 2882 { : 3029 /* start DMA */ 3030 cc->executing_dma_flag = 1; 3031 /* E.Inoue 3032 cc->timeout_id = timeout(cc_timeout, (caddr_t)&unit, CC_TIMEOUT_DMA * hz); 3033 end */ 3034 cc->timeout_id = timeout(cc_timeout, (void *)unit, CC_TIMEOUT_DMA * hz); <--- 修正 3035 cc->k->csr |= CC_GO; /* Go! */ : onl5v4[42]% onl5v4[43]% make ./script/cc_build.sh [Building for sun4m] "cc.c", line 1045: warning: argument #1 is incompatible with prototype: prototype: pointer to function(pointer to void) returning void : "/usr/i nclude/sys/systm.h", line 100 argument : pointer to function(pointer to char) returning void "cc.c", line 2201: warning: argument #1 is incompatible with prototype: prototype: pointer to function(pointer to void) returning void : "/usr/i nclude/sys/systm.h", line 100 argument : pointer to function(pointer to char) returning void "cc.c", line 2248: warning: argument #1 is incompatible with prototype: prototype: pointer to function(pointer to void) returning void : "/usr/i nclude/sys/systm.h", line 100 argument : pointer to function(pointer to char) returning void "cc.c", line 3034: warning: argument #1 is incompatible with prototype: prototype: pointer to function(pointer to void) returning void : "/usr/i nclude/sys/systm.h", line 100 argument : pointer to function(pointer to char) returning void rm -f cc.o onl5v4[44]% ok. ""cc.c", line 962: warning: improper pointer/integer combination: arg #1" の warningメッセージは出なくなった。 (3-3-3). "cc.c", line 1045: warning: argument #1 is incompatible with prototype: prototype: pointer to function(pointer to void) returning void : "/usr/include/sys/systm.h", line 100 のチェック onl5v4[46]% vi cc.c : 148 /* E.Inoue static void cc_timeout(caddr_t unit); */ 149 static void cc_timeout(void *unit); <--- 修正 : 873 /****************************************************** 874 * cctimeout * 875 ******************************************************/ 876 static void 877 /* E.Inoue 878 cc_timeout(caddr_t unit) 879 */ 880 cc_timeout(void *unit) <--- 修正 881 { 882 /* register struct cc_device *cc = &ccdevice[0]; */ 883 register struct cc_device *cc; 884 885 /* cc = ddi_get_soft_state(cc_state,unit); */ 886 /* E.Inoue 887 cc = ddi_get_soft_state(cc_state,(int)*unit); 888 */ 889 cc = ddi_get_soft_state(cc_state,(int)unit); <--- 修正 : 973 /****************************************************** 974 * ccioctl * 975 ******************************************************/ 976 static int 977 /* cc_ioctl(dev_t dev, int cmd, int arg, int flag, cred_t *cred_p, int * rval_p) */ 978 cc_ioctl(dev_t dev, int cmd, intptr_t arg, int flag, cred_t *cred_p, int *rval_p) 979 { : 1045 cc->timeout_id = timeout(cc_timeout, (void *)unit, cc->data1 * hz ); 1046 /* mutex_enter(&cc->mutex); */ /* start MUTE X */ : onl5v4[47]% onl5v4[57]% make ./script/cc_build.sh [Building for sun4m] rm -f cc.o onl5v4[58]% ok. warning は出なくなった。 (3-3-4). 再度CAMACドライバをコンパイルし直す onl5v4[58]% pwd /export/home/onl5v4/inoue/CAMAC/FORCE-50T-sol2.6-list onl5v4[59]% make clean \rm -f cc *.o libcamac.a cam1 cam2 cam3 *~ core onl5v4[60]% make ./script/cc_build.sh [Building for sun4m] rm -f cc.o cc -O -c camlib.c -o camlib.o -I. cc -O -c forlib.c -o forlib.o -I. rm -f libcamac.a ar rcv libcamac.a camlib.o forlib.o a - camlib.o a - forlib.o ar: writing libcamac.a cc -O cam1.c -o cam1 -I. -L. -lcamac f77 -fast -O3 -u cam2.f -o cam2 -I. -L. -lcamac cam2.f: MAIN: cc -O cam3.c -o cam3 -I. -L. -lcamac onl5v4[61]% ok. 正常にコンパイルできた。 (3-4). "make install" をやる onl5v4# pwd /export/home/onl5v4/inoue/CAMAC/FORCE-50T-sol2.6-list onl5v4# ls -l total 854 -rw-r--r-- 1 inoue kek 2041 Jun 23 2000 Makefile -rw-r--r-- 1 inoue kek 4099 Oct 20 15:35 README -rwxr-xr-x 1 inoue kek 14232 Mar 5 10:28 cam1 -rw-r--r-- 1 inoue kek 1170 Jun 23 2000 cam1.c -rwxr-xr-x 1 inoue kek 104900 Mar 5 10:28 cam2 -rw-r--r-- 1 inoue kek 2295 Jun 23 2000 cam2.f -rwxr-xr-x 1 inoue kek 14620 Mar 5 10:28 cam3 -rw-r--r-- 1 inoue kek 2055 Jul 28 2000 cam3.c drwxr-xr-x 2 inoue kek 512 Oct 20 15:41 camasm -rw-r--r-- 1 inoue kek 9803 Oct 3 17:15 camlib.c -rw-r--r-- 1 inoue kek 1415 Jun 23 2000 camlib.h -rw-r--r-- 1 inoue kek 9644 Mar 5 10:28 camlib.o drwxr-xr-x 2 inoue kek 512 Oct 20 16:05 camlist drwxr-xr-x 2 inoue kek 512 Oct 20 16:05 camlist-kine -rw-r--r-- 1 inoue kek 48276 Mar 5 10:28 cc -rw-r--r-- 1 inoue kek 83124 Feb 28 15:36 cc.c -rw-r--r-- 1 inoue kek 82170 Feb 28 14:21 cc.c-org -rw-r--r-- 1 inoue kek 288 Jun 23 2000 cc.conf -rw-r--r-- 1 inoue kek 2829 Oct 13 10:59 cc.h -rw-r--r-- 1 inoue kek 2288 Jun 23 2000 cc_common.h -rw-r--r-- 1 inoue kek 876 Jun 23 2000 cc_config.h -rw-r--r-- 1 inoue kek 3289 Jun 23 2000 forlib.c -rw-r--r-- 1 inoue kek 3496 Mar 5 10:28 forlib.o -rw-r--r-- 1 inoue kek 4058 Jun 23 2000 k2917.h -rw-r--r-- 1 inoue kek 14000 Mar 5 10:28 libcamac.a drwxr-xr-x 2 inoue kek 512 Oct 2 16:39 script onl5v4# onl5v4# make install make: Command not found onl5v4# # onl5v4[53]% which make /usr/ccs/bin/make onl5v4[54]% su Password: # csh onl5v4# source /.cshrc onl5v4# vi /.cshrc # @(#)cshrc 1.11 89/11/29 SMI umask 022 #set path=(/bin /usr/bin /usr/ucb /etc .) set path=(/bin /usr/bin /usr/sbin /usr/ccs/bin /usr/ucb /etc .) if ( $?prompt ) then set history=32 endif ~ ~ ~ onl5v4# source /.cshrc onl5v4# onl5v4# make install /usr/ucb/install -d /usr/local/vme/camac/include /usr/ucb/install -d /usr/local/vme/camac/lib /usr/ucb/install -m 644 camlib.h cc_config.h cc_common.h cc.h \ k2917.h /usr/local/vme/camac/include /usr/ucb/install -m 644 libcamac.a /usr/local/vme/camac/lib onl5v4# ls -lLR /usr/local /usr/local: total 2 drwxr-xr-x 3 root other 512 Mar 5 10:37 vme /usr/local/vme: total 2 drwxr-xr-x 4 root other 512 Mar 5 10:37 camac /usr/local/vme/camac: total 4 drwxr-xr-x 2 root other 512 Mar 5 10:37 include drwxr-xr-x 2 root other 512 Mar 5 10:37 lib /usr/local/vme/camac/include: total 26 -rw-r--r-- 1 root staff 1415 Mar 5 10:37 camlib.h -rw-r--r-- 1 root staff 2829 Mar 5 10:37 cc.h -rw-r--r-- 1 root staff 2288 Mar 5 10:37 cc_common.h -rw-r--r-- 1 root staff 876 Mar 5 10:37 cc_config.h -rw-r--r-- 1 root staff 4058 Mar 5 10:37 k2917.h /usr/local/vme/camac/lib: total 28 -rw-r--r-- 1 root staff 14000 Mar 5 10:37 libcamac.a onl5v4# (3-5). ここで、システムを立ち上げ直す # /usr/sbin/shutdown -i0 -g0 Shutdown started. Mon Mar 5 10:42:38 JST 2001 Do you want to continue? (y or n): y Changing to init state 0 - please wait Broadcast Message from root (console) on onl5v4 Mon Mar 5 10:42:40... THE SYSTEM onl5v4 IS BEING SHUT DOWN NOW ! ! ! Log off now or risk your files being damaged showmount: onl5v4: RPC: Program not registered # INIT: New run level: 0 The system is coming down. Please wait. System services are now being stopped. Print services stopped. syslogd: going down on signal 15 The system is down. INIT: failed write of utmpx entry:"s0" INIT: failed write of utmpx entry:"fw" syncing file systems... done Program terminated Type help for more information ok boot -r Resetting ... screen not found. Can't open input device. Keyboard not present. Using tty for input and output. SPARC CPU-5V, No Keyboard ROM Rev. 2.15.3, 48 MB memory installed, Serial #9149788. Ethernet address 0:80:42:b:2d:5c, Host ID: 808b9d5c. Rebooting with command: -r Boot device: /iommu/sbus/espdma@5,8400000/esp@5,8800000/sd@3,0 File and args: - r SunOS Release 5.7 Version Generic_106541-06 [UNIX(R) System V Release 4.0] Copyright (c) 1983-1999, Sun Microsystems, Inc. configuring network interfaces: le0. Hostname: onl5v4 Configuring the /devices directory Configuring the /dev directory Configuring the /dev directory (compatibility devices) The system is coming up. Please wait. checking ufs filesystems /dev/rdsk/c0t3d0s7: is clean. NIS domainname is kek.jp starting rpc services: rpcbind keyserv done. Setting netmask of le0 to 255.255.252.0 Setting default interface for multicast: add net 224.0.0.0: gateway onl5v4 syslog service starting. Print services started. volume management starting. The system is ready. onl5v4 console login: (3-6). ccドライバのロード、アンロード ccドライバのロード、アンロードが正しく実行できることを確認する。 onl5v4# pwd /export/home/onl5v4/inoue/CAMAC/FORCE-50T-sol2.6-list onl5v4# ls -l /dev/cc /dev/cc: No such file or directory onl5v4# make load ./script/cc_load.sh [Installing CAMAC device driver] [Adding CAMAC device driver to system] Mar 5 10:49:48 onl5v4 unix: CAMAC device driver V2.0, 1991-2000 by Y.TAKEUCHI(I CRR), E.Inoue(KEK) [Configuring CAMAC device driver] [Making CAMAC device files] sun4m onl5v4# コンソール上で"make load"を実行したためにシステムメッセージが混ざって しまっている。 気にしない。 onl5v4# ls -l /dev/cc lrwxrwxrwx 1 root other 22 Mar 5 10:50 /dev/cc -> /devices10:49:4 8///:cc onl5v4# /dev/ccファイルが正しく作られていない。 "make load"時に使用するスクリ プトを修正する必要があるようだ。 (3-7). /devices 以下のファイルをチェック onl5v4[50]% pwd /devices/iommu@0,10000000/VME@0,7ffffe00 onl5v4[51]% ls cc@2d,ff00:cc vmefdma@ad,0:vmefdma24d16 vmectl:vmectl vmefdma@ad,0:vmefdma24d32 vmedma@ad,0:vmedma16d16 vmefdma@ad,0:vmefdma24d8 vmedma@ad,0:vmedma16d32 vmefdma@ad,0:vmefdma24mblt vmedma@ad,0:vmedma16d8 vmefdma@ad,0:vmefdma32blt vmedma@ad,0:vmedma24blt vmefdma@ad,0:vmefdma32d16 vmedma@ad,0:vmedma24d16 vmefdma@ad,0:vmefdma32d32 vmedma@ad,0:vmedma24d32 vmefdma@ad,0:vmefdma32d8 vmedma@ad,0:vmedma24d8 vmefdma@ad,0:vmefdma32mblt vmedma@ad,0:vmedma24mblt vmeplus@ad,0:vme16d16 vmedma@ad,0:vmedma32blt vmeplus@ad,0:vme16d32 vmedma@ad,0:vmedma32d16 vmeplus@ad,0:vme16d8 vmedma@ad,0:vmedma32d32 vmeplus@ad,0:vme24blt vmedma@ad,0:vmedma32d8 vmeplus@ad,0:vme24d16 vmedma@ad,0:vmedma32mblt vmeplus@ad,0:vme24d32 vmedvma:vmedvma24 vmeplus@ad,0:vme24d8 vmedvma:vmedvma2432 vmeplus@ad,0:vme24mblt vmedvma:vmedvma32 vmeplus@ad,0:vme32blt vmefdma@ad,0:vmefdma16d16 vmeplus@ad,0:vme32d16 vmefdma@ad,0:vmefdma16d32 vmeplus@ad,0:vme32d32 vmefdma@ad,0:vmefdma16d8 vmeplus@ad,0:vme32d8 vmefdma@ad,0:vmefdma24blt vmeplus@ad,0:vme32mblt onl5v4[52]% /devices/....の下には cc@2d,ff00:ccスペシャルファイルは正常に作られて いるが、リンクが正しくできていない。 cc_load.shスクリプトを修正する。 (3-8). Solaris7、と Solaris2.6 のシステムで dmesg を実行 Solaris7 システムでの dmesg 実行 onl5v4[55]% dmesg Tue Mar 6 17:52:22 JST 2001 Mar 5 10:43:56 onl5v4 unix: : Mar 5 10:43:56 onl5v4 unix: obio 0x10001000 : Mar 5 10:49:48 onl5v4 unix: CAMAC device driver V2.0, 1991-2000 by Y.TAKEUCHI(ICRR), E.Inoue(KEK) Mar 5 10:49:48 onl5v4 unix: cc0 at VME0: vme16d16,0xff00 VME level 4 vector 0xff sparc ipl 7 Mar 5 10:49:48 onl5v4 unix: cc0 is /iommu@0,10000000/VME@0,7ffffe00/cc@2d,ff00 : onl5v4[56]% Solaris2.6 システムでの dmesg 実行 onlsun1[33]% dmesg Mar 6 18:03 SBus slot 1 0x800000 and SBus slot 1 0xc00000 and SBus slot 1 0x1000000 SBus level 2 sparc ipl 3 FORE,sba-200e0 is /iommu@f,e0000000/sbus@f,e0001000/FORE,sba-200e@1,400000 SUNW,hme0: FEPS (Rev Id = 22) Found SUNW,hme0 at sbus0: SBus slot 3 0x8c00000 and SBus slot 3 0x8c02000 and SBus slot 3 0x8c04000 and SBus slot 3 0x8c06000 and SBus slot 3 0x8c07000 SBus level 4 sparc ipl 7 SUNW,hme0 is /iommu@f,e0000000/sbus@f,e0001000/SUNW,hme@3,8c00000 SUNW,hme0: Using Internal Transceiver : onlsun1[34]% Solaris7 では dmesgコマンドの実行出力には、各行の先頭部に日付けと時刻 が付加されている。 このために、dmesgコマンドの出力を元にして作った /dev/ccファイルが正しく作られなかったようだ。 (3-9). cc_link.shスクリプトを修正する onl5v4[61]% pwd /export/home/onl5v4/inoue/CAMAC/FORCE-50T-sol2.6-list/script onl5v4[62]% ls -l total 14 -rw-r--r-- 1 inoue kek 66 Oct 18 14:58 awk1.txt -rw-r--r-- 1 inoue kek 37 Oct 18 15:30 awk2.txt -rwxr-xr-x 1 inoue kek 233 Oct 18 15:32 cc_build.gcc.sh* -rwxr-xr-x 1 inoue kek 234 Oct 18 15:33 cc_build.sh* -rwxr-xr-x 1 inoue kek 528 Oct 18 15:36 cc_link.sh* -rwxr-xr-x 1 inoue kek 808 Oct 18 15:39 cc_load.sh* -rwxr-xr-x 1 inoue kek 270 Jun 23 2000 cc_unload.sh* onl5v4[63]% vi cc_link.sh #!/bin/csh # # cc_mknod.sh 18-OCT-1993 Y.Takeuchi(T.I.T.) # modified: 7-Mar-2001 E.Inoue(KEK) # set SYS57 = "5.7" set SYSNL = `uname -sr` if ( $SYSNL[2] == $SYS57 )then set CCDIR=`dmesg|grep 'cc0 is'|tail -1|awk '{print $8}'|awk -f script/awk1.txt` set CCNAM=`dmesg|grep 'cc0 is'|tail -1|awk '{print $8}'|awk -f script/awk2.txt` else set CCDIR=`dmesg|grep 'cc0 is'|tail -1|awk '{print $3}'|awk -f script/awk1.txt` set CCNAM=`dmesg|grep 'cc0 is'|tail -1|awk '{print $3}'|awk -f script/awk2.txt` #set CCMAJOR = `modinfo | grep CAMAC | awk ' {print $4}'` endif #echo "CCDIR=${CCDIR}" #echo "CCNAM=${CCNAM}" #echo ${CCMAJOR} #mkdir -p ${CCDIR} #cd ${CCDIR} #mknod ${CCNAM} c ${CCMAJOR} 0 #chmod 666 ${CCNAM} if (${CCNAM} == "")then ln -s ${CCDIR}:cc /dev/cc else ln -s ${CCDIR}/${CCNAM}:cc /dev/cc endif onl5v4[64]% (3-10). "make load" を実行する onl5v4# pwd /export/home/onl5v4/inoue/CAMAC/FORCE-50T-sol2.6-list onl5v4# ls -l /dev/cc lrwxrwxrwx 1 root other 22 Mar 5 10:50 /dev/cc -> /devices10:49:48///:cc onl5v4# rm /dev/cc onl5v4# ls -l /dev/cc /dev/cc: No such file or directory onl5v4# make unload ./script/cc_unload.sh [Removing CAMAC device driver] [Removing CAMAC device driver from system] [Deleting CAMAC device files] onl5v4# make load ./script/cc_load.sh [Installing CAMAC device driver] [Adding CAMAC device driver to system] [Configuring CAMAC device driver] [Making CAMAC device files] sun4m onl5v4# ls -l /dev/cc lrwxrwxrwx 1 root other 54 Mar 7 11:04 /dev/cc -> /devices/iommu@0,10000000/VME@0,7ffffe00/cc@2d,ff00:cc onl5v4# onl5v4# modinfo | grep CAMAC 191 f5b54324 70ac 106 1 cc (CAMAC driver v2.0 by Y.Takeuchi) onl5v4# ok. camac ドライバは正常にロード、アンロードできた。 /var/adm/messagesファイル中の情報 : Mar 7 11:02:54 onl5v4 unix: flash-memory0: User flash device not assembled, unk nown or write protected. Mar 7 11:04:04 onl5v4 unix: CAMAC device driver V2.0, 1991-2000 by Y.TAKEUCHI(I CRR), E.Inoue(KEK) Mar 7 11:04:04 onl5v4 unix: cc0 at VME0: vme16d16,0xff00 VME level 4 vector 0xf f sparc ipl 7 Mar 7 11:04:04 onl5v4 unix: cc0 is /iommu@0,10000000/VME@0,7ffffe00/cc@2d,ff00 Mar 7 11:04:12 onl5v4 unix: flash-memory0: Boot flash device not assembled, unk nown or write protected. : (4). VME スレーブ・ウインドウの設定 onl5v4 のカーネル・アーキテクチャをチェック。 onl5v4[75]% arch -k sun4m onl5v4[76]% (4-1). VME.conf ファイルを修正する onl5v4[81]% pwd /platform/sun4m/kernel/drv onl5v4[82]% ls -l total 1534 -rw-r----- 1 root other 200348 Feb 26 16:07 VME -rw-r----- 1 root other 2850 Feb 26 16:07 VME.conf -rwxr-xr-x 1 root sys 18492 Sep 1 1998 bwtwo* -rwxr-xr-x 1 root sys 32056 Sep 1 1998 cgeight* -rwxr-xr-x 1 root sys 44580 Jun 29 1999 cgfourteen* -rwxr-xr-x 1 root sys 24596 Sep 1 1998 cgsix* -rwxr-xr-x 1 root sys 19936 Sep 1 1998 cgthree* -rwxr-xr-x 1 root sys 6592 Sep 1 1998 dma* -rwxr-xr-x 1 root sys 68288 Sep 1 1998 fd* -rwxr-xr-x 1 root sys 52616 Jan 14 1999 flash-memory* -rw-r--r-- 1 root other 1576 Feb 26 16:04 flash-memory.conf -rwxr-xr-x 1 root sys 13728 Sep 1 1998 iommu* -rwxr-xr-x 1 root sys 5512 Sep 1 1998 ledma* -rwxr-xr-x 1 root sys 15776 Sep 1 1998 mic* -rwxr-xr-x 1 root sys 5264 Sep 1 1998 obio* -rwxr-xr-x 1 root sys 8216 Sep 1 1998 pmc* -rw-r--r-- 1 root sys 146 Sep 1 1998 profile.conf -rwxr-xr-x 1 root sys 8136 Sep 1 1998 rootnex* -rwxr-xr-x 1 root sys 8524 Sep 1 1998 sbus* -rwxr-xr-x 1 root sys 6320 Sep 1 1998 sbusmem* -rw-r--r-- 1 root sys 678 Sep 1 1998 sbusmem.conf -rwxr-xr-x 1 root sys 62436 Sep 1 1998 stc* -rw-r--r-- 1 root sys 1244 Sep 1 1998 stc.conf -rwxr-xr-x 1 root sys 26920 Sep 1 1998 sx* -rwxr-xr-x 1 root sys 16212 Sep 1 1998 sx_cmem* -rw-r--r-- 1 root sys 800 Feb 21 17:24 sx_cmem.conf -rwxr-xr-x 1 root sys 19300 Aug 12 1998 tcx* -rwxr-xr-x 1 root sys 58840 Jun 3 1999 zs* -rwxr-xr-x 1 root sys 25760 Sep 1 1998 zsh* -rw-r--r-- 1 root sys 131 Sep 1 1998 zsh.conf onl5v4[83]% ls -l V* -rw-r----- 1 root other 200348 Feb 26 16:07 VME -rw-r----- 1 root other 2850 Feb 26 16:07 VME.conf onl5v4[84]% onl5v4# mv VME.conf VME.conf.org onl5v4# cp VME.conf.org VME.conf onl5v4# ls -l V* -rw-r----- 1 root other 200348 Feb 26 16:07 VME -rw-r----- 1 root other 2850 Mar 7 15:52 VME.conf -rw-r----- 1 root other 2850 Feb 26 16:07 VME.conf.org onl5v4# chmod o+r VME.conf onl5v4# ls -l V* -rw-r----- 1 root other 200348 Feb 26 16:07 VME -rw-r--r-- 1 root other 2850 Mar 7 15:52 VME.conf -rw-r----- 1 root other 2850 Feb 26 16:07 VME.conf.org onl5v4# onl5v4# vi VME.conf # %Z%$RCSfile: VME.conf,v $ $Revision: 1.7 $ %D% FRC # ############################################################################### # The "pamc" property declares the AM-code values for the two programmable AM # codes (if supported by the hardware). Drivers that want to use these have to # use the values configured here in the bustype value(s) of their reg property. # ############################################################################### # "vmewin" properties may be defined to set up static local-to-VMEbus # mappings (usually not necessary, since mappings are set up on demand). # # The format is # vmewin=,, # # can be omitted for the first vmewin property. For subsequent properties, # set it to 1,2,3,4... The limit is the number of hardware ranges, # e.g. 16 on FGA-5000. # defines the requested VMEbus address. # defines the size of the mapping in bytes. # encodes the properties of the VME window. It's a bit set of # VME_BT_xxx values as defined in sys/vme_types.h. # # Example to set up a VME window for VMEbus address 0x0 - 0x10000 in A24 # space for D32 privileged data accesses, write posting enabled: # # vmewin=0x0, 0x10000, 0x01020004 # ############################################################################### # The "slavewin" property defines a VMEbus-to-local mapping. It's necessary for # device drivers that want to set up DMA via the standard DDI DMA interface # calls, so that the VME nexus can provide a VMEbus address where the device # can perform DMA to. # Don't define this if you do not need it, as it will eat up a VME slave # range. Note also that the VME bridge will decode these addresses once the # slavewin property has been set and report VME Bus Errors if no driver # uses it! So if you get strange bus errors, check this file for the # slavewin property. # The format is: # # slavewin , , # # and must be aligned exactly to hardware requirements: # S4: vme_start must be aligned to 1MB, size must be 1MB # FGA-5x00: vme_start must be aligned to size. size can be # 8K, 16K, 32K, ..., 16MB for A24 # 2MB, 4MB, 8MB, 16MB for A32 # Universe: vme_start and size must be aligned to 64K # is a bitset of the VME_BT_xxx values as defined # in sys/vme_types. Standard values are: # 0x00020000 for a slave window in A24 space # 0x00040000 for a slave window in A32 space # # Add 0x01000000 to enable write posting for higher performance (FGA-5x00, # Universe). # # Refer to the manual for possible values for different hardware. # Example for a slave window of 1MB in A24 space at address 0: # # slavewin=0x000000,0x100000,0x00020000 ############################################################################### # slavewin=0x000000,0x100000,0x00020000 pamc=0x10, 0x11 ; "VME.conf" 64 lines, 2888 characters onl5v4# (4-2). システムをリブートする onl5v4# /usr/sbin/shutdown -i0 -g0 Shutdown started. Wed Mar 7 16:00:26 JST 2001 Do you want to continue? (y or n): y Changing to init state 0 - please wait Broadcast Message from root (console) on onl5v4 Wed Mar 7 16:00:28... THE SYSTEM onl5v4 IS BEING SHUT DOWN NOW ! ! ! Log off now or risk your files being damaged showmount: onl5v4: RPC: Program not registered onl5v4# Hangup # INIT: New run level: 0 The system is coming down. Please wait. System services are now being stopped. Print services stopped. syslogd: going down on signal 15 umount: /export/home busy The system is down. INIT: failed write of utmpx entry:"s0" INIT: failed write of utmpx entry:"fw" syncing file systems... done Program terminated Type help for more information ok ok boot -r Resetting ... screen not found. Can't open input device. Keyboard not present. Using tty for input and output. SPARC CPU-5V, No Keyboard ROM Rev. 2.15.3, 48 MB memory installed, Serial #9149788. Ethernet address 0:80:42:b:2d:5c, Host ID: 808b9d5c. Rebooting with command: -r Boot device: /iommu/sbus/espdma@5,8400000/esp@5,8800000/sd@3,0 File and args: - r SunOS Release 5.7 Version Generic_106541-06 [UNIX(R) System V Release 4.0] Copyright (c) 1983-1999, Sun Microsystems, Inc. NOTICE: VME: slavewin at vme=0x0, size=0x100000 space=0x2c020017 configuring network interfaces: le0. Hostname: onl5v4 Configuring the /devices directory CAMAC device driver V2.0, 1991-2000 by Y.TAKEUCHI(ICRR), E.Inoue(KEK) Configuring the /dev directory Configuring the /dev directory (compatibility devices) The system is coming up. Please wait. checking ufs filesystems /dev/rdsk/c0t3d0s7: is clean. NIS domainname is kek.jp starting rpc services: rpcbind keyserv done. Setting netmask of le0 to 255.255.252.0 Setting default interface for multicast: add net 224.0.0.0: gateway onl5v4 syslog service starting. Print services started. volume management starting. The system is ready. onl5v4 console login: ok. slavewin は正しく設定できた。 ---xxxx ( ここまでやった 継続中) --- (6). セクション (6-1). サブセクション (6-1-1). サブサブセクション