May 20, 1998 onl7v1: Solaris 2.5 cc ドライバのデバッグ. cc ドライバの再インストール ~~~~~~~~~~~~~~~~~~~~~~~~~~~ (http://www-online.kek.jp/~inoue/CAMAC/ onl7v1-sol2.5/camac-step06.txt) 高エネルギー加速器研究機構 素粒子原子核研究所 物理、オンライングループ 井上 栄二 (1). 現状確認 (A). Solaris2.5システムを再度インストールし直した。 その後、VMEドライバ および CAMACドライバを再度インストールし直した。 (B). 同一クレート内に複数の CPUボードを置かなければ cam2ブロック転送 は正常に実行できることを、onl7v2(Solaris2.6) と onl5v4(Solaris2.6) の CAMAC のテストで確認した。 (C). onl7v1 の CPUボードだけをクレートに差して、CAMAC のテスト中、また システムを壊してしまった。 (D). onl7v1 上の Solaris2.5システムをインストールし直した。 (E). Solaris2.5用のVMEドライバ、FRCvme-2.0.3をインストールし直した。 (2). ここでやるべきこと onl7v1 に ccドライバを再インストールする。 (3). VMEドライバがインストールされていることを確認 onlsun1[34]% rlogin onl7v1 Last login: Wed May 20 10:07:16 on console Sun Microsystems Inc. SunOS 5.5 Generic November 1995 onl7v1[33]% pkginfo | grep FRC system FRCvme VMEbus Driver CPU-5V/5VT/20VT/24VT/7V/ Solaris 2.5 onl7v1[34]% (4). ccドライバのキットを入手およびインストール (4-1). オンライン・グループの anonymous ftp サイトから入手したキットの 確認 onl7v1[35]% pwd /export/home/onl7v1/inoue/CAMAC/Driver/FORCE-5V-sol2.5 onl7v1[36]% ls -l total 486 -rw-r--r-- 1 inoue kek 2041 May 23 1997 Makefile -rw-r--r-- 1 inoue kek 2730 Jul 1 1997 README -rwxr-xr-x 1 inoue kek 12924 May 14 15:50 cam1* -rw-r--r-- 1 inoue kek 1170 May 13 1997 cam1.c -rwxr-xr-x 1 inoue kek 27512 May 14 15:50 cam2* -rw-r--r-- 1 inoue kek 2295 May 22 1997 cam2.f -rwxr-xr-x 1 inoue kek 13504 May 14 15:50 cam3* -rw-r--r-- 1 inoue kek 2055 May 21 1997 cam3.c -rw-r--r-- 1 inoue kek 9740 May 21 1997 camlib.c -rw-r--r-- 1 inoue kek 1415 May 13 1997 camlib.h -rw-r--r-- 1 inoue kek 9460 May 14 15:50 camlib.o -rw-r--r-- 1 inoue kek 53780 May 14 15:49 cc -rw-r--r-- 1 inoue kek 64403 Jun 2 1997 cc.c -rw-r--r-- 1 inoue kek 288 May 13 1997 cc.conf -rw-r--r-- 1 inoue kek 2748 May 13 1997 cc.h -rw-r--r-- 1 inoue kek 2288 May 13 1997 cc_common.h -rw-r--r-- 1 inoue kek 876 May 13 1997 cc_config.h -rw-r--r-- 1 inoue kek 3289 May 13 1997 forlib.c -rw-r--r-- 1 inoue kek 3416 May 14 15:50 forlib.o -rw-r--r-- 1 inoue kek 4058 May 13 1997 k2917.h -rw-r--r-- 1 inoue kek 13736 May 14 15:50 libcamac.a -rw-r--r-- 1 inoue kek 257 Nov 10 1997 make-install.log -rw-r--r-- 1 inoue kek 1094 Nov 10 1997 make.log drwxr-xr-x 2 inoue kek 512 Nov 10 1997 script/ onl7v1[37]% (4-2). キットをコンパイル、インストールする onl7v1[53]% which cc /kek/compilers/volume5/SUNWspro/bin/cc onl7v1[54]% cc -V cc: WorkShop Compilers 4.2.1 04 Feb 1997 C 4.2.1 usage: cc [ options] files. Use 'cc -flags' for details onl7v1[55]% which f77 /kek/compilers/volume5/SUNWspro/bin/f77 onl7v1[56]% 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 onl7v1[57]% onl7v1[59]% pwd /export/home/onl7v1/inoue/CAMAC/Driver/FORCE-5V-sol2.5 onl7v1[60]% make clean \rm -f cc *.o libcamac.a cam1 cam2 cam3 *~ core onl7v1[61]% 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 onl7v1[62]% onl7v1[63]% su Password: # csh onl7v1# source /.cshrc onl7v1# ls -l /usr/local /usr/local: No such file or directory onl7v1# df -k Filesystem kbytes used avail capacity Mounted on /dev/dsk/c0t3d0s0 119703 15634 92099 15% / /dev/dsk/c0t3d0s6 288319 185486 74003 72% /usr /proc 0 0 0 0% /proc fd 0 0 0 0% /dev/fd /dev/dsk/c0t3d0s7 3607765 39213 3207782 2% /export/home /dev/dsk/c0t3d0s3 1926998 9 1734299 1% /home1 /dev/dsk/c0t3d0s4 1926998 9 1734299 1% /home2 /dev/dsk/c0t3d0s5 384431 45190 300801 14% /opt swap 101800 16 101784 1% /tmp kiwifs:/public/sun/Solaris2 8316189 7560235 672793 92% /kekfs/kek onlsun1:/home1/local 1567984 1395800 170616 90% /net/onlsun1/home1/local onlsun1:/home1/cern/95a 1567984 1395800 170616 90% /net/onlsun1/home1/cern/95a onlsun1:/home1/opt_ext/inoue-nfs 1567984 1395800 170616 90% /net/onlsun1/home1/opt_ext/inoue-nfs onlsun1:/export/home/onlsun1/inoue 1972728 849280 1121472 44% /net/onlsun1/export/home/onlsun1/inoue onl7v1# mkdir /home1/local onl7v1# ln -s /home1/local /usr/local onl7v1# ls -l /usr total 126 drwxrwxr-x 2 root bin 1024 May 15 14:46 4lib/ lrwxrwxrwx 1 root root 5 May 15 14:39 5bin -> ./bin/ lrwxrwxrwx 1 root root 10 May 15 14:39 adm -> ../var/adm/ drwx------ 8 root bin 512 May 15 14:39 aset/ drwxrwxr-x 2 root bin 7168 May 15 14:42 bin/ drwxr-xr-x 4 bin bin 512 May 15 14:38 ccs/ drwxrwxr-x 5 root bin 512 May 15 14:44 demo/ lrwxrwxrwx 1 root root 16 May 15 14:28 dict -> ./share/lib/dict/ drwxrwxr-x 5 root bin 512 May 15 14:31 dt/ drwxrwxr-x 2 root bin 512 May 15 14:26 games/ drwxrwxr-x 20 root bin 3072 May 15 14:46 include/ drwxr-xr-x 8 root sys 512 May 15 14:26 kernel/ drwxrwxr-x 2 bin bin 512 May 15 14:26 kvm/ drwxrwxr-x 28 root bin 4608 May 19 15:20 lib/ lrwxrwxrwx 1 root other 12 May 20 11:06 local -> /home1/local/ drwx------ 2 root root 8192 May 15 14:24 lost+found/ lrwxrwxrwx 1 root root 11 May 15 14:26 mail -> ../var/mail/ lrwxrwxrwx 1 root root 11 May 15 14:37 man -> ./share/man/ drwxrwxr-x 4 root sys 512 May 15 14:26 net/ lrwxrwxrwx 1 root root 11 May 15 14:26 news -> ../var/news/ drwxr-xr-x 5 bin bin 512 May 15 14:39 oasys/ drwxrwxr-x 2 root bin 512 May 15 14:26 old/ drwxrwxr-x 8 root bin 512 May 15 14:36 openwin/ drwxr-xr-x 6 root sys 1024 May 15 14:40 platform/ lrwxrwxrwx 1 root root 15 May 15 14:26 preserve -> ../var/preserve/ drwxr-xr-x 4 bin bin 512 May 15 14:28 proc/ lrwxrwxrwx 1 root root 15 May 15 14:26 pub -> ./share/lib/pub/ drwxr-xr-x 5 bin bin 512 May 15 14:27 sadm/ drwxrwxr-x 4 root bin 4608 May 15 14:46 sbin/ drwxr-xr-x 6 root sys 512 May 15 14:37 share/ drwxr-xr-x 6 root bin 512 May 15 14:32 snadm/ lrwxrwxrwx 1 root root 12 May 15 14:26 spool -> ../var/spool/ lrwxrwxrwx 1 root root 11 May 15 14:26 src -> ./share/src/ lrwxrwxrwx 1 root root 10 May 15 14:26 tmp -> ../var/tmp/ drwxrwxr-x 2 root bin 2048 May 15 14:39 ucb/ drwxr-xr-x 4 bin bin 512 May 15 14:41 ucbinclude/ drwxr-xr-x 2 bin bin 512 May 15 14:41 ucblib/ drwxr-xr-x 7 bin bin 512 May 15 14:39 vmsys/ drwxr-xr-x 3 root bin 512 May 15 14:42 xpg4/ onl7v1# onl7v1# pwd /export/home/onl7v1/inoue/CAMAC/Driver/FORCE-5V-sol2.5 onl7v1# 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 onl7v1# (4-3). slave window の設定をやる VME.confファイルに slavewinプロパティを設定する。 onl7v1# pwd /kernel/drv onl7v1# ls VME* icmp.conf pci_pci* qe* tcp.conf VME.conf ip* pcmcia* qec* tl* arp* ip.conf pcmcia.conf rtvc* tl.conf arp.conf isp* pcmem* sad* udp* be* iwscn* pcram* sad.conf udp.conf bpp* iwscn.conf pcram.conf* sd* vmectl* clone* le* pcser* sd.conf vmectl.conf clone.conf lebuffer* pem* soc* vmedma* cn* llc1* pem.conf sp* vmedma.conf cn.conf llc1.conf pln* sp.conf vmedvma* conskbd* log* pln.conf ssd* vmedvma.conf conskbd.conf log.conf profile* ssd.conf vmefdma* consms* mm* pseudo* st* vmefdma.conf consms.conf mm.conf pseudo.conf st.conf vmeplus* esp* openeepr* ptc* stp4020* vmeplus.conf fas* openeepr.conf ptc.conf sy* wc* hme* options* ptsl* sy.conf wc.conf icmp* options.conf ptsl.conf tcp* xbox* onl7v1# mv VME.conf VME.conf.org onl7v1# cp VME.conf.org VME.conf onl7v1# ls -l VME.conf* -rw-r--r-- 1 root other 1769 May 20 11:39 VME.conf -rw-r--r-- 1 root sys 1769 Dec 13 1996 VME.conf.org onl7v1# chgrp sys VME.conf onl7v1# ls -l VME.conf* -rw-r--r-- 1 root sys 1769 May 20 11:39 VME.conf -rw-r--r-- 1 root sys 1769 Dec 13 1996 VME.conf.org onl7v1# vi VME.conf # @(#)VME.conf 1.4 96/12/12 FRC # # vmewin must be on a 256MB boundary # vmewin= # vmewinX= # The syntax for VME A24/A16 windows is vmexxdxx=, # The parameter is currently ignored (the full 16MB/64K range is used). # If these properties exist, the VSI is programmed with a static SBus to # VMEbus mapping. # # If you don't need this and want to save range registers in the VSI, # you should comment it out. # # The slavewin property is only needed for device drivers that want to # to do 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 VSI 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 , , # # vme_start must be aligned to vme_size. vme_size must be 0x100000 (1MB), 2MB # 4MB, 8MB, ... 64MB. Space is a bitset of the VME_BT_xxx literals defined # in sys/vme_types. Standard values are: # 0x00020000 for a slave window in A24 space # 0x00040000 for a slave window in A32 space # # Refer to the manual for possible values for different hardware. E.g. if # you want the slave memory to accept BLT/MBLT transfers, set the # VME_BT_BLT/VME_BT_MBLT bits: # 0x00040600 for a slave window in A32 space with BLT/MBLT enabled. # #vmewin1=0x40000000 #vmewin2=0x20000000 #vmewin3=0x30000000 #vmewin=0x10000000 #vme16d16=0x0,0x10000 #vme16d32=0x0,0x10000 #vme24d32=0x0,0x100000 #vme24d16=0x0,0x100000 #slavewin=0x000000,0x100000,0x00020000 slavewin=0x000000,0x100000,0x00020000 ; "VME.conf" 47 lines, 1807 characters onl7v1# (4-4). CAMACドライバをロードしてみる onl7v1# pwd /export/home/onl7v1/inoue/CAMAC/Driver/FORCE-5V-sol2.5 onl7v1# make load ./script/cc_load.sh [Installing CAMAC device driver] [Adding CAMAC device driver to system] [Configuring CAMAC device driver] [Making CAMAC device files] onl7v1# (4-5). ここで、システムを立ちあげ直す onl7v1 console login: root Password: May 20 13:57:09 onl7v1 login: ROOT LOGIN /dev/console Last login: Wed May 20 13:54:50 on pts/0 Sun Microsystems Inc. SunOS 5.5 Generic November 1995 Starting OpenWindows in 5 seconds (type Control-C to interrupt) ^C# /usr/sbin/shutdown -i0 -g0 Shutdown started. Wed May 20 13:57:19 JST 1998 Do you want to continue? (y or n): y Broadcast Message from root (console) on onl7v1 Wed May 20 13:57:24... THE SYSTEM IS BEING SHUT DOWN NOW ! ! ! Log off now or risk your files being damaged showmount: onl7v1: RPC: Program not registered Changing to init state 0 - please wait # INIT: New run level: 0 The system is coming down. Please wait. System services are now being stopped. Print services stopped. Stopping the syslog service. May 20 13:57:31 onl7v1 syslogd: going down on signal 15 umount: /net busy umount: /kekfs busy nfs umount: /vol: not mounted May 20 13:57:39 /usr/sbin/vold[438]: problem unmounting /vol; Interrupted system call umount: /net busy umount: /kekfs busy The system is down. syncing file systems... [7] 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-7V, No Keyboard ROM Rev. 2.15.1, 64 MB memory installed, Serial #9157050. Ethernet address 0:80:42:b:49:ba, Host ID: 808bb9ba. Rebooting with command: -r Boot device: /iommu/sbus/espdma@5,8400000/esp@5,8800000/sd@3,0 File and args: - r SunOS Release 5.5 Version Generic [UNIX(R) System V Release 4.0] Copyright (c) 1983-1995, Sun Microsystems, Inc. NOTICE: VME SYSFAIL (clr) not handled. NOTICE: VME: slavewin at vme=0x0, size=0x100000 space=0x2c020017 configuring network interfaces: hme0 le0. Hostname: onl7v1 Configuring the /devices directory vmeplus0 at VME0: vme16d16 0x0 and vme24d16 0x0 and vme32d16 0x0 and vme16d32 0x 0 and vme24d32 0x0 and vme32d32 0x0 CAMAC device driver V1.3x, 1991-1993 by Y.TAKEUCHI (T.I.T.) cc0 at VME0: vme16d16 0xff00 VME level 4 vector 0xff sparc ipl 7 vmemem0 at VME0: vme32d16 0x0 vmemem1 at VME0: vme16d16 0x0 vmemem2 at VME0: vme24d16 0x0 vmemem3 at VME0: vme32d32 0x0 vmemem4 at VME0: vme16d32 0x0 vmemem5 at VME0: vme24d32 0x0 vmectl0 at VME0 Configuring the /dev directory Configuring the /dev directory (compatibility devices) The system is coming up. Please wait. checking ufs filesystems /dev/rdsk/c0t3d0s5: is clean. /dev/rdsk/c0t3d0s4: is clean. /dev/rdsk/c0t3d0s3: is clean. /dev/rdsk/c0t3d0s7: is clean. Flushing routing table: add net default: gateway ICCFG1 NIS domainname is kek.jp starting rpc services: rpcbind keyserv kerbd done. Setting netmask of hme0 to 255.255.252.0 Setting netmask of le0 to 255.255.252.0 Setting default interface for multicast: add net 224.0.0.0: gateway onl7v1 syslog service starting. Print services started. volume management starting. The system is ready. onl7v1 console login: ok. 正常に立ち上がった。 (5). ccドライバのロード ccドライバのロードが正しく実行できることを確認する。 onlsun1[46]% rlogin onl7v1 Last login: Wed May 20 13:54:44 from onlsun1 Sun Microsystems Inc. SunOS 5.5 Generic November 1995 onl7v1[33]% ls -l /dev/cc lrwxrwxrwx 1 root other 3 May 20 13:55 /dev/cc -> :cc onl7v1[34]% onl7v1# pwd /export/home/onl7v1/inoue/CAMAC/Driver/FORCE-5V-sol2.5 onl7v1# make unload ./script/cc_unload.sh [Removing CAMAC device driver] [Removing CAMAC device driver from system] [Deleting CAMAC device files] onl7v1# make load ./script/cc_load.sh [Installing CAMAC device driver] [Adding CAMAC device driver to system] [Configuring CAMAC device driver] [Making CAMAC device files] onl7v1# ls -l /dev/cc lrwxrwxrwx 1 root other 69 May 20 14:06 /dev/cc -> /devices/iommu@0,10000000/sbus@0,10001000/VME@5,ffffe00/cc@2d,ff00:cc onl7v1# ok. 正常に実行できた。 --- (6). 項目タイトル (6-1). サブ項目タイトル (6-1-1). サブサブ項目タイトル