Oct 15, 1999 onl8v1: Solaris 7 cc ドライバのテスト. cc ドライバのインストール ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (http://www-online.kek.jp/~inoue/CAMAC/ onl8v1-sol7/camac-step01.txt) 高エネルギー加速器研究機構 素粒子原子核研究所 物理、オンライングループ 井上 栄二 (1). 現状確認 (A). SPARC CPU-8VT、Solaris7、VMEドライバが届いた。 (B). CPU-8VT に Solaris7 のシステムをインストールした。 (C). /etc の下の各設定、および /export/home の作成をやった。 (D). CPU-8VT に Solaris7用の VMEドライバ、FRCdrv-2.7(FRCvme v2.4.1) をインストールした。 (2). ここでやるべきこと onl8v1 に ccドライバをインストールする。 (3). ccドライバのキットを入手、インストールする (3-1). オンライン・グループの anonymous ftp サイトから、キットを入手 onl8v1[34]% pwd /export/home/onl8v1/inoue/CAMAC onl8v1[35]% ls -l total 0 onl8v1[36]% ftp online Connected to onlax2. 220 onlax2.kek.jp FTP server (Digital 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> dir 200 PORT command successful. 150 Opening ASCII mode data connection for /bin/ls (130.87.219.78,32784). total 4 d--x--x--x 2 0 0 512 Jun 17 1997 bin drwxr-xr-x 3 0 0 512 Jun 17 1997 etc drwxr-xr-x 4 60002 60002 512 Jun 17 1997 pub -rw-r--r-- 1 0 0 125 Jun 17 1997 welcome.msg 226 Transfer complete. 253 bytes received in 0.032 seconds (7.62 Kbytes/s) 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.219.78,32785). total 3310 -rw-r--r-- 1 0 10 1173 Apr 19 1995 122d_to_e.tar.gz -rw-r--r-- 1 0 10 24125 Jul 26 16:54 FORCE-50T-sol2.6.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 30106 Oct 13 15:17 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 -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. 1909 bytes received in 0.048 seconds (38.90 Kbytes/s) ftp> binary 200 Type set to I. ftp> get FORCE-50T-sol2.6.tar.gz 200 PORT command successful. 150 Opening BINARY mode data connection for FORCE-50T-sol2.6.tar.gz (130.87.219.78,32786) (24125 bytes). 226 Transfer complete. local: FORCE-50T-sol2.6.tar.gz remote: FORCE-50T-sol2.6.tar.gz 24125 bytes received in 0.039 seconds (606.89 Kbytes/s) ftp> quit 221 Goodbye. onl8v1[37]% ls -l total 48 -rw-r--r-- 1 inoue kek 24125 Oct 13 17:04 FORCE-50T-sol2.6.tar.gz onl8v1[38]% (3-2). 入手したキットを展開する onl8v1[41]% pwd /export/home/onl8v1/inoue/CAMAC/Driver onl8v1[42]% ls -l total 48 -rw-r--r-- 1 inoue kek 24125 Oct 13 17:04 FORCE-50T-sol2.6.tar.gz onl8v1[43]% gzip -d FORCE-50T-sol2.6.tar.gz onl8v1[44]% ls -l total 288 -rw-r--r-- 1 inoue kek 132096 Jul 26 16:53 FORCE-50T-sol2.6.tar onl8v1[45]% 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 onl8v1[46]% (3-3). 展開したキットをコンパイルする (3-3-1). コンパイラのバージョンをチェック onl8v1[46]% which cc /kek/compilers/volume5/SUNWspro/bin/cc onl8v1[47]% which f77 /kek/compilers/volume5/SUNWspro/bin/f77 onl8v1[48]% cc -V cc: WorkShop Compilers 4.2.1 04 Feb 1997 C 4.2.1 usage: cc [ options] files. Use 'cc -flags' for details onl8v1[49]% f77 -V f77: WorkShop Compilers 4.2.1 04 Feb 1997 FORTRAN 77 4.2.1 Usage: f77 [ options ] files. Use 'f77 -flags' for details onl8v1[50]% (3-3-2). CAMACドライバをコンパイルする onl8v1[54]% pwd /export/home/onl8v1/inoue/CAMAC/Driver/FORCE-50T-sol2.6 onl8v1[55]% ls -l total 234 -rw-r--r-- 1 inoue kek 2041 Jul 19 15:30 Makefile -rw-r--r-- 1 inoue kek 3624 Jul 26 14:10 README -rw-r--r-- 1 inoue kek 1170 Jul 16 10:47 cam1.c -rw-r--r-- 1 inoue kek 2295 Jul 16 10:47 cam2.f -rw-r--r-- 1 inoue kek 2055 Jul 16 10:47 cam3.c -rw-r--r-- 1 inoue kek 9740 Jul 16 10:47 camlib.c -rw-r--r-- 1 inoue kek 1415 Jul 16 10:47 camlib.h -rw-r--r-- 1 inoue kek 74943 Jul 26 15:32 cc.c -rw-r--r-- 1 inoue kek 288 Jul 16 10:47 cc.conf -rw-r--r-- 1 inoue kek 2931 Jul 26 16:45 cc.h -rw-r--r-- 1 inoue kek 2288 Jul 16 10:47 cc_common.h -rw-r--r-- 1 inoue kek 876 Jul 16 10:47 cc_config.h -rw-r--r-- 1 inoue kek 3289 Jul 16 10:47 forlib.c -rw-r--r-- 1 inoue kek 4058 Jul 16 10:47 k2917.h drwxr-xr-x 2 inoue kek 512 Jul 16 14:59 script/ onl8v1[56]% onl8v1[56]% 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/include/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/include/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 onl8v1[57]% (3-4). "make install" をやる onl8v1# ls -l /usr/local /usr/local: No such file or directory onl8v1# mkdir /usr/local onl8v1# pwd /export/home/onl8v1/inoue/CAMAC/Driver/FORCE-50T-sol2.6 onl8v1# ls -l total 516 -rw-r--r-- 1 inoue kek 2041 Jul 19 15:30 Makefile -rw-r--r-- 1 inoue kek 3624 Jul 26 14:10 README -rwxr-xr-x 1 inoue kek 14068 Oct 14 13:25 cam1 -rw-r--r-- 1 inoue kek 1170 Jul 16 10:47 cam1.c -rwxr-xr-x 1 inoue kek 29140 Oct 14 13:25 cam2 -rw-r--r-- 1 inoue kek 2295 Jul 16 10:47 cam2.f -rwxr-xr-x 1 inoue kek 14440 Oct 14 13:25 cam3 -rw-r--r-- 1 inoue kek 2055 Jul 16 10:47 cam3.c -rw-r--r-- 1 inoue kek 9740 Jul 16 10:47 camlib.c -rw-r--r-- 1 inoue kek 1415 Jul 16 10:47 camlib.h -rw-r--r-- 1 inoue kek 9608 Oct 14 13:25 camlib.o -rw-r--r-- 1 inoue kek 55820 Oct 14 13:25 cc -rw-r--r-- 1 inoue kek 74943 Jul 26 15:32 cc.c -rw-r--r-- 1 inoue kek 288 Jul 16 10:47 cc.conf -rw-r--r-- 1 inoue kek 2931 Jul 26 16:45 cc.h -rw-r--r-- 1 inoue kek 2288 Jul 16 10:47 cc_common.h -rw-r--r-- 1 inoue kek 876 Jul 16 10:47 cc_config.h -rw-r--r-- 1 inoue kek 3289 Jul 16 10:47 forlib.c -rw-r--r-- 1 inoue kek 3560 Oct 14 13:25 forlib.o -rw-r--r-- 1 inoue kek 4058 Jul 16 10:47 k2917.h -rw-r--r-- 1 inoue kek 14028 Oct 14 13:25 libcamac.a drwxr-xr-x 2 inoue kek 512 Jul 16 14:59 script onl8v1# 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 onl8v1# ls -lLR /usr/local /usr/local: total 2 drwxr-xr-x 3 root other 512 Oct 14 14:23 vme /usr/local/vme: total 2 drwxr-xr-x 4 root other 512 Oct 14 14:23 camac /usr/local/vme/camac: total 4 drwxr-xr-x 2 root other 512 Oct 14 14:23 include drwxr-xr-x 2 root other 512 Oct 14 14:23 lib /usr/local/vme/camac/include: total 26 -rw-r--r-- 1 root staff 1415 Oct 14 14:23 camlib.h -rw-r--r-- 1 root staff 2931 Oct 14 14:23 cc.h -rw-r--r-- 1 root staff 2288 Oct 14 14:23 cc_common.h -rw-r--r-- 1 root staff 876 Oct 14 14:23 cc_config.h -rw-r--r-- 1 root staff 4058 Oct 14 14:23 k2917.h /usr/local/vme/camac/lib: total 28 -rw-r--r-- 1 root staff 14028 Oct 14 14:23 libcamac.a onl8v1# (3-5). ここで、システムを立ちあげ直す # /usr/sbin/shutdown -i0 -g0 Shutdown started. Thu Oct 14 14:25:49 JST 1999 Do you want to continue? (y or n): y Changing to init state 0 - please wait Broadcast Message from root (console) on onl8v1 Thu Oct 14 14:25:51... THE SYSTEM onl8v1 IS BEING SHUT DOWN NOW ! ! ! Log off now or risk your files being damaged # 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: /net/onlsun1/home3 busy umount: /net/onlsun1/export busy umount: /net/onlsun1/home1 busy umount: /net/onlsun1/home4 busy umount: /net busy umount: /kekfs busy umount: /net/onlsun1/home3/local busy umount: /net/onlsun1/home3 busy umount: /net/onlsun1/export busy umount: /net/onlsun1/home1 busy umount: /net/onlsun1/home4 busy umount: /net/onlsun1/usr busy umount: /net busy umount: /kekfs 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-8VT, No Keyboard ROM Rev. 2.15.1, 64 MB memory installed, Serial #9172389. Ethernet address 0:80:42:b:85:a5, Host ID: 808bf5a5. 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: onl8v1 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.248.0 Setting default interface for multicast: add net 224.0.0.0: gateway onl8v1 syslog service starting. Print services started. volume management starting. The system is ready. onl8v1 console login: (3-6). ccドライバのロード、アンロード ccドライバのロード、アンロードが正しく実行できることを確認する。 onl8v1# make load ./script/cc_load.sh [Installing CAMAC device driver] [Adding CAMAC device driver to system] drvconfig: Driver (cc) failed to attach Warning: Driver (cc) successfully added to system but failed to attach [Configuring CAMAC device driver] [Making CAMAC device files] sun4m onl8v1# ls -l /dev/cc lrwxrwxrwx 1 root other 3 Oct 14 14:49 /dev/cc -> :cc onl8v1# camac ドライバはシステムに付加されたが attach実行時に fail した。 camac スペシャル・ファイルが正しく作られていない。 "make load" コマンドを実行した時、コンソール上には次のメッセージが表示 された。 Oct 14 14:48:48 onl8v1 unix: /usr/kernel/drv/cc: undefined symbol 'spl5' Oct 14 14:48:48 onl8v1 unix: WARNING: mod_load: MT-unsafe module 'cc' rejected /var/adm/messagesファイル中の情報 : Oct 14 14:48:48 onl8v1 unix: pseudo-device: devinfo0 Oct 14 14:48:48 onl8v1 unix: devinfo0 is /pseudo/devinfo@0 Oct 14 14:48:48 onl8v1 unix: /usr/kernel/drv/cc: undefined symbol 'spl5' Oct 14 14:48:48 onl8v1 unix: WARNING: mod_load: MT-unsafe module 'cc' rejected Oct 14 14:48:58 onl8v1 unix: sysconfig0: LCA is XC4003 compatible : ---xxxx ( ここまでやった 継続中) --- (6). セクション (6-1). サブセクション (6-1-1). サブサブセクション