May 27, 1998 onl7v1: Solaris 2.5.1 cc ドライバのデバッグ. cc ドライバのインストール ~~~~~~~~~~~~~~~~~~~~~~~~~~~ (http://www-online.kek.jp/~inoue/CAMAC/ onl7v1-sol2.5.1/camac-step01.txt) 高エネルギー加速器研究機構 素粒子原子核研究所 物理、オンライングループ 井上 栄二 (1). 現状確認 (A). Soalris2.5.1 が届いた。 (B). Soalris2.5.1 のシステムをインストールした。 (C). /etc の下の各設定、および /export/home のリストアをやった。 (D). sendmail のバージョン・アップをやった。 (E). Solaris2.5.1 にシステム・パッチをあてた。 (F). Solaris2.5用の VMEドライバ、FRCvme-2.0.3-fga5000.pkg を インストールした。 (注. FORCE は Solaris2.5.1用の VMEドライバは 提供していない。) (2). ここでやるべきこと onl7v1 に ccドライバをインストールする。 (3). VMEドライバがインストールされていることを確認 onlsun1[41]% rlogin onl7v1 Last login: Thu May 21 16:30:09 from onlsun1 Sun Microsystems Inc. SunOS 5.5.1 Generic May 1996 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[50]% pwd /export/home/onl7v1/inoue/CAMAC/Driver/FORCE-5V-sol2.5 onl7v1[51]% ls -l total 216 -rw-r--r-- 1 inoue kek 2041 May 23 1997 Makefile -rw-r--r-- 1 inoue kek 2730 Jul 1 1997 README -rw-r--r-- 1 inoue kek 1170 May 13 1997 cam1.c -rw-r--r-- 1 inoue kek 2295 May 22 1997 cam2.f -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 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 4058 May 13 1997 k2917.h -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[52]% (4-2). キットをコンパイル、インストールする (4-2-1). コンパイラのバージョンをチェック onl7v1[61]% which cc /kek/compilers/volume5/SUNWspro/bin/cc onl7v1[62]% 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[63]% which f77 /kek/compilers/volume5/SUNWspro/bin/f77 onl7v1[64]% 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[65]% (4-2-2). CAMACドライバをコンパイルする onl7v1[69]% pwd /export/home/onl7v1/inoue/CAMAC/Driver/FORCE-5V-sol2.5 onl7v1[70]% make clean \rm -f cc *.o libcamac.a cam1 cam2 cam3 *~ core onl7v1[71]% 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[72]% (4-3). "make install" をやる onl7v1[72]% pwd /export/home/onl7v1/inoue/CAMAC/Driver/FORCE-5V-sol2.5 onl7v1[73]% ls -l total 488 -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 13068 May 26 16:50 cam1* -rw-r--r-- 1 inoue kek 1170 May 13 1997 cam1.c -rwxr-xr-x 1 inoue kek 27568 May 26 16:50 cam2* -rw-r--r-- 1 inoue kek 2295 May 22 1997 cam2.f -rwxr-xr-x 1 inoue kek 13656 May 26 16: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 9492 May 26 16:50 camlib.o -rw-r--r-- 1 inoue kek 54292 May 26 16:50 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 3444 May 26 16:50 forlib.o -rw-r--r-- 1 inoue kek 4058 May 13 1997 k2917.h -rw-r--r-- 1 inoue kek 13796 May 26 16: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[74]% onl7v1# df -k Filesystem kbytes used avail capacity Mounted on /dev/dsk/c0t3d0s0 123063 38145 72618 35% / /dev/dsk/c0t3d0s6 443407 341590 57477 86% /usr /proc 0 0 0 0% /proc fd 0 0 0 0% /dev/fd /dev/dsk/c0t3d0s7 7488675 800284 5939531 12% /export/home /dev/dsk/c0t3d0s5 202287 81565 100502 45% /opt swap 99092 16 99076 1% /tmp kiwifs:/public/sun/Solaris2 8316189 7560250 672778 92% /kekfs/kek onl7v1# ls -l /usr/local lrwxrwxrwx 1 root other 18 Mar 2 11:01 /usr/local -> /export/home/local onl7v1# ls -lL /usr/local total 2 drwxr-xr-x 2 root other 512 Mar 2 11:05 bin 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 ip.conf pln.conf st VME.conf isp profile st.conf arp iwscn pseudo stp4020 arp.conf iwscn.conf pseudo.conf sy atapicd le ptc sy.conf atapicd.conf lebuffer ptc.conf tcp be llc1 ptsl tcp.conf bpp llc1.conf ptsl.conf tl clone log qe tl.conf clone.conf log.conf qec uata cn mm rtvc udp cn.conf mm.conf sad udp.conf conskbd openeepr sad.conf vmectl conskbd.conf openeepr.conf sd vmectl.conf consms options sd.conf vmedma consms.conf options.conf se vmedma.conf dad pci_pci ses vmedvma dad.conf pcmcia ses.conf vmedvma.conf ecpp pcmcia.conf soc vmefdma esp pcmem socal vmefdma.conf fas pcram sp vmeplus glm pcram.conf sp.conf vmeplus.conf hme pcser spcic wc icmp pem ssd wc.conf icmp.conf pem.conf ssd.conf xbox ip pln ssd.conf.02269856 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 27 15:27 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 27 15:27 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 27 15:40:26 onl7v1 login: ROOT LOGIN /dev/console Last login: Wed May 27 15:37:02 on pts/0 Sun Microsystems Inc. SunOS 5.5.1 Generic May 1996 Starting OpenWindows in 5 seconds (type Control-C to interrupt) ^C# /usr/sbin/shutdown -i0 -g0 Shutdown started. Wed May 27 15:40:41 JST 1998 Do you want to continue? (y or n): y Broadcast Message from root (console) on onl7v1 Wed May 27 15:40:43... 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 27 15:40:50 onl7v1 syslogd: going down on signal 15 umount: /kekfs busy nfs umount: /kekfs/kek: is busy May 27 15:40:57 cssd: Got sig#15, sending it to all CSes and exit May 27 15:40:57 /usr/sbin/vold[2950]: problem unmounting /vol; Interrupted syste m call nfs umount: /kekfs/kek: is busy umount: /kekfs busy The system is down. syncing file systems... done Program terminated Type help for more information ok ok Power-On Self Test IU Register File Test MMU Context Table Reg Test MMU Context Register Test MMU Sync Fault Stat Reg Test MMU Sync Fault Addr Reg Test D-Cache Tag Ram Test D-Cache Data Ram Test D-TLB CAM Test D-TLB RAM Test I-Cache Tag Ram Test I-Cache Data Ram Test No Secondary Cache Exists No Secondary Cache Exists No Secondary Cache Exists Snoop Ram Test IOMMU-TLB Test IOMMU Control Register Test IOMMU Base Addr Register Test IOMMU SBus Config Registers Test Set RAH to 3 Set WS to 3 DRAM Data Bus Test Probing Bank 0 -- 32 Megs Found Probing Bank 1 -- 32 Megs Found Probing Bank 2 -- 0 Megs Found Probing Bank 3 -- 0 Megs Found Probing Bank 4 -- 0 Megs Found Probing Bank 5 -- 0 Megs Found Probing Bank 6 -- 0 Megs Found Probing Bank 7 -- 0 Megs Found DRAM Address Bus Test Memory Address Pattern Test D-Cache Hit Miss Test D-TLB Hit Miss Test I-TLB Hit Miss Test I-Cache Hit Miss Test No Secondary Cache Exists I-TLB Ram Test FPU Register File Test FPU Misaligned Reg Pair Test FPU Single-precision Tests FPU Double-precision Tests FPU SP Invalid CEXC Test FPU SP Overflow CEXC Test FPU SP Divide-by-0 CEXC Test FPU SP Inexact CEXC Test FPU SP Trap Priority > Test FPU SP Trap Priority < Test FPU DP Invalid CEXC Test FPU DP Overflow CEXC Test FPU DP Divide-by-0 CEXC Test FPU DP Inexact CEXC Test FPU DP Trap Priority > Test FPU DP Trap Priority < Test PROC0 Interrupt Regs Tests Soft Interrupts OFF Test Soft Interrupts ON Test PROC0 User Timer Test PROC0 Counter/Timer Test DMA2 E_CSR Register Test LANCE Address Port Tests LANCE Data Port Tests DMA2 D_CSR Register Test DMA2 D_ADDR Register Test DMA2 D_BCNT Register Test DMA2 D_NADDR Register Test ESP Registers Tests DMA2 P_CSR Register Test DMA2 P_ADDR Register Test DMA2 P_BCNT Register Test PPORT Registers Tests NVRAM Access Test TOD Registers Test 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. Boot device: /iommu/sbus/espdma@5,8400000/esp@5,8800000/sd@3,0 File and args: SunOS Release 5.5.1 Version Generic_103640-12 [UNIX(R) System V Release 4.0] Copyright (c) 1983-1996, 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 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 vmeplus0 at VME0: vme16d16 0x0 and vme24d16 0x0 and vme32d16 0x0 and vme16d32 0x 0 and vme24d32 0x0 and vme32d32 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/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. starting Kana-Kanji converters: cssd. Loading /kernel/strmod/jconv7. Loading /kernel/strmod/jconv8. Loading /kernel/strmod/jconvs. volume management starting. The system is ready. onl7v1 console login: ok. 正常に立ち上がった。 (5). ccドライバのロード ccドライバのロードが正しく実行できることを確認する。 ネットワーク設定をやっておく。 onl7v1 console login: inoue Password: Last login: Wed May 27 11:37:41 from onlsun1 Sun Microsystems Inc. SunOS 5.5.1 Generic May 1996 Starting OpenWindows in 5 seconds (type Control-C to interrupt)^C onl7v1[33]% su Password: May 27 15:58:13 onl7v1 su: 'su root' succeeded for inoue on /dev/console # csh onl7v1# source /.cshrc onl7v1# ifconfig -a lo0: flags=849 mtu 8232 inet 127.0.0.1 netmask ff000000 hme0: flags=863 mtu 1500 inet 130.87.217.113 netmask fffffc00 broadcast 130.87.219.255 ether 0:80:42:b:49:ba le0: flags=863 mtu 1500 inet 130.87.153.92 netmask fffffc00 broadcast 130.87.155.255 ether 0:80:42:b:49:ba onl7v1# netstat -rn Routing Table: Destination Gateway Flags Ref Use Interface -------------------- -------------------- ----- ----- ------ --------- 127.0.0.1 127.0.0.1 UH 0 0 lo0 130.87.216.0 130.87.217.113 U 2 0 hme0 130.87.152.0 130.87.153.92 U 3 3 le0 224.0.0.0 130.87.153.92 U 3 0 le0 default 130.87.152.1 UG 0 3 onl7v1# route delete net 130.87.216.0 130.87.217.113 delete net 130.87.216.0: gateway 130.87.217.113 onl7v1# route add host 130.87.217.112 130.87.217.113 0 add host 130.87.217.112: gateway 130.87.217.113 onl7v1# netstat -rn Routing Table: Destination Gateway Flags Ref Use Interface -------------------- -------------------- ----- ----- ------ --------- 127.0.0.1 127.0.0.1 UH 0 0 lo0 130.87.217.112 130.87.217.113 UH 2 0 hme0 130.87.152.0 130.87.153.92 U 3 3 le0 224.0.0.0 130.87.153.92 U 3 0 le0 default 130.87.152.1 UG 0 3 onl7v1# netstat -r Routing Table: Destination Gateway Flags Ref Use Interface -------------------- -------------------- ----- ----- ------ --------- localhost localhost UH 0 0 lo0 onl5v4fast onl7v1fast UH 2 0 hme0 130.87.152.0 onl7v1 U 3 3 le0 BASE-ADDRESS.MCAST.NET onl7v1 U 3 0 le0 default ICCFG1 UG 0 3 onl7v1# cc スペシャル・ファイルをチェック。 onl7v1# pwd /export/home/onl7v1/inoue/CAMAC/Driver/FORCE-5V-sol2.5 onl7v1# ls -l /dev/cc lrwxrwxrwx 1 root other 3 May 27 15:37 /dev/cc -> :cc onl7v1# ccドライバをロードし直す。 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 27 16:03 /dev/cc -> /devices/iommu@ 0,10000000/sbus@0,10001000/VME@5,ffffe00/cc@2d,ff00:cc onl7v1# ok. 正常に実行できた。 --- (6). 項目タイトル (6-1). サブ項目タイトル (6-1-1). サブサブ項目タイトル