1 $FreeBSD: src/usr.bin/sasc/INSTALL,v 1.2.6.1 2001/03/04 09:04:15 kris Exp $
3 To install the device driver, please do the following steps:
5 1. Install the files by copying them as listed in the following table:
7 asc.c /usr/sys/i386/isa/
8 ascreg.h /usr/sys/i386/isa/
9 asc_ioctl.h /usr/sys/i386/include/
11 Note that if you have copies of the system header directories
12 in /usr/include/ instead of symbolic links, you have to copy
13 `asc.h' to /usr/include/machine/ also. I recommend to replace
14 the copies by links though.
16 [the following steps, 2..5, can be achieved by moving to
17 /sys/i386 and doing "patch < diffs.asc"]
19 2. Make the driver source known to config(8) by editing the file
20 /usr/src/sys/i386/conf/files.i386. Just append the following line:
22 i386/isa/asc.c optional asc device-driver
24 3. Include a driver access record in /usr/src/sys/i386/i386/conf.c
25 Append the following structure at the end of the array that
26 contains the *character* device drivers. Remember the major number
27 that will be used for the driver, i.e. the number following the
28 number af the preceding record.
30 { ascopen, ascclose, ascread, nowrite, /*<major>*/
31 ascioctl, nostop, nullreset, nodevtotty, /* asc */
32 ascselect, nommap, NULL },
34 4. Insert the definitions for the base port addresses of the device
35 into the file /usr/src/sys/i386/isa/isa.h:
37 #define IO_ASC1 0x3EB /* AmiScan addr.grp. 1 */
38 #define IO_ASC2 0x22B /* AmiScan addr.grp. 2 */
39 #define IO_ASC3 0x26B /* AmiScan addr.grp. 3 */
40 #define IO_ASC4 0x2AB /* AmiScan addr.grp. 4 */
41 #define IO_ASC5 0x2EB /* AmiScan addr.grp. 5 */
42 #define IO_ASC6 0x32B /* AmiScan addr.grp. 6 */
43 #define IO_ASC7 0x36B /* AmiScan addr.grp. 7 */
44 #define IO_ASC8 0x3AB /* AmiScan addr.grp. 8 */
46 5. Patch /dev/MAKEDEV by adding the following lines in the switch to
47 create the device entries:
54 chown root.wheel asc0 asc0p
59 6. Edit your kernel configuration file (in /usr/src/sys/i386/conf/)
60 by inserting the following line:
62 device asc0 at isa? port 0x2ab tty drq 3 irq 10
64 This should usually work for you as it reflects the factory
65 settings of the AMI scanner. However, if this conflicts with
66 any other device on your system, you have the option to change
67 `drq 3' into `drq 1' or `drq 5' and the actual port value to
68 "IO_ASC1".. "IO_ASC8" as defined in isa.h
70 7. Rebuild the kernel, don't forget to config(8) and `make depend' first.
72 8. Make the following device nodes:
74 mknod /dev/asc0 c <major> 0
75 mknod /dev/asc0p c <major> 8
77 (or, cd /dev and do ./MAKEDEV asc0).
79 If you plan to modify the and debug the driver, add these (you
80 won't need these though, unless you know how to get this
81 information from elsewhere.
83 mknod /dev/asc0d c <major> 32
84 mknod /dev/asc0pd c <major> 40
86 9. Install the new kernel and reboot. You can try the driver by
87 doing a simple "cat /dev/asc0p > myfile.pbm" and then trying
88 to display the PBM image with xv or some other tool.