1Building and Installing SANE on HP-UX 2------------------------------------- 3 4This file contains some notes on building and installing SANE on 5HP-UX. It tells you which compiler switches to use, how to find out 6to which controller card your scanner is connected, and how to create 7a device file for it. 8 9Building SANE 10------------- 11 12On HP-UX, SANE can be built using either the HP ANSI C compiler or 13GCC. For GCC, no special arguments to configure are necessary. For 14the HP compiler, invoke configure like this: 15 16 CC=cc CFLAGS="-Ae -O" ./configure 17 18Higher optimization levels than -O (equivalent to +O2) may fail 19to compile correctly. 20 21If you're using the HP compiler on 64-bit HP-UX 11, you must build 2264-bit executables: 23 24 CC=cc CFLAGS="-Ae +DA2.0W -O" ./configure 25 26 27 28Some of the make files use GNU extensions, so you have to use gmake 29(GNU make). Gmake binaries are available from the HP-UX Porting and 30Archive Centre <http://hpux.connect.org.uk> and its mirror sites. 31 32Installing SANE 33--------------- 34 35The SCSI pass-through driver (sctl) must be enabled in your kernel, 36but it is by default. 37 38Naturally, the scanner must have a non-conflicting SCSI address and it 39must be connected to the right SCSI bus to work. 40 41You'll probably need to create a device file for your scanner. To do 42this, you'll need to know its SCSI address, and, if your machine has 43multiple SCSI controllers, the number of the one it's connected to. 44As root, you can use ioscan -f to find this information. 45 46For example, here's the partial ioscan output for a C200: 47 48Class I H/W Path Driver S/W State H/W Type Description 49============================================================================== 50[...] 51ext_bus 0 8/0/19/0 c720 CLAIMED INTERFACE Ultra Wide SCSI 52target 0 8/0/19/0.6 tgt CLAIMED DEVICE 53disk 0 8/0/19/0.6.0 sdisk CLAIMED DEVICE IBM DDYS-T09170N 54target 1 8/0/19/0.7 tgt CLAIMED DEVICE 55ctl 0 8/0/19/0.7.0 sctl CLAIMED DEVICE Initiator 56[...] 57ext_bus 1 8/16/5 c720 CLAIMED INTERFACE Built-in SCSI 58target 4 8/16/5.1 tgt CLAIMED DEVICE 59unknown -1 8/16/5.1.0 UNCLAIMED UNKNOWN EPSON Perfection1640 60target 2 8/16/5.2 tgt CLAIMED DEVICE 61disk 1 8/16/5.2.0 sdisk CLAIMED DEVICE TOSHIBA CD-ROM XM-5401TA 62target 3 8/16/5.7 tgt CLAIMED DEVICE 63ctl 1 8/16/5.7.0 sctl CLAIMED DEVICE Initiator 64[...] 65 66You can see that there are two SCSI controllers, Ultra Wide SCSI and 67Built-in SCSI (narrow single-ended). The I column shows the number of 68the controller card. Our scanner, an Epson Perfection 1640, is 69connected to controller 1, and has SCSI address 1 (that's the 1 in the 70H/W Path number). 71 72You can now create the device file using mknod(1M). In this example, 73the command would be: 74 75 mknod /dev/rscsi/c1t1d0 c 203 0x011000 76 77In the filename, c1 specifies controller 1, t1 is target 1 (i.e., the 78SCSI address), d0 (device 0) because it's the only device at that 79address. 203 is the major number of the sctl driver. In the minor 80number (0x011000), 01 again means controller 1, and the second one 81means SCSI address 1. See scsi_ctl(7) for details. 82 83For ease of use with SANE, I'd recommend to create a link to 84/dev/scanner, e.g., 85 86 ln -s /dev/rscsi/c1t1d0 /dev/scanner 87 88To allow normal users to access the scanner, the best approach is 89probably to create a new group, say, "scanner", and make the scanner 90device file readable and writable for the group, e.g., 91 92 chown bin:scanner /dev/rscsi/c1t1d0 93 chmod g+rw /dev/rscsi/c1t1d0 94 95You would then add all users that are allowed to use the scanner to 96that group. If you haven't already done so, you should do 97 98 ln -s /etc/group /etc/logingroup 99 100so that users are automatically in all groups to which they belong 101(and don't have to use newgrp(1)). 102