Borrow phk's axe and apply the next stage of config(8)'s evolution.
Use Warner Losh's "hint" driver to decode ascii strings to fill the resource table at boot time. config(8) no longer generates an ioconf.c table - ie: the configuration no longer has to be compiled into the kernel. You can reconfigure your isa devices with the likes of this at loader(8) time: set hint.ed.0.port=0x320 userconfig will be rewritten to use this style interface one day and will move to /boot/userconfig.4th or something like that. It is still possible to statically compile in a set of hints into a kernel if you do not wish to use loader(8). See the "hints" directive in GENERIC as an example. All device wiring has been moved out of config(8). There is a set of helper scripts (see i386/conf/gethints.pl, and the same for alpha and pc98) that extract the 'at isa? port foo irq bar' from the old files and produces a hints file. If you install this file as /boot/device.hints (and update /boot/defaults/loader.conf - You can do a build/install in sys/boot) then loader will load it automatically for you. You can also compile in the hints directly with: hints "device.hints" as well. There are a few things that I'm not too happy with yet. Under this scheme, things like LINT would no longer be useful as "documentation" of settings. I have renamed this file to 'NOTES' and stored the example hints strings in it. However... this is not something that config(8) understands, so there is a script that extracts the build-specific data from the documentation file (NOTES) to produce a LINT that can be config'ed and built. A stack of man4 pages will need updating. :-/ Also, since there is no longer a difference between 'device' and 'pseudo-device' I collapsed the two together, and the resulting 'device' takes a 'number of units' for devices that still have it statically allocated. eg: 'device fe 4' will compile the fe driver with NFE set to 4. You can then set hints for 4 units (0 - 3). Also note that 'device fe0' will be interpreted as "zero units of 'fe'" which would be bad, so there is a config warning for this. This is only needed for old drivers that still have static limits on numbers of units. All the statically limited drivers that I could find were marked. Please exercise EXTREME CAUTION when transitioning! Moral support by: phk, msmith, dfr, asmodai, imp, and others
This commit is contained in:
parent
c859e3ccfb
commit
647ef85d48
@ -27,6 +27,8 @@ cpu EV5
|
||||
ident GENERIC
|
||||
maxusers 32
|
||||
|
||||
hints "GENERIC.hints"
|
||||
|
||||
#makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
|
||||
|
||||
# Platforms supported
|
||||
@ -72,8 +74,7 @@ device pci
|
||||
options COMPAT_OLDPCI # PCI compatability shims
|
||||
|
||||
# Floppy drives
|
||||
device fdc0 at isa? port IO_FD1 irq 6 drq 2
|
||||
device fd0 at fdc0 drive 0
|
||||
device fdc
|
||||
|
||||
# ATA and ATAPI devices
|
||||
device ata
|
||||
@ -97,27 +98,26 @@ device cd # CD
|
||||
device pass # Passthrough device (direct SCSI access)
|
||||
|
||||
# atkbdc0 controls both the keyboard and the PS/2 mouse
|
||||
device atkbdc0 at isa? port IO_KBD
|
||||
device atkbd0 at atkbdc? irq 1
|
||||
device psm0 at atkbdc? irq 12
|
||||
device atkbdc 1
|
||||
device atkbd
|
||||
device psm
|
||||
|
||||
device vga0 at isa?
|
||||
device vga
|
||||
|
||||
# splash screen/screen saver
|
||||
pseudo-device splash
|
||||
device splash
|
||||
|
||||
# syscons is the default console driver, resembling an SCO console
|
||||
device sc0 at isa?
|
||||
device sc 1
|
||||
|
||||
# real time clock
|
||||
device mcclock0 at isa? port 0x70
|
||||
device mcclock
|
||||
|
||||
# Serial (COM) ports
|
||||
device sio0 at isa? port IO_COM1 irq 4
|
||||
device sio1 at isa? port IO_COM2 irq 3 flags 0x50
|
||||
device sio
|
||||
|
||||
# Parallel port
|
||||
device ppc0 at isa? irq 7
|
||||
device ppc
|
||||
device ppbus # Parallel port bus (required)
|
||||
device lpt # Printer
|
||||
device plip # TCP/IP over parallel
|
||||
@ -143,19 +143,19 @@ device wb # Winbond W89C840F
|
||||
device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'')
|
||||
|
||||
# Pseudo devices - the number indicates how many units to allocated.
|
||||
pseudo-device loop # Network loopback
|
||||
pseudo-device ether # Ethernet support
|
||||
pseudo-device sl # Kernel SLIP
|
||||
pseudo-device ppp 1 # Kernel PPP
|
||||
pseudo-device tun # Packet tunnel.
|
||||
pseudo-device pty # Pseudo-ttys (telnet etc)
|
||||
pseudo-device md # Memory "disks"
|
||||
pseudo-device gif 4 # IPv6 and IPv4 tunneling
|
||||
pseudo-device faith 1 # IPv6-to-IPv4 relaying/(translation)
|
||||
device loop # Network loopback
|
||||
device ether # Ethernet support
|
||||
device sl # Kernel SLIP
|
||||
device ppp 1 # Kernel PPP
|
||||
device tun # Packet tunnel.
|
||||
device pty # Pseudo-ttys (telnet etc)
|
||||
device md # Memory "disks"
|
||||
device gif 4 # IPv6 and IPv4 tunneling
|
||||
device faith 1 # IPv6-to-IPv4 relaying/(translation)
|
||||
|
||||
# The `bpf' pseudo-device enables the Berkeley Packet Filter.
|
||||
# The `bpf' device enables the Berkeley Packet Filter.
|
||||
# Be aware of the administrative consequences of enabling this!
|
||||
pseudo-device bpf #Berkeley packet filter
|
||||
device bpf #Berkeley packet filter
|
||||
|
||||
# USB support
|
||||
device uhci # UHCI PCI->USB interface
|
||||
|
26
sys/alpha/conf/GENERIC.hints
Normal file
26
sys/alpha/conf/GENERIC.hints
Normal file
@ -0,0 +1,26 @@
|
||||
# $FreeBSD$
|
||||
hint.fdc.0.at="isa"
|
||||
hint.fdc.0.port="0x3F0"
|
||||
hint.fdc.0.irq="6"
|
||||
hint.fdc.0.drq="2"
|
||||
hint.fd.0.at="fdc0"
|
||||
hint.fd.0.drive="0"
|
||||
hint.atkbdc.0.at="isa"
|
||||
hint.atkbdc.0.port="0x060"
|
||||
hint.atkbd.0.at="atkbdc"
|
||||
hint.atkbd.0.irq="1"
|
||||
hint.psm.0.at="atkbdc"
|
||||
hint.psm.0.irq="12"
|
||||
hint.vga.0.at="isa"
|
||||
hint.sc.0.at="isa"
|
||||
hint.mcclock.0.at="isa"
|
||||
hint.mcclock.0.port="0x70"
|
||||
hint.sio.0.at="isa"
|
||||
hint.sio.0.port="0x3F8"
|
||||
hint.sio.0.irq="4"
|
||||
hint.sio.1.at="isa"
|
||||
hint.sio.1.port="0x2F8"
|
||||
hint.sio.1.irq="3"
|
||||
hint.sio.1.flags="0x50"
|
||||
hint.ppc.0.at="isa"
|
||||
hint.ppc.0.irq="7"
|
@ -27,6 +27,8 @@ cpu EV5
|
||||
ident GENERIC
|
||||
maxusers 32
|
||||
|
||||
hints "GENERIC.hints"
|
||||
|
||||
#makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
|
||||
|
||||
# Platforms supported
|
||||
@ -72,8 +74,7 @@ device pci
|
||||
options COMPAT_OLDPCI # PCI compatability shims
|
||||
|
||||
# Floppy drives
|
||||
device fdc0 at isa? port IO_FD1 irq 6 drq 2
|
||||
device fd0 at fdc0 drive 0
|
||||
device fdc
|
||||
|
||||
# ATA and ATAPI devices
|
||||
device ata
|
||||
@ -97,27 +98,26 @@ device cd # CD
|
||||
device pass # Passthrough device (direct SCSI access)
|
||||
|
||||
# atkbdc0 controls both the keyboard and the PS/2 mouse
|
||||
device atkbdc0 at isa? port IO_KBD
|
||||
device atkbd0 at atkbdc? irq 1
|
||||
device psm0 at atkbdc? irq 12
|
||||
device atkbdc 1
|
||||
device atkbd
|
||||
device psm
|
||||
|
||||
device vga0 at isa?
|
||||
device vga
|
||||
|
||||
# splash screen/screen saver
|
||||
pseudo-device splash
|
||||
device splash
|
||||
|
||||
# syscons is the default console driver, resembling an SCO console
|
||||
device sc0 at isa?
|
||||
device sc 1
|
||||
|
||||
# real time clock
|
||||
device mcclock0 at isa? port 0x70
|
||||
device mcclock
|
||||
|
||||
# Serial (COM) ports
|
||||
device sio0 at isa? port IO_COM1 irq 4
|
||||
device sio1 at isa? port IO_COM2 irq 3 flags 0x50
|
||||
device sio
|
||||
|
||||
# Parallel port
|
||||
device ppc0 at isa? irq 7
|
||||
device ppc
|
||||
device ppbus # Parallel port bus (required)
|
||||
device lpt # Printer
|
||||
device plip # TCP/IP over parallel
|
||||
@ -143,19 +143,19 @@ device wb # Winbond W89C840F
|
||||
device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'')
|
||||
|
||||
# Pseudo devices - the number indicates how many units to allocated.
|
||||
pseudo-device loop # Network loopback
|
||||
pseudo-device ether # Ethernet support
|
||||
pseudo-device sl # Kernel SLIP
|
||||
pseudo-device ppp 1 # Kernel PPP
|
||||
pseudo-device tun # Packet tunnel.
|
||||
pseudo-device pty # Pseudo-ttys (telnet etc)
|
||||
pseudo-device md # Memory "disks"
|
||||
pseudo-device gif 4 # IPv6 and IPv4 tunneling
|
||||
pseudo-device faith 1 # IPv6-to-IPv4 relaying/(translation)
|
||||
device loop # Network loopback
|
||||
device ether # Ethernet support
|
||||
device sl # Kernel SLIP
|
||||
device ppp 1 # Kernel PPP
|
||||
device tun # Packet tunnel.
|
||||
device pty # Pseudo-ttys (telnet etc)
|
||||
device md # Memory "disks"
|
||||
device gif 4 # IPv6 and IPv4 tunneling
|
||||
device faith 1 # IPv6-to-IPv4 relaying/(translation)
|
||||
|
||||
# The `bpf' pseudo-device enables the Berkeley Packet Filter.
|
||||
# The `bpf' device enables the Berkeley Packet Filter.
|
||||
# Be aware of the administrative consequences of enabling this!
|
||||
pseudo-device bpf #Berkeley packet filter
|
||||
device bpf #Berkeley packet filter
|
||||
|
||||
# USB support
|
||||
device uhci # UHCI PCI->USB interface
|
||||
|
@ -55,13 +55,13 @@ device cd
|
||||
# revision 1.20 of this file.
|
||||
#device de
|
||||
|
||||
pseudo-device loop
|
||||
pseudo-device ether
|
||||
pseudo-device sl
|
||||
pseudo-device ppp 1
|
||||
pseudo-device tun
|
||||
pseudo-device pty
|
||||
pseudo-device gzip # Exec gzipped a.out's
|
||||
device loop
|
||||
device ether
|
||||
device sl
|
||||
device ppp 1
|
||||
device tun
|
||||
device pty
|
||||
device gzip # Exec gzipped a.out's
|
||||
|
||||
# KTRACE enables the system-call tracing facility ktrace(2).
|
||||
# This adds 4 KB bloat to your kernel, and slightly increases
|
||||
|
94
sys/alpha/conf/gethints.pl
Normal file
94
sys/alpha/conf/gethints.pl
Normal file
@ -0,0 +1,94 @@
|
||||
#! /usr/bin/perl
|
||||
#
|
||||
# This is a transition aid. It extracts old-style configuration information
|
||||
# from a config file and writes an equivalent device.hints file to stdout.
|
||||
# You can use that with loader(8) or statically compile it in with the
|
||||
# 'hints' directive. See how GENERIC and GENERIC.hints fit together for
|
||||
# a static example. You should use loader(8) if at all possible.
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
while (<STDIN>) {
|
||||
chop;
|
||||
s/#.*//;
|
||||
next unless /^device/;
|
||||
($dev, $nameunit, $at, $where, @rest) = split;
|
||||
next unless $at eq "at" && $where ne "";
|
||||
$name = $nameunit;
|
||||
$name =~ s/[0-9]*$//g;
|
||||
$unit = $nameunit;
|
||||
$unit =~ s/.*[^0-9]//g;
|
||||
$where =~ s/\?$//;
|
||||
print "hint.$name.$unit.at=\"$where\"\n";
|
||||
while ($key = shift(@rest)) {
|
||||
if ($key eq "disable") {
|
||||
print "hint.$name.$unit.disabled=\"1\"\n";
|
||||
next;
|
||||
}
|
||||
if ($key eq "port") {
|
||||
$val = shift(@rest);
|
||||
$val =~ s/IO_AHA0/0x330/;
|
||||
$val =~ s/IO_AHA1/0x334/;
|
||||
$val =~ s/IO_ASC1/0x3EB/;
|
||||
$val =~ s/IO_ASC2/0x22B/;
|
||||
$val =~ s/IO_ASC3/0x26B/;
|
||||
$val =~ s/IO_ASC4/0x2AB/;
|
||||
$val =~ s/IO_ASC5/0x2EB/;
|
||||
$val =~ s/IO_ASC6/0x32B/;
|
||||
$val =~ s/IO_ASC7/0x36B/;
|
||||
$val =~ s/IO_ASC8/0x3AB/;
|
||||
$val =~ s/IO_BT0/0x330/;
|
||||
$val =~ s/IO_BT1/0x334/;
|
||||
$val =~ s/IO_CGA/0x3D0/;
|
||||
$val =~ s/IO_COM1/0x3F8/;
|
||||
$val =~ s/IO_COM2/0x2F8/;
|
||||
$val =~ s/IO_COM3/0x3E8/;
|
||||
$val =~ s/IO_COM4/0x2E8/;
|
||||
$val =~ s/IO_DMA1/0x000/;
|
||||
$val =~ s/IO_DMA2/0x0C0/;
|
||||
$val =~ s/IO_DMAPG/0x080/;
|
||||
$val =~ s/IO_FD1/0x3F0/;
|
||||
$val =~ s/IO_FD2/0x370/;
|
||||
$val =~ s/IO_GAME/0x201/;
|
||||
$val =~ s/IO_GSC1/0x270/;
|
||||
$val =~ s/IO_GSC2/0x2E0/;
|
||||
$val =~ s/IO_GSC3/0x370/;
|
||||
$val =~ s/IO_GSC4/0x3E0/;
|
||||
$val =~ s/IO_ICU1/0x020/;
|
||||
$val =~ s/IO_ICU2/0x0A0/;
|
||||
$val =~ s/IO_KBD/0x060/;
|
||||
$val =~ s/IO_LPT1/0x378/;
|
||||
$val =~ s/IO_LPT2/0x278/;
|
||||
$val =~ s/IO_LPT3/0x3BC/;
|
||||
$val =~ s/IO_MDA/0x3B0/;
|
||||
$val =~ s/IO_NMI/0x070/;
|
||||
$val =~ s/IO_NPX/0x0F0/;
|
||||
$val =~ s/IO_PMP1/0x026/;
|
||||
$val =~ s/IO_PMP2/0x178/;
|
||||
$val =~ s/IO_PPI/0x061/;
|
||||
$val =~ s/IO_RTC/0x070/;
|
||||
$val =~ s/IO_TIMER1/0x040/;
|
||||
$val =~ s/IO_TIMER2/0x048/;
|
||||
$val =~ s/IO_UHA0/0x330/;
|
||||
$val =~ s/IO_VGA/0x3C0/;
|
||||
$val =~ s/IO_WD1/0x1F0/;
|
||||
$val =~ s/IO_WD2/0x170/;
|
||||
if ($val ne "?") {
|
||||
print "hint.$name.$unit.port=\"$val\"\n";
|
||||
}
|
||||
next;
|
||||
}
|
||||
if ($key eq "irq" || $key eq "drq" || $key eq "drive" ||
|
||||
$key eq "iomem" || $key eq "iosiz" || $key eq "flags"||
|
||||
$key eq "bus" || $key eq "target" || $key eq "unit") {
|
||||
$key =~ s/iomem/maddr/;
|
||||
$key =~ s/iosiz/msize/;
|
||||
$val = shift(@rest);
|
||||
if ($val ne "?") {
|
||||
print "hint.$name.$unit.$key=\"$val\"\n";
|
||||
}
|
||||
next;
|
||||
}
|
||||
print "unrecognized config token $key\n";
|
||||
}
|
||||
}
|
@ -25,6 +25,8 @@ cpu I686_CPU
|
||||
ident GENERIC
|
||||
maxusers 32
|
||||
|
||||
hints "GENERIC.hints" #Default places to look for devices.
|
||||
|
||||
#makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
|
||||
|
||||
options MATH_EMULATE #Support for x87 emulation
|
||||
@ -65,17 +67,13 @@ options KBD_INSTALL_CDEV # install a CDEV entry in /dev
|
||||
device isa
|
||||
device eisa
|
||||
device pci
|
||||
options COMPAT_OLDISA # Old ISA driver shims
|
||||
options COMPAT_OLDPCI # Old PCI driver shims
|
||||
options COMPAT_OLDISA # compatability shims for lnc, fe, le
|
||||
options COMPAT_OLDPCI # compatability shims for lnc, vx
|
||||
|
||||
# Floppy drives
|
||||
device fdc0 at isa? port IO_FD1 irq 6 drq 2
|
||||
device fd0 at fdc0 drive 0
|
||||
device fd1 at fdc0 drive 1
|
||||
device fdc
|
||||
|
||||
# ATA and ATAPI devices
|
||||
device ata0 at isa? port IO_WD1 irq 14
|
||||
device ata1 at isa? port IO_WD2 irq 15
|
||||
device ata
|
||||
device atadisk # ATA disk drives
|
||||
device atapicd # ATAPI CDROM drives
|
||||
@ -93,11 +91,11 @@ device isp # Qlogic family
|
||||
device ncr # NCR/Symbios Logic
|
||||
device sym # NCR/Symbios Logic (newer chipsets)
|
||||
|
||||
device adv0 at isa?
|
||||
device adv
|
||||
device adw
|
||||
device bt0 at isa?
|
||||
device aha0 at isa?
|
||||
device aic0 at isa?
|
||||
device bt
|
||||
device aha 1
|
||||
device aic
|
||||
|
||||
# SCSI peripherals
|
||||
device scbus # SCSI bus (required)
|
||||
@ -112,44 +110,40 @@ device amr # AMI MegaRAID
|
||||
device mlx # Mylex DAC960 family
|
||||
|
||||
# atkbdc0 controls both the keyboard and the PS/2 mouse
|
||||
device atkbdc0 at isa? port IO_KBD
|
||||
device atkbd0 at atkbdc? irq 1 flags 0x1
|
||||
device psm0 at atkbdc? irq 12
|
||||
device atkbdc 1
|
||||
device atkbd
|
||||
device psm
|
||||
|
||||
device vga0 at isa?
|
||||
device vga
|
||||
|
||||
# splash screen/screen saver
|
||||
pseudo-device splash
|
||||
device splash
|
||||
|
||||
# syscons is the default console driver, resembling an SCO console
|
||||
device sc0 at isa? flags 0x100
|
||||
device sc 1
|
||||
|
||||
# Enable this for the pcvt (VT220 compatible) console driver
|
||||
#device vt0 at isa?
|
||||
#device vt
|
||||
#options XSERVER # support for X server on a vt console
|
||||
#options FAT_CURSOR # start with block cursor
|
||||
# If you have a ThinkPAD, uncomment this along with the rest of the PCVT lines
|
||||
#options PCVT_SCANSET=2 # IBM keyboards are non-std
|
||||
|
||||
# Floating point support - do not disable.
|
||||
device npx0 at nexus? port IO_NPX irq 13
|
||||
device npx
|
||||
|
||||
# Power management support (see LINT for more options)
|
||||
device apm0 at nexus? disable flags 0x20 # Advanced Power Management
|
||||
device apm
|
||||
|
||||
# PCCARD (PCMCIA) support
|
||||
device card
|
||||
device pcic0 at isa? irq 10 port 0x3e0 iomem 0xd0000
|
||||
device pcic1 at isa? irq 11 port 0x3e2 iomem 0xd4000 disable
|
||||
device pcic
|
||||
|
||||
# Serial (COM) ports
|
||||
device sio0 at isa? port IO_COM1 flags 0x10 irq 4
|
||||
device sio1 at isa? port IO_COM2 irq 3
|
||||
device sio2 at isa? disable port IO_COM3 irq 5
|
||||
device sio3 at isa? disable port IO_COM4 irq 9
|
||||
device sio
|
||||
|
||||
# Parallel port
|
||||
device ppc0 at isa? irq 7
|
||||
device ppc
|
||||
device ppbus # Parallel port bus (required)
|
||||
device lpt # Printer
|
||||
device plip # TCP/IP over parallel
|
||||
@ -177,11 +171,11 @@ device wb # Winbond W89C840F
|
||||
device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'')
|
||||
|
||||
# ISA Ethernet NICs.
|
||||
device ed0 at isa? port 0x280 irq 10 iomem 0xd8000
|
||||
device ed
|
||||
device ex
|
||||
device ep
|
||||
device cs0 at isa? port 0x300
|
||||
device sn0 at isa? port 0x300 irq 10
|
||||
device cs
|
||||
device sn
|
||||
# WaveLAN/IEEE 802.11 wireless NICs. Note: the WaveLAN/IEEE really
|
||||
# exists only as a PCMCIA device, so there is no ISA attatement needed
|
||||
# and resources will always be dynamically assigned by the pccard code.
|
||||
@ -197,25 +191,25 @@ device awi
|
||||
# Xircom pccard ethernet
|
||||
device xe
|
||||
# The probe order of these is presently determined by i386/isa/isa_compat.c.
|
||||
device ie0 at isa? port 0x300 irq 10 iomem 0xd0000
|
||||
device fe0 at isa? port 0x300
|
||||
device le0 at isa? port 0x300 irq 5 iomem 0xd0000
|
||||
device lnc0 at isa? port 0x280 irq 10 drq 0
|
||||
device ie
|
||||
device fe
|
||||
device le
|
||||
device lnc
|
||||
|
||||
# Pseudo devices - the number indicates how many units to allocated.
|
||||
pseudo-device loop # Network loopback
|
||||
pseudo-device ether # Ethernet support
|
||||
pseudo-device sl # Kernel SLIP
|
||||
pseudo-device ppp 1 # Kernel PPP
|
||||
pseudo-device tun # Packet tunnel.
|
||||
pseudo-device pty # Pseudo-ttys (telnet etc)
|
||||
pseudo-device md # Memory "disks"
|
||||
pseudo-device gif 4 # IPv6 and IPv4 tunneling
|
||||
pseudo-device faith 1 # IPv6-to-IPv4 relaying (translation)
|
||||
device loop # Network loopback
|
||||
device ether # Ethernet support
|
||||
device sl # Kernel SLIP
|
||||
device ppp 1 # Kernel PPP
|
||||
device tun # Packet tunnel.
|
||||
device pty # Pseudo-ttys (telnet etc)
|
||||
device md # Memory "disks"
|
||||
device gif 4 # IPv6 and IPv4 tunneling
|
||||
device faith 1 # IPv6-to-IPv4 relaying (translation)
|
||||
|
||||
# The `bpf' pseudo-device enables the Berkeley Packet Filter.
|
||||
# The `bpf' device enables the Berkeley Packet Filter.
|
||||
# Be aware of the administrative consequences of enabling this!
|
||||
pseudo-device bpf # Berkeley packet filter
|
||||
device bpf # Berkeley packet filter
|
||||
|
||||
# USB support
|
||||
device uhci # UHCI PCI->USB interface
|
||||
|
85
sys/amd64/conf/GENERIC.hints
Normal file
85
sys/amd64/conf/GENERIC.hints
Normal file
@ -0,0 +1,85 @@
|
||||
# $FreeBSD$
|
||||
hint.fdc.0.at="isa"
|
||||
hint.fdc.0.port="0x3F0"
|
||||
hint.fdc.0.irq="6"
|
||||
hint.fdc.0.drq="2"
|
||||
hint.fd.0.at="fdc0"
|
||||
hint.fd.0.drive="0"
|
||||
hint.fd.1.at="fdc0"
|
||||
hint.fd.1.drive="1"
|
||||
hint.ata.0.at="isa"
|
||||
hint.ata.0.port="0x1F0"
|
||||
hint.ata.0.irq="14"
|
||||
hint.ata.1.at="isa"
|
||||
hint.ata.1.port="0x170"
|
||||
hint.ata.1.irq="15"
|
||||
hint.adv.0.at="isa"
|
||||
hint.bt.0.at="isa"
|
||||
hint.aha.0.at="isa"
|
||||
hint.aic.0.at="isa"
|
||||
hint.atkbdc.0.at="isa"
|
||||
hint.atkbdc.0.port="0x060"
|
||||
hint.atkbd.0.at="atkbdc"
|
||||
hint.atkbd.0.irq="1"
|
||||
hint.atkbd.0.flags="0x1"
|
||||
hint.psm.0.at="atkbdc"
|
||||
hint.psm.0.irq="12"
|
||||
hint.vga.0.at="isa"
|
||||
hint.sc.0.at="isa"
|
||||
hint.sc.0.flags="0x100"
|
||||
hint.vt.0.at="isa"
|
||||
hint.npx.0.at="nexus"
|
||||
hint.npx.0.port="0x0F0"
|
||||
hint.npx.0.irq="13"
|
||||
hint.apm.0.at="nexus"
|
||||
hint.apm.0.disabled="1"
|
||||
hint.apm.0.flags="0x20"
|
||||
hint.pcic.0.at="isa"
|
||||
hint.pcic.0.irq="10"
|
||||
hint.pcic.0.port="0x3e0"
|
||||
hint.pcic.0.iomem="0xd0000"
|
||||
hint.pcic.1.at="isa"
|
||||
hint.pcic.1.irq="11"
|
||||
hint.pcic.1.port="0x3e2"
|
||||
hint.pcic.1.iomem="0xd4000"
|
||||
hint.pcic.1.disabled="1"
|
||||
hint.sio.0.at="isa"
|
||||
hint.sio.0.port="0x3F8"
|
||||
hint.sio.0.flags="0x10"
|
||||
hint.sio.0.irq="4"
|
||||
hint.sio.1.at="isa"
|
||||
hint.sio.1.port="0x2F8"
|
||||
hint.sio.1.irq="3"
|
||||
hint.sio.2.at="isa"
|
||||
hint.sio.2.disabled="1"
|
||||
hint.sio.2.port="0x3E8"
|
||||
hint.sio.2.irq="5"
|
||||
hint.sio.3.at="isa"
|
||||
hint.sio.3.disabled="1"
|
||||
hint.sio.3.port="0x2E8"
|
||||
hint.sio.3.irq="9"
|
||||
hint.ppc.0.at="isa"
|
||||
hint.ppc.0.irq="7"
|
||||
hint.ed.0.at="isa"
|
||||
hint.ed.0.port="0x280"
|
||||
hint.ed.0.irq="10"
|
||||
hint.ed.0.iomem="0xd8000"
|
||||
hint.cs.0.at="isa"
|
||||
hint.cs.0.port="0x300"
|
||||
hint.sn.0.at="isa"
|
||||
hint.sn.0.port="0x300"
|
||||
hint.sn.0.irq="10"
|
||||
hint.ie.0.at="isa"
|
||||
hint.ie.0.port="0x300"
|
||||
hint.ie.0.irq="10"
|
||||
hint.ie.0.iomem="0xd0000"
|
||||
hint.fe.0.at="isa"
|
||||
hint.fe.0.port="0x300"
|
||||
hint.le.0.at="isa"
|
||||
hint.le.0.port="0x300"
|
||||
hint.le.0.irq="5"
|
||||
hint.le.0.iomem="0xd0000"
|
||||
hint.lnc.0.at="isa"
|
||||
hint.lnc.0.port="0x280"
|
||||
hint.lnc.0.irq="10"
|
||||
hint.lnc.0.drq="0"
|
7
sys/amd64/conf/Makefile
Normal file
7
sys/amd64/conf/Makefile
Normal file
@ -0,0 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
all:
|
||||
@echo "make LINT only"
|
||||
|
||||
LINT: NOTES makeLINT.pl
|
||||
perl5 makeLINT.pl < NOTES > LINT
|
@ -21,7 +21,7 @@ userconfig_script_load="NO"
|
||||
userconfig_script_name="/boot/kernel.conf"
|
||||
userconfig_script_type="userconfig_script"
|
||||
|
||||
loader_conf_files="/boot/loader.conf /boot/loader.conf.local"
|
||||
loader_conf_files="/boot/device.hints /boot/loader.conf /boot/loader.conf.local"
|
||||
|
||||
verbose_loading="NO" # Set to YES for verbose loader output
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
#
|
||||
|
||||
# Which version of config(8) is required.
|
||||
%VERSREQ= 500001
|
||||
%VERSREQ= 500002
|
||||
|
||||
# Can be overridden by makeoptions or /etc/make.conf
|
||||
KERNEL?= kernel
|
||||
@ -81,10 +81,10 @@ GEN_CFILES= $S/$M/$M/genassym.c
|
||||
# omitted from SYSTEM_CFILES. They include setdefs.h, a header which
|
||||
# is generated from all of ${OBJS}. We don't want to have to compile
|
||||
# everything just to do a make depend.
|
||||
SYSTEM_CFILES= ioconf.c param.c vnode_if.c config.c
|
||||
SYSTEM_CFILES= param.c vnode_if.c hints.c config.c
|
||||
SYSTEM_SFILES= $S/$M/$M/locore.s
|
||||
SYSTEM_DEP= Makefile ${SYSTEM_OBJS}
|
||||
SYSTEM_OBJS= locore.o setdef0.o vnode_if.o ${OBJS} ioconf.o param.o config.o \
|
||||
SYSTEM_OBJS= locore.o setdef0.o vnode_if.o ${OBJS} param.o hints.o config.o \
|
||||
setdef1.o hack.So
|
||||
SYSTEM_LD= @${LD} ${FMT} -Bdynamic -T $S/conf/ldscript.$M \
|
||||
-e locorestart \
|
||||
@ -149,7 +149,7 @@ kernel-clean:
|
||||
|
||||
#lint: /tmp param.c
|
||||
# @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} \
|
||||
# $S/$M/$M/Locore.c ${CFILES} ioconf.c param.c | \
|
||||
# $S/$M/$M/Locore.c ${CFILES} param.c | \
|
||||
# grep -v 'struct/union .* never defined' | \
|
||||
# grep -v 'possible pointer alignment problem'
|
||||
|
||||
@ -314,9 +314,6 @@ modules-reinstall modules-reinstall.debug:
|
||||
config.o:
|
||||
${NORMAL_C}
|
||||
|
||||
ioconf.o:
|
||||
${NORMAL_C}
|
||||
|
||||
param.c: $S/conf/param.c
|
||||
-rm -f param.c
|
||||
cp $S/conf/param.c .
|
||||
@ -332,6 +329,9 @@ vers.c: $S/conf/newvers.sh $S/sys/param.h ${SYSTEM_DEP}
|
||||
vers.o:
|
||||
${NORMAL_C}
|
||||
|
||||
hints.o: hints.c
|
||||
${NORMAL_C}
|
||||
|
||||
vnode_if.c: $S/kern/vnode_if.pl $S/kern/vnode_if.src
|
||||
perl5 $S/kern/vnode_if.pl -c $S/kern/vnode_if.src
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
#
|
||||
|
||||
# Which version of config(8) is required.
|
||||
%VERSREQ= 500001
|
||||
%VERSREQ= 500002
|
||||
|
||||
# Can be overridden by makeoptions or /etc/make.conf
|
||||
KERNEL?= kernel
|
||||
@ -81,10 +81,10 @@ GEN_CFILES= $S/$M/$M/genassym.c
|
||||
# omitted from SYSTEM_CFILES. They include setdefs.h, a header which
|
||||
# is generated from all of ${OBJS}. We don't want to have to compile
|
||||
# everything just to do a make depend.
|
||||
SYSTEM_CFILES= ioconf.c param.c vnode_if.c config.c
|
||||
SYSTEM_CFILES= param.c vnode_if.c hints.c config.c
|
||||
SYSTEM_SFILES= $S/$M/$M/locore.s
|
||||
SYSTEM_DEP= Makefile ${SYSTEM_OBJS}
|
||||
SYSTEM_OBJS= locore.o setdef0.o vnode_if.o ${OBJS} ioconf.o param.o config.o \
|
||||
SYSTEM_OBJS= locore.o setdef0.o vnode_if.o ${OBJS} param.o hints.o config.o \
|
||||
setdef1.o hack.So
|
||||
SYSTEM_LD= @${LD} ${FMT} -Bdynamic -T $S/conf/ldscript.$M \
|
||||
-export-dynamic -dynamic-linker /red/herring \
|
||||
@ -149,7 +149,7 @@ kernel-clean:
|
||||
|
||||
#lint: /tmp param.c
|
||||
# @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} \
|
||||
# $S/$M/$M/Locore.c ${CFILES} ioconf.c param.c | \
|
||||
# $S/$M/$M/Locore.c ${CFILES} param.c | \
|
||||
# grep -v 'struct/union .* never defined' | \
|
||||
# grep -v 'possible pointer alignment problem'
|
||||
|
||||
@ -273,9 +273,6 @@ modules-reinstall modules-reinstall.debug:
|
||||
config.o:
|
||||
${NORMAL_C}
|
||||
|
||||
ioconf.o:
|
||||
${NORMAL_C}
|
||||
|
||||
param.c: $S/conf/param.c
|
||||
-rm -f param.c
|
||||
cp $S/conf/param.c .
|
||||
@ -291,6 +288,9 @@ vers.c: $S/conf/newvers.sh $S/sys/param.h ${SYSTEM_DEP}
|
||||
vers.o:
|
||||
${NORMAL_C}
|
||||
|
||||
hints.o: hints.c
|
||||
${NORMAL_C}
|
||||
|
||||
vnode_if.c: $S/kern/vnode_if.pl $S/kern/vnode_if.src
|
||||
perl5 $S/kern/vnode_if.pl -c $S/kern/vnode_if.src
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
#
|
||||
|
||||
# Which version of config(8) is required.
|
||||
%VERSREQ= 500001
|
||||
%VERSREQ= 500002
|
||||
|
||||
# Can be overridden by makeoptions or /etc/make.conf
|
||||
KERNEL?= kernel
|
||||
@ -83,10 +83,10 @@ GEN_CFILES= $S/$M/$M/genassym.c
|
||||
# omitted from SYSTEM_CFILES. They include setdefs.h, a header which
|
||||
# is generated from all of ${OBJS}. We don't want to have to compile
|
||||
# everything just to do a make depend.
|
||||
SYSTEM_CFILES= ioconf.c param.c vnode_if.c config.c
|
||||
SYSTEM_CFILES= param.c vnode_if.c hints.c config.c
|
||||
SYSTEM_SFILES= $S/$M/$M/locore.s
|
||||
SYSTEM_DEP= Makefile ${SYSTEM_OBJS}
|
||||
SYSTEM_OBJS= locore.o setdef0.o vnode_if.o ${OBJS} ioconf.o param.o config.o \
|
||||
SYSTEM_OBJS= locore.o setdef0.o vnode_if.o ${OBJS} param.o hints.o config.o \
|
||||
setdef1.o hack.So
|
||||
SYSTEM_LD= @${LD} ${FMT} -Bdynamic -T $S/conf/ldscript.$M \
|
||||
-export-dynamic -dynamic-linker /red/herring \
|
||||
@ -151,7 +151,7 @@ kernel-clean:
|
||||
|
||||
#lint: /tmp param.c
|
||||
# @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} \
|
||||
# $S/$M/$M/Locore.c ${CFILES} ioconf.c param.c | \
|
||||
# $S/$M/$M/Locore.c ${CFILES} param.c | \
|
||||
# grep -v 'struct/union .* never defined' | \
|
||||
# grep -v 'possible pointer alignment problem'
|
||||
|
||||
@ -276,9 +276,6 @@ modules-reinstall modules-reinstall.debug:
|
||||
config.o:
|
||||
${NORMAL_C}
|
||||
|
||||
ioconf.o:
|
||||
${NORMAL_C}
|
||||
|
||||
param.c: $S/conf/param.c
|
||||
-rm -f param.c
|
||||
cp $S/conf/param.c .
|
||||
@ -294,6 +291,9 @@ vers.c: $S/conf/newvers.sh $S/sys/param.h ${SYSTEM_DEP}
|
||||
vers.o:
|
||||
${NORMAL_C}
|
||||
|
||||
hints.o: hints.c
|
||||
${NORMAL_C}
|
||||
|
||||
vnode_if.c: $S/kern/vnode_if.pl $S/kern/vnode_if.src
|
||||
perl5 $S/kern/vnode_if.pl -c $S/kern/vnode_if.src
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
#
|
||||
|
||||
# Which version of config(8) is required.
|
||||
%VERSREQ= 500001
|
||||
%VERSREQ= 500002
|
||||
|
||||
# Can be overridden by makeoptions or /etc/make.conf
|
||||
KERNEL?= kernel
|
||||
@ -81,10 +81,10 @@ GEN_CFILES= $S/$M/$M/genassym.c
|
||||
# omitted from SYSTEM_CFILES. They include setdefs.h, a header which
|
||||
# is generated from all of ${OBJS}. We don't want to have to compile
|
||||
# everything just to do a make depend.
|
||||
SYSTEM_CFILES= ioconf.c param.c vnode_if.c config.c
|
||||
SYSTEM_CFILES= param.c vnode_if.c hints.c config.c
|
||||
SYSTEM_SFILES= $S/$M/$M/locore.s
|
||||
SYSTEM_DEP= Makefile ${SYSTEM_OBJS}
|
||||
SYSTEM_OBJS= locore.o setdef0.o vnode_if.o ${OBJS} ioconf.o param.o config.o \
|
||||
SYSTEM_OBJS= locore.o setdef0.o vnode_if.o ${OBJS} param.o hints.o config.o \
|
||||
setdef1.o hack.So
|
||||
SYSTEM_LD= @${LD} ${FMT} -Bdynamic -T $S/conf/ldscript.$M \
|
||||
-export-dynamic -dynamic-linker /red/herring \
|
||||
@ -149,7 +149,7 @@ kernel-clean:
|
||||
|
||||
#lint: /tmp param.c
|
||||
# @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} \
|
||||
# $S/$M/$M/Locore.c ${CFILES} ioconf.c param.c | \
|
||||
# $S/$M/$M/Locore.c ${CFILES} param.c | \
|
||||
# grep -v 'struct/union .* never defined' | \
|
||||
# grep -v 'possible pointer alignment problem'
|
||||
|
||||
@ -273,9 +273,6 @@ modules-reinstall modules-reinstall.debug:
|
||||
config.o:
|
||||
${NORMAL_C}
|
||||
|
||||
ioconf.o:
|
||||
${NORMAL_C}
|
||||
|
||||
param.c: $S/conf/param.c
|
||||
-rm -f param.c
|
||||
cp $S/conf/param.c .
|
||||
@ -291,6 +288,9 @@ vers.c: $S/conf/newvers.sh $S/sys/param.h ${SYSTEM_DEP}
|
||||
vers.o:
|
||||
${NORMAL_C}
|
||||
|
||||
hints.o: hints.c
|
||||
${NORMAL_C}
|
||||
|
||||
vnode_if.c: $S/kern/vnode_if.pl $S/kern/vnode_if.src
|
||||
perl5 $S/kern/vnode_if.pl -c $S/kern/vnode_if.src
|
||||
|
||||
|
671
sys/conf/NOTES
671
sys/conf/NOTES
File diff suppressed because it is too large
Load Diff
@ -174,7 +174,6 @@ dev/syscons/syscons.c optional sc
|
||||
dev/syscons/sysmouse.c optional sc
|
||||
isa/atkbd_isa.c optional atkbd
|
||||
isa/atkbdc_isa.c optional atkbdc
|
||||
isa/fd.c optional fd
|
||||
isa/fd.c optional fdc
|
||||
isa/ppc.c optional ppc
|
||||
isa/psm.c optional psm
|
||||
|
@ -357,7 +357,6 @@ i4b/layer1/i4b_tel_s08.c optional isic
|
||||
i4b/layer1/i4b_usr_sti.c optional isic
|
||||
isa/atkbd_isa.c optional atkbd
|
||||
isa/atkbdc_isa.c optional atkbdc
|
||||
isa/fd.c optional fd
|
||||
isa/fd.c optional fdc
|
||||
isa/ppc.c optional ppc
|
||||
isa/psm.c optional psm
|
||||
|
@ -347,7 +347,6 @@ pc98/i386/userconfig.c optional userconfig
|
||||
pc98/pc98/atapi.c optional wdc
|
||||
pc98/pc98/clock.c standard
|
||||
pc98/pc98/diskslice_machdep.c standard
|
||||
pc98/pc98/fd.c optional fd
|
||||
pc98/pc98/fd.c optional fdc
|
||||
pc98/pc98/if_ed.c optional ed
|
||||
pc98/pc98/isa_dma.c optional isa
|
||||
@ -367,7 +366,6 @@ pc98/pc98/spkr.c optional speaker
|
||||
pc98/pc98/syscons.c optional sc
|
||||
pc98/pc98/syscons_pc98.c optional sc
|
||||
pc98/pc98/wd.c count wdc
|
||||
pc98/pc98/wd.c count wd
|
||||
pc98/pc98/wd_cd.c optional wcd wdc
|
||||
pc98/pc98/wfd.c optional wfd wdc
|
||||
pc98/pc98/wst.c optional wst wdc
|
||||
|
@ -25,6 +25,8 @@ cpu I686_CPU
|
||||
ident GENERIC
|
||||
maxusers 32
|
||||
|
||||
hints "GENERIC.hints" #Default places to look for devices.
|
||||
|
||||
#makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
|
||||
|
||||
options MATH_EMULATE #Support for x87 emulation
|
||||
@ -65,17 +67,13 @@ options KBD_INSTALL_CDEV # install a CDEV entry in /dev
|
||||
device isa
|
||||
device eisa
|
||||
device pci
|
||||
options COMPAT_OLDISA # Old ISA driver shims
|
||||
options COMPAT_OLDPCI # Old PCI driver shims
|
||||
options COMPAT_OLDISA # compatability shims for lnc, fe, le
|
||||
options COMPAT_OLDPCI # compatability shims for lnc, vx
|
||||
|
||||
# Floppy drives
|
||||
device fdc0 at isa? port IO_FD1 irq 6 drq 2
|
||||
device fd0 at fdc0 drive 0
|
||||
device fd1 at fdc0 drive 1
|
||||
device fdc
|
||||
|
||||
# ATA and ATAPI devices
|
||||
device ata0 at isa? port IO_WD1 irq 14
|
||||
device ata1 at isa? port IO_WD2 irq 15
|
||||
device ata
|
||||
device atadisk # ATA disk drives
|
||||
device atapicd # ATAPI CDROM drives
|
||||
@ -93,11 +91,11 @@ device isp # Qlogic family
|
||||
device ncr # NCR/Symbios Logic
|
||||
device sym # NCR/Symbios Logic (newer chipsets)
|
||||
|
||||
device adv0 at isa?
|
||||
device adv
|
||||
device adw
|
||||
device bt0 at isa?
|
||||
device aha0 at isa?
|
||||
device aic0 at isa?
|
||||
device bt
|
||||
device aha 1
|
||||
device aic
|
||||
|
||||
# SCSI peripherals
|
||||
device scbus # SCSI bus (required)
|
||||
@ -112,44 +110,40 @@ device amr # AMI MegaRAID
|
||||
device mlx # Mylex DAC960 family
|
||||
|
||||
# atkbdc0 controls both the keyboard and the PS/2 mouse
|
||||
device atkbdc0 at isa? port IO_KBD
|
||||
device atkbd0 at atkbdc? irq 1 flags 0x1
|
||||
device psm0 at atkbdc? irq 12
|
||||
device atkbdc 1
|
||||
device atkbd
|
||||
device psm
|
||||
|
||||
device vga0 at isa?
|
||||
device vga
|
||||
|
||||
# splash screen/screen saver
|
||||
pseudo-device splash
|
||||
device splash
|
||||
|
||||
# syscons is the default console driver, resembling an SCO console
|
||||
device sc0 at isa? flags 0x100
|
||||
device sc 1
|
||||
|
||||
# Enable this for the pcvt (VT220 compatible) console driver
|
||||
#device vt0 at isa?
|
||||
#device vt
|
||||
#options XSERVER # support for X server on a vt console
|
||||
#options FAT_CURSOR # start with block cursor
|
||||
# If you have a ThinkPAD, uncomment this along with the rest of the PCVT lines
|
||||
#options PCVT_SCANSET=2 # IBM keyboards are non-std
|
||||
|
||||
# Floating point support - do not disable.
|
||||
device npx0 at nexus? port IO_NPX irq 13
|
||||
device npx
|
||||
|
||||
# Power management support (see LINT for more options)
|
||||
device apm0 at nexus? disable flags 0x20 # Advanced Power Management
|
||||
device apm
|
||||
|
||||
# PCCARD (PCMCIA) support
|
||||
device card
|
||||
device pcic0 at isa? irq 10 port 0x3e0 iomem 0xd0000
|
||||
device pcic1 at isa? irq 11 port 0x3e2 iomem 0xd4000 disable
|
||||
device pcic
|
||||
|
||||
# Serial (COM) ports
|
||||
device sio0 at isa? port IO_COM1 flags 0x10 irq 4
|
||||
device sio1 at isa? port IO_COM2 irq 3
|
||||
device sio2 at isa? disable port IO_COM3 irq 5
|
||||
device sio3 at isa? disable port IO_COM4 irq 9
|
||||
device sio
|
||||
|
||||
# Parallel port
|
||||
device ppc0 at isa? irq 7
|
||||
device ppc
|
||||
device ppbus # Parallel port bus (required)
|
||||
device lpt # Printer
|
||||
device plip # TCP/IP over parallel
|
||||
@ -177,11 +171,11 @@ device wb # Winbond W89C840F
|
||||
device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'')
|
||||
|
||||
# ISA Ethernet NICs.
|
||||
device ed0 at isa? port 0x280 irq 10 iomem 0xd8000
|
||||
device ed
|
||||
device ex
|
||||
device ep
|
||||
device cs0 at isa? port 0x300
|
||||
device sn0 at isa? port 0x300 irq 10
|
||||
device cs
|
||||
device sn
|
||||
# WaveLAN/IEEE 802.11 wireless NICs. Note: the WaveLAN/IEEE really
|
||||
# exists only as a PCMCIA device, so there is no ISA attatement needed
|
||||
# and resources will always be dynamically assigned by the pccard code.
|
||||
@ -197,25 +191,25 @@ device awi
|
||||
# Xircom pccard ethernet
|
||||
device xe
|
||||
# The probe order of these is presently determined by i386/isa/isa_compat.c.
|
||||
device ie0 at isa? port 0x300 irq 10 iomem 0xd0000
|
||||
device fe0 at isa? port 0x300
|
||||
device le0 at isa? port 0x300 irq 5 iomem 0xd0000
|
||||
device lnc0 at isa? port 0x280 irq 10 drq 0
|
||||
device ie
|
||||
device fe
|
||||
device le
|
||||
device lnc
|
||||
|
||||
# Pseudo devices - the number indicates how many units to allocated.
|
||||
pseudo-device loop # Network loopback
|
||||
pseudo-device ether # Ethernet support
|
||||
pseudo-device sl # Kernel SLIP
|
||||
pseudo-device ppp 1 # Kernel PPP
|
||||
pseudo-device tun # Packet tunnel.
|
||||
pseudo-device pty # Pseudo-ttys (telnet etc)
|
||||
pseudo-device md # Memory "disks"
|
||||
pseudo-device gif 4 # IPv6 and IPv4 tunneling
|
||||
pseudo-device faith 1 # IPv6-to-IPv4 relaying (translation)
|
||||
device loop # Network loopback
|
||||
device ether # Ethernet support
|
||||
device sl # Kernel SLIP
|
||||
device ppp 1 # Kernel PPP
|
||||
device tun # Packet tunnel.
|
||||
device pty # Pseudo-ttys (telnet etc)
|
||||
device md # Memory "disks"
|
||||
device gif 4 # IPv6 and IPv4 tunneling
|
||||
device faith 1 # IPv6-to-IPv4 relaying (translation)
|
||||
|
||||
# The `bpf' pseudo-device enables the Berkeley Packet Filter.
|
||||
# The `bpf' device enables the Berkeley Packet Filter.
|
||||
# Be aware of the administrative consequences of enabling this!
|
||||
pseudo-device bpf # Berkeley packet filter
|
||||
device bpf # Berkeley packet filter
|
||||
|
||||
# USB support
|
||||
device uhci # UHCI PCI->USB interface
|
||||
|
85
sys/i386/conf/GENERIC.hints
Normal file
85
sys/i386/conf/GENERIC.hints
Normal file
@ -0,0 +1,85 @@
|
||||
# $FreeBSD$
|
||||
hint.fdc.0.at="isa"
|
||||
hint.fdc.0.port="0x3F0"
|
||||
hint.fdc.0.irq="6"
|
||||
hint.fdc.0.drq="2"
|
||||
hint.fd.0.at="fdc0"
|
||||
hint.fd.0.drive="0"
|
||||
hint.fd.1.at="fdc0"
|
||||
hint.fd.1.drive="1"
|
||||
hint.ata.0.at="isa"
|
||||
hint.ata.0.port="0x1F0"
|
||||
hint.ata.0.irq="14"
|
||||
hint.ata.1.at="isa"
|
||||
hint.ata.1.port="0x170"
|
||||
hint.ata.1.irq="15"
|
||||
hint.adv.0.at="isa"
|
||||
hint.bt.0.at="isa"
|
||||
hint.aha.0.at="isa"
|
||||
hint.aic.0.at="isa"
|
||||
hint.atkbdc.0.at="isa"
|
||||
hint.atkbdc.0.port="0x060"
|
||||
hint.atkbd.0.at="atkbdc"
|
||||
hint.atkbd.0.irq="1"
|
||||
hint.atkbd.0.flags="0x1"
|
||||
hint.psm.0.at="atkbdc"
|
||||
hint.psm.0.irq="12"
|
||||
hint.vga.0.at="isa"
|
||||
hint.sc.0.at="isa"
|
||||
hint.sc.0.flags="0x100"
|
||||
hint.vt.0.at="isa"
|
||||
hint.npx.0.at="nexus"
|
||||
hint.npx.0.port="0x0F0"
|
||||
hint.npx.0.irq="13"
|
||||
hint.apm.0.at="nexus"
|
||||
hint.apm.0.disabled="1"
|
||||
hint.apm.0.flags="0x20"
|
||||
hint.pcic.0.at="isa"
|
||||
hint.pcic.0.irq="10"
|
||||
hint.pcic.0.port="0x3e0"
|
||||
hint.pcic.0.iomem="0xd0000"
|
||||
hint.pcic.1.at="isa"
|
||||
hint.pcic.1.irq="11"
|
||||
hint.pcic.1.port="0x3e2"
|
||||
hint.pcic.1.iomem="0xd4000"
|
||||
hint.pcic.1.disabled="1"
|
||||
hint.sio.0.at="isa"
|
||||
hint.sio.0.port="0x3F8"
|
||||
hint.sio.0.flags="0x10"
|
||||
hint.sio.0.irq="4"
|
||||
hint.sio.1.at="isa"
|
||||
hint.sio.1.port="0x2F8"
|
||||
hint.sio.1.irq="3"
|
||||
hint.sio.2.at="isa"
|
||||
hint.sio.2.disabled="1"
|
||||
hint.sio.2.port="0x3E8"
|
||||
hint.sio.2.irq="5"
|
||||
hint.sio.3.at="isa"
|
||||
hint.sio.3.disabled="1"
|
||||
hint.sio.3.port="0x2E8"
|
||||
hint.sio.3.irq="9"
|
||||
hint.ppc.0.at="isa"
|
||||
hint.ppc.0.irq="7"
|
||||
hint.ed.0.at="isa"
|
||||
hint.ed.0.port="0x280"
|
||||
hint.ed.0.irq="10"
|
||||
hint.ed.0.iomem="0xd8000"
|
||||
hint.cs.0.at="isa"
|
||||
hint.cs.0.port="0x300"
|
||||
hint.sn.0.at="isa"
|
||||
hint.sn.0.port="0x300"
|
||||
hint.sn.0.irq="10"
|
||||
hint.ie.0.at="isa"
|
||||
hint.ie.0.port="0x300"
|
||||
hint.ie.0.irq="10"
|
||||
hint.ie.0.iomem="0xd0000"
|
||||
hint.fe.0.at="isa"
|
||||
hint.fe.0.port="0x300"
|
||||
hint.le.0.at="isa"
|
||||
hint.le.0.port="0x300"
|
||||
hint.le.0.irq="5"
|
||||
hint.le.0.iomem="0xd0000"
|
||||
hint.lnc.0.at="isa"
|
||||
hint.lnc.0.port="0x280"
|
||||
hint.lnc.0.irq="10"
|
||||
hint.lnc.0.drq="0"
|
2385
sys/i386/conf/LINT
2385
sys/i386/conf/LINT
File diff suppressed because it is too large
Load Diff
7
sys/i386/conf/Makefile
Normal file
7
sys/i386/conf/Makefile
Normal file
@ -0,0 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
all:
|
||||
@echo "make LINT only"
|
||||
|
||||
LINT: NOTES makeLINT.pl
|
||||
perl5 makeLINT.pl < NOTES > LINT
|
@ -34,6 +34,8 @@ cpu I686_CPU
|
||||
ident NEWCARD
|
||||
maxusers 32
|
||||
|
||||
hints "NEWCARD.hints" #Default places to look for devices.
|
||||
|
||||
#makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
|
||||
|
||||
options MATH_EMULATE #Support for x87 emulation
|
||||
@ -60,6 +62,7 @@ options SYSVMSG #SYSV-style message queues
|
||||
options SYSVSEM #SYSV-style semaphores
|
||||
options P1003_1B #Posix P1003_1B real-time extensions
|
||||
options _KPOSIX_PRIORITY_SCHEDULING
|
||||
options KBD_INSTALL_CDEV # install a CDEV entry in /dev
|
||||
|
||||
# To make an SMP kernel, the next two are needed
|
||||
#options SMP # Symmetric MultiProcessor Kernel
|
||||
@ -75,15 +78,13 @@ device eisa
|
||||
device pci
|
||||
device pccard
|
||||
#device cardbus
|
||||
options COMPAT_OLDISA # Old ISA driver shims
|
||||
options COMPAT_OLDPCI # Old PCI driver shims
|
||||
|
||||
# Floppy drives
|
||||
device fdc0 at isa? port IO_FD1 irq 6 drq 2
|
||||
device fd0 at fdc0 drive 0
|
||||
device fd1 at fdc0 drive 1
|
||||
device fdc
|
||||
|
||||
# ATA and ATAPI devices
|
||||
device ata0 at isa? port IO_WD1 irq 14
|
||||
device ata1 at isa? port IO_WD2 irq 15
|
||||
device ata
|
||||
device atadisk # ATA disk drives
|
||||
device atapicd # ATAPI CDROM drives
|
||||
@ -101,11 +102,11 @@ device isp # Qlogic family
|
||||
#device ncr # NCR/Symbios Logic
|
||||
device sym # NCR/Symbios Logic (newer chipsets)
|
||||
|
||||
#device adv0 at isa?
|
||||
#device adv
|
||||
device adw
|
||||
device bt0 at isa?
|
||||
device aha0 at isa?
|
||||
device aic0 at isa?
|
||||
device bt
|
||||
device aha 1
|
||||
device aic
|
||||
|
||||
# SCSI peripherals
|
||||
device scbus # SCSI bus (required)
|
||||
@ -120,43 +121,40 @@ device amr # AMI MegaRAID
|
||||
device mlx # Mylex DAC960 family
|
||||
|
||||
# atkbdc0 controls both the keyboard and the PS/2 mouse
|
||||
device atkbdc0 at isa? port IO_KBD
|
||||
device atkbd0 at atkbdc? irq 1
|
||||
device psm0 at atkbdc? irq 12
|
||||
device atkbdc 1
|
||||
device atkbd
|
||||
device psm
|
||||
|
||||
device vga0 at isa?
|
||||
device vga
|
||||
|
||||
# splash screen/screen saver
|
||||
pseudo-device splash
|
||||
device splash
|
||||
|
||||
# syscons is the default console driver, resembling an SCO console
|
||||
device sc0 at isa?
|
||||
device sc 1
|
||||
|
||||
# Enable this for the pcvt (VT220 compatible) console driver
|
||||
#device vt0 at isa?
|
||||
#device vt
|
||||
#options XSERVER # support for X server on a vt console
|
||||
#options FAT_CURSOR # start with block cursor
|
||||
# If you have a ThinkPAD, uncomment this along with the rest of the PCVT lines
|
||||
#options PCVT_SCANSET=2 # IBM keyboards are non-std
|
||||
|
||||
# Floating point support - do not disable.
|
||||
device npx0 at nexus? port IO_NPX irq 13
|
||||
device npx
|
||||
|
||||
# Power management support (see LINT for more options)
|
||||
device apm0 at nexus? flags 0x20 # Advanced Power Management
|
||||
device apm
|
||||
|
||||
# PCCARD (PCMCIA) support
|
||||
device pcic0 at isa? irq 10 port 0x3e0 iomem 0xd0000
|
||||
device pcic
|
||||
#device pccbb
|
||||
|
||||
# Serial (COM) ports
|
||||
device sio0 at isa? port IO_COM1 flags 0x10 irq 4
|
||||
device sio1 at isa? port IO_COM2 irq 3
|
||||
device sio2 at isa? disable port IO_COM3 irq 5
|
||||
device sio3 at isa? disable port IO_COM4 irq 9
|
||||
device sio
|
||||
|
||||
# Parallel port
|
||||
device ppc0 at isa? irq 7
|
||||
device ppc
|
||||
device ppbus # Parallel port bus (required)
|
||||
device lpt # Printer
|
||||
device plip # TCP/IP over parallel
|
||||
@ -184,7 +182,7 @@ device wb # Winbond W89C840F
|
||||
device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'')
|
||||
|
||||
# ISA Ethernet NICs.
|
||||
device ed0 at isa? port 0x280 irq 10 iomem 0xd8000
|
||||
device ed
|
||||
device ex
|
||||
device ep
|
||||
# WaveLAN/IEEE 802.11 wireless NICs. Note: the WaveLAN/IEEE really
|
||||
@ -200,29 +198,29 @@ device an
|
||||
# BayStack 660 and others
|
||||
#device awi
|
||||
# The probe order of these is presently determined by i386/isa/isa_compat.c.
|
||||
#device ie0 at isa? port 0x300 irq 10 iomem 0xd0000
|
||||
#device fe0 at isa? port 0x300
|
||||
#device le0 at isa? port 0x300 irq 5 iomem 0xd0000
|
||||
#device lnc0 at isa? port 0x280 irq 10 drq 0
|
||||
#device cs0 at isa? port 0x300
|
||||
device sn0 at isa? port 0x300 irq 10
|
||||
#device ie
|
||||
#device fe
|
||||
#device le
|
||||
#device lnc
|
||||
#device cs
|
||||
device sn
|
||||
# Disabled because it is currently broken.
|
||||
#device xe
|
||||
|
||||
# Pseudo devices - the number indicates how many units to allocated.
|
||||
pseudo-device loop # Network loopback
|
||||
pseudo-device ether # Ethernet support
|
||||
pseudo-device sl # Kernel SLIP
|
||||
pseudo-device ppp 1 # Kernel PPP
|
||||
pseudo-device tun # Packet tunnel.
|
||||
pseudo-device pty # Pseudo-ttys (telnet etc)
|
||||
pseudo-device md # Memory "disks"
|
||||
pseudo-device gif 4 # IPv6 and IPv4 tunneling
|
||||
pseudo-device faith 1 # IPv6-to-IPv4 relaying (translation)
|
||||
device loop # Network loopback
|
||||
device ether # Ethernet support
|
||||
device sl # Kernel SLIP
|
||||
device ppp 1 # Kernel PPP
|
||||
device tun # Packet tunnel.
|
||||
device pty # Pseudo-ttys (telnet etc)
|
||||
device md # Memory "disks"
|
||||
device gif 4 # IPv6 and IPv4 tunneling
|
||||
device faith 1 # IPv6-to-IPv4 relaying (translation)
|
||||
|
||||
# The `bpf' pseudo-device enables the Berkeley Packet Filter.
|
||||
# The `bpf' device enables the Berkeley Packet Filter.
|
||||
# Be aware of the administrative consequences of enabling this!
|
||||
pseudo-device bpf # Berkeley packet filter
|
||||
device bpf # Berkeley packet filter
|
||||
|
||||
# USB support
|
||||
#device uhci # UHCI PCI->USB interface
|
||||
|
79
sys/i386/conf/NEWCARD.hints
Normal file
79
sys/i386/conf/NEWCARD.hints
Normal file
@ -0,0 +1,79 @@
|
||||
# $FreeBSD$
|
||||
hint.fdc.0.at="isa"
|
||||
hint.fdc.0.port="0x3F0"
|
||||
hint.fdc.0.irq="6"
|
||||
hint.fdc.0.drq="2"
|
||||
hint.fd.0.at="fdc0"
|
||||
hint.fd.0.drive="0"
|
||||
hint.fd.1.at="fdc0"
|
||||
hint.fd.1.drive="1"
|
||||
hint.ata.0.at="isa"
|
||||
hint.ata.0.port="0x1F0"
|
||||
hint.ata.0.irq="14"
|
||||
hint.ata.1.at="isa"
|
||||
hint.ata.1.port="0x170"
|
||||
hint.ata.1.irq="15"
|
||||
hint.adv.0.at="isa"
|
||||
hint.bt.0.at="isa"
|
||||
hint.aha.0.at="isa"
|
||||
hint.aic.0.at="isa"
|
||||
hint.atkbdc.0.at="isa"
|
||||
hint.atkbdc.0.port="0x060"
|
||||
hint.atkbd.0.at="atkbdc"
|
||||
hint.atkbd.0.irq="1"
|
||||
hint.atkbd.0.flags="0x1"
|
||||
hint.psm.0.at="atkbdc"
|
||||
hint.psm.0.irq="12"
|
||||
hint.vga.0.at="isa"
|
||||
hint.sc.0.at="isa"
|
||||
hint.sc.0.flags="0x100"
|
||||
hint.vt.0.at="isa"
|
||||
hint.npx.0.at="nexus"
|
||||
hint.npx.0.port="0x0F0"
|
||||
hint.npx.0.irq="13"
|
||||
hint.apm.0.at="nexus"
|
||||
hint.apm.0.flags="0x20"
|
||||
hint.pcic.0.at="isa"
|
||||
hint.pcic.0.irq="10"
|
||||
hint.pcic.0.port="0x3e0"
|
||||
hint.pcic.0.iomem="0xd0000"
|
||||
hint.sio.0.at="isa"
|
||||
hint.sio.0.port="0x3F8"
|
||||
hint.sio.0.flags="0x10"
|
||||
hint.sio.0.irq="4"
|
||||
hint.sio.1.at="isa"
|
||||
hint.sio.1.port="0x2F8"
|
||||
hint.sio.1.irq="3"
|
||||
hint.sio.2.at="isa"
|
||||
hint.sio.2.disabled="1"
|
||||
hint.sio.2.port="0x3E8"
|
||||
hint.sio.2.irq="5"
|
||||
hint.sio.3.at="isa"
|
||||
hint.sio.3.disabled="1"
|
||||
hint.sio.3.port="0x2E8"
|
||||
hint.sio.3.irq="9"
|
||||
hint.ppc.0.at="isa"
|
||||
hint.ppc.0.irq="7"
|
||||
hint.ed.0.at="isa"
|
||||
hint.ed.0.port="0x280"
|
||||
hint.ed.0.irq="10"
|
||||
hint.ed.0.iomem="0xd8000"
|
||||
hint.cs.0.at="isa"
|
||||
hint.cs.0.port="0x300"
|
||||
hint.sn.0.at="isa"
|
||||
hint.sn.0.port="0x300"
|
||||
hint.sn.0.irq="10"
|
||||
hint.ie.0.at="isa"
|
||||
hint.ie.0.port="0x300"
|
||||
hint.ie.0.irq="10"
|
||||
hint.ie.0.iomem="0xd0000"
|
||||
hint.fe.0.at="isa"
|
||||
hint.fe.0.port="0x300"
|
||||
hint.le.0.at="isa"
|
||||
hint.le.0.port="0x300"
|
||||
hint.le.0.irq="5"
|
||||
hint.le.0.iomem="0xd0000"
|
||||
hint.lnc.0.at="isa"
|
||||
hint.lnc.0.port="0x280"
|
||||
hint.lnc.0.irq="10"
|
||||
hint.lnc.0.drq="0"
|
File diff suppressed because it is too large
Load Diff
94
sys/i386/conf/gethints.pl
Normal file
94
sys/i386/conf/gethints.pl
Normal file
@ -0,0 +1,94 @@
|
||||
#! /usr/bin/perl
|
||||
#
|
||||
# This is a transition aid. It extracts old-style configuration information
|
||||
# from a config file and writes an equivalent device.hints file to stdout.
|
||||
# You can use that with loader(8) or statically compile it in with the
|
||||
# 'hints' directive. See how GENERIC and GENERIC.hints fit together for
|
||||
# a static example. You should use loader(8) if at all possible.
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
while (<STDIN>) {
|
||||
chop;
|
||||
s/#.*//;
|
||||
next unless /^device/;
|
||||
($dev, $nameunit, $at, $where, @rest) = split;
|
||||
next unless $at eq "at" && $where ne "";
|
||||
$name = $nameunit;
|
||||
$name =~ s/[0-9]*$//g;
|
||||
$unit = $nameunit;
|
||||
$unit =~ s/.*[^0-9]//g;
|
||||
$where =~ s/\?$//;
|
||||
print "hint.$name.$unit.at=\"$where\"\n";
|
||||
while ($key = shift(@rest)) {
|
||||
if ($key eq "disable") {
|
||||
print "hint.$name.$unit.disabled=\"1\"\n";
|
||||
next;
|
||||
}
|
||||
if ($key eq "port") {
|
||||
$val = shift(@rest);
|
||||
$val =~ s/IO_AHA0/0x330/;
|
||||
$val =~ s/IO_AHA1/0x334/;
|
||||
$val =~ s/IO_ASC1/0x3EB/;
|
||||
$val =~ s/IO_ASC2/0x22B/;
|
||||
$val =~ s/IO_ASC3/0x26B/;
|
||||
$val =~ s/IO_ASC4/0x2AB/;
|
||||
$val =~ s/IO_ASC5/0x2EB/;
|
||||
$val =~ s/IO_ASC6/0x32B/;
|
||||
$val =~ s/IO_ASC7/0x36B/;
|
||||
$val =~ s/IO_ASC8/0x3AB/;
|
||||
$val =~ s/IO_BT0/0x330/;
|
||||
$val =~ s/IO_BT1/0x334/;
|
||||
$val =~ s/IO_CGA/0x3D0/;
|
||||
$val =~ s/IO_COM1/0x3F8/;
|
||||
$val =~ s/IO_COM2/0x2F8/;
|
||||
$val =~ s/IO_COM3/0x3E8/;
|
||||
$val =~ s/IO_COM4/0x2E8/;
|
||||
$val =~ s/IO_DMA1/0x000/;
|
||||
$val =~ s/IO_DMA2/0x0C0/;
|
||||
$val =~ s/IO_DMAPG/0x080/;
|
||||
$val =~ s/IO_FD1/0x3F0/;
|
||||
$val =~ s/IO_FD2/0x370/;
|
||||
$val =~ s/IO_GAME/0x201/;
|
||||
$val =~ s/IO_GSC1/0x270/;
|
||||
$val =~ s/IO_GSC2/0x2E0/;
|
||||
$val =~ s/IO_GSC3/0x370/;
|
||||
$val =~ s/IO_GSC4/0x3E0/;
|
||||
$val =~ s/IO_ICU1/0x020/;
|
||||
$val =~ s/IO_ICU2/0x0A0/;
|
||||
$val =~ s/IO_KBD/0x060/;
|
||||
$val =~ s/IO_LPT1/0x378/;
|
||||
$val =~ s/IO_LPT2/0x278/;
|
||||
$val =~ s/IO_LPT3/0x3BC/;
|
||||
$val =~ s/IO_MDA/0x3B0/;
|
||||
$val =~ s/IO_NMI/0x070/;
|
||||
$val =~ s/IO_NPX/0x0F0/;
|
||||
$val =~ s/IO_PMP1/0x026/;
|
||||
$val =~ s/IO_PMP2/0x178/;
|
||||
$val =~ s/IO_PPI/0x061/;
|
||||
$val =~ s/IO_RTC/0x070/;
|
||||
$val =~ s/IO_TIMER1/0x040/;
|
||||
$val =~ s/IO_TIMER2/0x048/;
|
||||
$val =~ s/IO_UHA0/0x330/;
|
||||
$val =~ s/IO_VGA/0x3C0/;
|
||||
$val =~ s/IO_WD1/0x1F0/;
|
||||
$val =~ s/IO_WD2/0x170/;
|
||||
if ($val ne "?") {
|
||||
print "hint.$name.$unit.port=\"$val\"\n";
|
||||
}
|
||||
next;
|
||||
}
|
||||
if ($key eq "irq" || $key eq "drq" || $key eq "drive" ||
|
||||
$key eq "iomem" || $key eq "iosiz" || $key eq "flags"||
|
||||
$key eq "bus" || $key eq "target" || $key eq "unit") {
|
||||
$key =~ s/iomem/maddr/;
|
||||
$key =~ s/iosiz/msize/;
|
||||
$val = shift(@rest);
|
||||
if ($val ne "?") {
|
||||
print "hint.$name.$unit.$key=\"$val\"\n";
|
||||
}
|
||||
next;
|
||||
}
|
||||
print "unrecognized config token $key\n";
|
||||
}
|
||||
}
|
22
sys/i386/conf/makeLINT.pl
Normal file
22
sys/i386/conf/makeLINT.pl
Normal file
@ -0,0 +1,22 @@
|
||||
#! /usr/bin/perl
|
||||
# $FreeBSD$
|
||||
|
||||
$lno=0;
|
||||
while (<STDIN>) {
|
||||
chop;
|
||||
s/#.*//;
|
||||
s/\f//g;
|
||||
s/^[ \t]+//;
|
||||
$line = $_;
|
||||
$lno++;
|
||||
($key, @rest) = split;
|
||||
next if ($key eq "");
|
||||
next if ($key =~ /^hint\./);
|
||||
if ($key eq "machine" || $key eq "ident" || $key eq "device" ||
|
||||
$key eq "makeoptions" || $key eq "options" ||
|
||||
$key eq "cpu" || $key eq "option" || $key eq "maxusers") {
|
||||
print "$line\n";
|
||||
} else {
|
||||
print STDERR "unrecognized line: line $lno: $line\n";
|
||||
}
|
||||
}
|
@ -22,10 +22,6 @@
|
||||
#undef DEBUG
|
||||
|
||||
#include "cx.h"
|
||||
#include "sppp.h"
|
||||
#if NSPPP <= 0
|
||||
#error The device 'cx' requires sppp.
|
||||
#endif
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -43,9 +43,6 @@
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "i4bisppp.h"
|
||||
#ifdef __FreeBSD__
|
||||
#include "sppp.h"
|
||||
#endif
|
||||
|
||||
#if NI4BISPPP == 0
|
||||
# error "You need to define `pseudo-device sppp <N>' with options ISPPP"
|
||||
|
@ -36,8 +36,6 @@
|
||||
|
||||
#include "tina.h"
|
||||
|
||||
#if NTINA > 0
|
||||
|
||||
#include <sys/param.h>
|
||||
#if defined(__FreeBSD__) && __FreeBSD__ >= 3
|
||||
#include <sys/ioccom.h>
|
||||
@ -339,5 +337,3 @@ writeblock(unsigned short iobase, unsigned char *src,
|
||||
while(len--) /* pc mem -> tina-dd mem */
|
||||
outb((iobase + DATA_LOW_INC), *src++);
|
||||
}
|
||||
|
||||
#endif /* NTINA > 0 */
|
||||
|
@ -1208,12 +1208,9 @@ device_unregister_oids(device_t dev)
|
||||
* Access functions for device resources.
|
||||
*/
|
||||
|
||||
/* Supplied by config(8) in ioconf.c */
|
||||
extern struct config_device config_devtab[];
|
||||
extern int devtab_count;
|
||||
|
||||
/* Runtime version */
|
||||
struct config_device *devtab = config_devtab;
|
||||
static struct config_device *devtab;
|
||||
static int devtab_count = 0;
|
||||
|
||||
static int
|
||||
resource_new_name(const char *name, int unit)
|
||||
@ -1492,68 +1489,106 @@ resource_set_string(const char *name, int unit, const char *resname,
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* We use the identify routine to get the hints for all the other devices.
|
||||
* Strings that are all digits or begin with 0x are integers.
|
||||
*
|
||||
* hint.aha.0.bus_speedup=1
|
||||
* hint.aha.1.irq=10
|
||||
* hint.wl.0.netid=PLUG
|
||||
* hint.wl.1.netid=XYZZY
|
||||
*/
|
||||
static void
|
||||
resource_cfgload(void *dummy __unused)
|
||||
hint_load(char *cp)
|
||||
{
|
||||
struct config_resource *res, *cfgres;
|
||||
int i, j;
|
||||
int error;
|
||||
char *name, *resname;
|
||||
int unit;
|
||||
resource_type type;
|
||||
char *stringval;
|
||||
int config_devtab_count;
|
||||
|
||||
config_devtab_count = devtab_count;
|
||||
devtab = NULL;
|
||||
devtab_count = 0;
|
||||
|
||||
for (i = 0; i < config_devtab_count; i++) {
|
||||
name = config_devtab[i].name;
|
||||
unit = config_devtab[i].unit;
|
||||
|
||||
for (j = 0; j < config_devtab[i].resource_count; j++) {
|
||||
cfgres = config_devtab[i].resources;
|
||||
resname = cfgres[j].name;
|
||||
type = cfgres[j].type;
|
||||
error = resource_create(name, unit, resname, type,
|
||||
&res);
|
||||
if (error) {
|
||||
printf("create resource %s%d: error %d\n",
|
||||
name, unit, error);
|
||||
continue;
|
||||
}
|
||||
if (res->type != type) {
|
||||
printf("type mismatch %s%d: %d != %d\n",
|
||||
name, unit, res->type, type);
|
||||
continue;
|
||||
}
|
||||
switch (type) {
|
||||
case RES_INT:
|
||||
res->u.intval = cfgres[j].u.intval;
|
||||
break;
|
||||
case RES_LONG:
|
||||
res->u.longval = cfgres[j].u.longval;
|
||||
break;
|
||||
case RES_STRING:
|
||||
if (res->u.stringval)
|
||||
free(res->u.stringval, M_TEMP);
|
||||
stringval = cfgres[j].u.stringval;
|
||||
res->u.stringval = malloc(strlen(stringval) + 1,
|
||||
M_TEMP, M_NOWAIT);
|
||||
if (res->u.stringval == NULL)
|
||||
break;
|
||||
strcpy(res->u.stringval, stringval);
|
||||
break;
|
||||
default:
|
||||
panic("unknown resource type %d\n", type);
|
||||
}
|
||||
}
|
||||
char *ep, *op, *walker;
|
||||
int len;
|
||||
int val;
|
||||
char name[20];
|
||||
int unit;
|
||||
char resname[255];
|
||||
|
||||
for (ep = cp; (*ep != '=') && (*ep != 0); ep++)
|
||||
;
|
||||
len = ep - cp;
|
||||
if (*ep == '=')
|
||||
ep++;
|
||||
if (strncmp(cp, "hint.", 5) != 0)
|
||||
return;
|
||||
walker = cp;
|
||||
walker += 5;
|
||||
op = walker;
|
||||
while (*walker && *walker != '.')
|
||||
walker++;
|
||||
if (*walker != '.')
|
||||
return;
|
||||
if (walker - op > sizeof(name))
|
||||
return;
|
||||
strncpy(name, op, walker - op);
|
||||
name[walker - op] = '\0';
|
||||
walker++;
|
||||
op = walker;
|
||||
while (*walker && *walker != '.')
|
||||
walker++;
|
||||
if (*walker != '.')
|
||||
return;
|
||||
unit = strtol(op, &walker, 0);
|
||||
if (*walker != '.')
|
||||
return;
|
||||
walker++;
|
||||
op = walker;
|
||||
while (*walker && *walker != '=')
|
||||
walker++;
|
||||
if (*walker != '=')
|
||||
return;
|
||||
if (walker - op > sizeof(resname))
|
||||
return;
|
||||
strncpy(resname, op, walker - op);
|
||||
resname[walker - op] = '\0';
|
||||
walker++;
|
||||
if (walker != ep)
|
||||
return;
|
||||
if (1 || bootverbose)
|
||||
printf("Setting %s %d %s to ", name, unit, resname);
|
||||
val = strtol(ep, &op, 0);
|
||||
if (*ep != '\0' && *op == '\0') {
|
||||
resource_set_int(name, unit, resname, val);
|
||||
if (1 || bootverbose)
|
||||
printf("%d (int)\n", val);
|
||||
} else {
|
||||
resource_set_string(name, unit, resname, ep);
|
||||
if (1 || bootverbose)
|
||||
printf("%s (string)\n", ep);
|
||||
}
|
||||
}
|
||||
SYSINIT(cfgload, SI_SUB_KMEM, SI_ORDER_ANY + 50, resource_cfgload, 0)
|
||||
|
||||
extern char static_hints[];
|
||||
|
||||
static void
|
||||
hints_load(void *dummy __unused)
|
||||
{
|
||||
char *cp;
|
||||
|
||||
cp = static_hints;
|
||||
while (cp) {
|
||||
hint_load(cp);
|
||||
while (*cp != 0)
|
||||
cp++;
|
||||
cp++;
|
||||
if (*cp == 0)
|
||||
break;
|
||||
}
|
||||
cp = kern_envp;
|
||||
while (cp) {
|
||||
hint_load(cp);
|
||||
while (*cp != 0)
|
||||
cp++;
|
||||
cp++;
|
||||
if (*cp == 0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
SYSINIT(cfghints, SI_SUB_KMEM, SI_ORDER_ANY + 60, hints_load, 0)
|
||||
|
||||
/*======================================*/
|
||||
/*
|
||||
|
@ -25,6 +25,8 @@ cpu I686_CPU
|
||||
ident GENERIC
|
||||
maxusers 32
|
||||
|
||||
hints "GENERIC.hints"
|
||||
|
||||
#makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
|
||||
|
||||
options PC98 #PC98
|
||||
@ -72,18 +74,10 @@ options COMPAT_OLDISA # Old ISA driver shims
|
||||
options COMPAT_OLDPCI # Old PCI driver shims
|
||||
|
||||
# Floppy drives
|
||||
device fdc0 at isa? port IO_FD1 irq 11 drq 2
|
||||
device fd0 at fdc0 drive 0
|
||||
device fd1 at fdc0 drive 1
|
||||
device fd2 at fdc0 drive 2
|
||||
device fd3 at fdc0 drive 3
|
||||
device fdc
|
||||
|
||||
# IDE controller and disks
|
||||
device wdc0 at isa? port IO_WD1 irq 9
|
||||
device wd0 at wdc0 drive 0
|
||||
#device wd1 at wdc0 drive 1
|
||||
#device wd2 at wdc0 drive 2
|
||||
#device wd3 at wdc0 drive 3
|
||||
device wdc
|
||||
|
||||
# ATAPI devices on wdc
|
||||
device wcd #IDE CD-ROM
|
||||
@ -104,21 +98,48 @@ device sym # NCR/Symbios Logic (newer chipsets)
|
||||
|
||||
options BS_TARG_SAFEMODE
|
||||
|
||||
device bs
|
||||
# PC-9801-92
|
||||
device bs0 at isa? port IO_SCSI irq 5 drq 3 flags 0
|
||||
#hint.bs.0.at="isa"
|
||||
#hint.bs.0.port="0xCC0"
|
||||
#hint.bs.0.irq="5"
|
||||
#hint.bs.0.drq="3"
|
||||
#hint.bs.0.flags="0"
|
||||
# SC-98
|
||||
# device bs0 at isa? port IO_SCSI irq 5 drq 3 flags 0x10000
|
||||
#hint.bs.0.at="isa"
|
||||
#hint.bs.0.port="0xCC0"
|
||||
#hint.bs.0.irq="5"
|
||||
#hint.bs.0.drq="3"
|
||||
#hint.bs.0.flags="0x10000"
|
||||
# HA-55BS2 and later
|
||||
#device bs0 at isa? port IO_SCSI irq 5 drq 3 flags 0x20000
|
||||
#hint.bs.0.at="isa"
|
||||
#hint.bs.0.port="0xCC0"
|
||||
#hint.bs.0.irq="5"
|
||||
#hint.bs.0.drq="3"
|
||||
#hint.bs.0.flags="0x20000"
|
||||
# ELECOM type
|
||||
#device bs0 at isa? port IO_SCSI irq 5 drq 3 flags 0x30000
|
||||
#hint.bs.0.at="isa"
|
||||
#hint.bs.0.port="0xCC0"
|
||||
#hint.bs.0.irq="5"
|
||||
#hint.bs.0.drq="3"
|
||||
#hint.bs.0.flags="0x30000"
|
||||
# SMIT
|
||||
#device bs0 at isa? port IO_SCSI irq 5 drq 3 iomem 0xdd000 iosiz 0x1000 flags 0x40000
|
||||
#hint.bs.0.at="isa"
|
||||
#hint.bs.0.port="0xCC0"
|
||||
#hint.bs.0.irq="5"
|
||||
#hint.bs.0.drq="3"
|
||||
#hint.bs.0.iomem="0xdd000"
|
||||
#hint.bs.0.iosiz="0x1000"
|
||||
#hint.bs.0.flags="0x40000"
|
||||
# Logitec LHA-20x
|
||||
#device bs0 at isa? port IO_SCSI irq 5 drq 3 flags 0x50000
|
||||
#hint.bs.0.at="isa"
|
||||
#hint.bs.0.port="0xCC0"
|
||||
#hint.bs.0.irq="5"
|
||||
#hint.bs.0.drq="3"
|
||||
#hint.bs.0.flags="0x50000"
|
||||
|
||||
# PC-9801-100
|
||||
device aic0 at isa? port 0x1840 irq 5 flags 0x10000
|
||||
device aic
|
||||
|
||||
# SCSI peripherals
|
||||
device scbus # SCSI bus (required)
|
||||
@ -133,59 +154,92 @@ device amr # AMI MegaRAID
|
||||
device mlx # Mylex DAC960 family
|
||||
|
||||
# keyboard driver
|
||||
device pckbd0 at isa? port IO_KBD irq 1
|
||||
device pckbd
|
||||
|
||||
device gdc0 at isa?
|
||||
device gdc
|
||||
|
||||
# splash screen/screen saver
|
||||
pseudo-device splash
|
||||
device splash
|
||||
|
||||
# syscons is the default console driver, resembling an SCO console
|
||||
device sc0 at isa?
|
||||
device sc 1
|
||||
|
||||
# Floating point support - do not disable.
|
||||
device npx0 at nexus? port IO_NPX irq 8
|
||||
device npx
|
||||
|
||||
# Power management support (see LINT for more options)
|
||||
#device apm0 at nexus? disable flags 0x20 # Advanced Power Management
|
||||
#device apm
|
||||
|
||||
# PCCARD (PCMCIA) support
|
||||
device card
|
||||
device pcic0 at isa? irq 6 port 0x3e0
|
||||
device pcic
|
||||
|
||||
# Serial (COM) ports
|
||||
#
|
||||
options COM_MULTIPORT
|
||||
#
|
||||
# COM1
|
||||
device sio0 at isa? port IO_COM1 irq 4
|
||||
device sio
|
||||
# COM2 (2nd CCU)
|
||||
device sio1 at isa? port 0x238 irq 5 flags 0x12000010
|
||||
#hint.sio.1.at="isa"
|
||||
#hint.sio.1.port="0x238"
|
||||
#hint.sio.1.irq="5"
|
||||
#hint.sio.1.flags="0x12000010"
|
||||
# PC-9861K, PC-9801-101, MDC-926Rs
|
||||
#device sio1 at isa? port IO_COM2 irq 5 flags 0x01000000
|
||||
#device sio2 at isa? port IO_COM3 irq 6 flags 0x02000000
|
||||
#hint.sio.1.at="isa"
|
||||
#hint.sio.1.port="0x0B1"
|
||||
#hint.sio.1.irq="5"
|
||||
#hint.sio.1.flags="0x01000000"
|
||||
#hint.sio.2.at="isa"
|
||||
#hint.sio.2.port="0x0B9"
|
||||
#hint.sio.2.irq="6"
|
||||
#hint.sio.2.flags="0x02000000"
|
||||
# PC-9801-120 (PnP off)
|
||||
#device sio1 at isa? port 0x8b0 irq 5 flags 0x11000000
|
||||
#hint.sio.1.at="isa"
|
||||
#hint.sio.1.port="0x8b0"
|
||||
#hint.sio.1.irq="5"
|
||||
#hint.sio.1.flags="0x11000000"
|
||||
# MC-16550II, MC-RS98
|
||||
#device sio1 at isa? port 0xd2 irq 5 flags 0x14000101
|
||||
#device sio2 at isa? port 0x8d2 flags 0x14000101
|
||||
#hint.sio.1.at="isa"
|
||||
#hint.sio.1.port="0xd2"
|
||||
#hint.sio.1.irq="5"
|
||||
#hint.sio.1.flags="0x14000101"
|
||||
#hint.sio.2.at="isa"
|
||||
#hint.sio.2.port="0x8d2"
|
||||
#hint.sio.2.flags="0x14000101"
|
||||
# RSB-2000, RSB-3000, B98-02
|
||||
#device sio1 at isa? port 0xb0 flags 0x15000101
|
||||
#device sio2 at isa? port 0xb1 flags 0x15000101
|
||||
#hint.sio.1.at="isa"
|
||||
#hint.sio.1.port="0xb0"
|
||||
#hint.sio.1.flags="0x15000101"
|
||||
#hint.sio.2.at="isa"
|
||||
#hint.sio.2.port="0xb1"
|
||||
#hint.sio.2.flags="0x15000101"
|
||||
# RSB-384
|
||||
#device sio1 at isa? port 0xb0 flags 0x16000000
|
||||
#device sio2 at isa? port 0xb1 flags 0x16000000
|
||||
#hint.sio.1.at="isa"
|
||||
#hint.sio.1.port="0xb0"
|
||||
#hint.sio.1.flags="0x16000000"
|
||||
#hint.sio.2.at="isa"
|
||||
#hint.sio.2.port="0xb1"
|
||||
#hint.sio.2.flags="0x16000000"
|
||||
# RSA-98III
|
||||
#device sio1 at isa? port 0x50e0 irq 5 flags 0x18000101
|
||||
#device sio2 at isa? port 0x51e0 flags 0x18000101
|
||||
#hint.sio.1.at="isa"
|
||||
#hint.sio.1.port="0x50e0"
|
||||
#hint.sio.1.irq="5"
|
||||
#hint.sio.1.flags="0x18000101"
|
||||
#hint.sio.2.at="isa"
|
||||
#hint.sio.2.port="0x51e0"
|
||||
#hint.sio.2.flags="0x18000101"
|
||||
# ESP98
|
||||
#options COM_ESP
|
||||
#device sio1 at isa? port 0x18b0 irq 5 flags 0x19000000
|
||||
#hint.sio.1.at="isa"
|
||||
#hint.sio.1.port="0x18b0"
|
||||
#hint.sio.1.irq="5"
|
||||
#hint.sio.1.flags="0x19000000"
|
||||
|
||||
device mse0 at isa? port IO_MSE irq 13
|
||||
device mse
|
||||
|
||||
# NEW Parallel port
|
||||
device ppc0 at isa? irq 14
|
||||
device ppc
|
||||
device ppbus # Parallel port bus (required)
|
||||
device lpt # Printer
|
||||
device plip # TCP/IP over parallel
|
||||
@ -193,7 +247,7 @@ device ppi # Parallel port interface device
|
||||
#device vpo # Requires scbus and da
|
||||
# OLD Parallel port
|
||||
# Please stay olpt driver after ppc driver
|
||||
device olpt0 at isa? port IO_LPT
|
||||
device olpt
|
||||
|
||||
|
||||
# PCI Ethernet NICs.
|
||||
@ -232,6 +286,7 @@ device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'')
|
||||
# ed10: EC/EP-98X
|
||||
# ed11: SIU-98-D
|
||||
#
|
||||
# XXX convert to hints
|
||||
#device ed0 at isa? port 0x00d0 irq 6
|
||||
##device ed0 at isa? port 0x10d0 irq 6 iomem 0xc8000 # SMC EtherEZ98
|
||||
#device ed5 at isa? port 0x00d0 irq 6 iomem 0xd0000 iosiz 16384 flags 0x600000
|
||||
@ -254,11 +309,10 @@ device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'')
|
||||
# FE_8BIT_SUPPORT is needed to support LAC-98
|
||||
#
|
||||
options FE_8BIT_SUPPORT # LAC-98 support
|
||||
device fe0 at isa? port 0x00d0 irq 3
|
||||
device fe1 at isa? port 0x73d0 irq 5
|
||||
device fe
|
||||
|
||||
device ep0 at isa? port 0x40d0 irq 3
|
||||
device lnc0 at isa? port 0x03d0 irq 6
|
||||
device ep
|
||||
device lnc
|
||||
device sn
|
||||
|
||||
# WaveLAN/IEEE 802.11 wireless NICs. Note: the WaveLAN/IEEE really
|
||||
@ -278,41 +332,41 @@ device xe
|
||||
|
||||
|
||||
#device snd
|
||||
#device sb0 at isa? port 0x20d2 irq 10 drq 3
|
||||
#device sbxvi0 at isa? drq 3
|
||||
#device sbmidi0 at isa? port 0x80d2
|
||||
#device opl0 at isa? port 0x28d2
|
||||
#device nss0 at isa? port 0xa460 irq 12
|
||||
#device mss0 at isa? port 0xf40 irq 12 drq 1
|
||||
#device mpu0 at isa? port 0xe0d0 irq 6
|
||||
#device sb
|
||||
#device sbxvi
|
||||
#device sbmidi
|
||||
#device opl
|
||||
#device nss
|
||||
#device mss
|
||||
#device mpu
|
||||
|
||||
#device joy0 at isa? port 0x04d2
|
||||
#device joy
|
||||
|
||||
# The newpcm driver (use INSTEAD of snd0 and all VOXWARE drivers!).
|
||||
#
|
||||
# Windows Sound System
|
||||
#device pcm0 at isa? port 0xf40 irq 12 drq 1 flags 0x10000
|
||||
#device pcm
|
||||
#
|
||||
# Sound Blaster 16 (This device need the bridge driver.)
|
||||
#device pcm
|
||||
#device sbc0 at isa? port 0x20d2 irq 10 drq 3
|
||||
#device sbc
|
||||
|
||||
# Pseudo devices - the number indicates how many units to allocated.
|
||||
pseudo-device loop # Network loopback
|
||||
pseudo-device ether # Ethernet support
|
||||
pseudo-device sl 1 # Kernel SLIP
|
||||
pseudo-device ppp 1 # Kernel PPP
|
||||
pseudo-device tun # Packet tunnel.
|
||||
pseudo-device pty # Pseudo-ttys (telnet etc)
|
||||
pseudo-device md # Memory "disks"
|
||||
pseudo-device gif 4 # IPv6 and IPv4 tunneling
|
||||
pseudo-device faith 1 # IPv6-to-IPv4 relaying (translation)
|
||||
device loop # Network loopback
|
||||
device ether # Ethernet support
|
||||
device sl 1 # Kernel SLIP
|
||||
device ppp 1 # Kernel PPP
|
||||
device tun # Packet tunnel.
|
||||
device pty # Pseudo-ttys (telnet etc)
|
||||
device md # Memory "disks"
|
||||
device gif 4 # IPv6 and IPv4 tunneling
|
||||
device faith 1 # IPv6-to-IPv4 relaying (translation)
|
||||
|
||||
# The `bpf' pseudo-device enables the Berkeley Packet Filter.
|
||||
# The `bpf' device enables the Berkeley Packet Filter.
|
||||
# Be aware of the administrative consequences of enabling this!
|
||||
pseudo-device bpf # Berkeley packet filter
|
||||
device bpf # Berkeley packet filter
|
||||
|
||||
#pseudo-device compat_atdisk #IBM-PC HDD support
|
||||
#device compat_atdisk #IBM-PC HDD support
|
||||
|
||||
# USB support
|
||||
#device uhci # UHCI PCI->USB interface
|
||||
|
70
sys/pc98/conf/GENERIC.hints
Normal file
70
sys/pc98/conf/GENERIC.hints
Normal file
@ -0,0 +1,70 @@
|
||||
# $FreeBSD$
|
||||
hint.fdc.0.at="isa"
|
||||
hint.fdc.0.port="0x090"
|
||||
hint.fdc.0.irq="11"
|
||||
hint.fdc.0.drq="2"
|
||||
hint.fd.0.at="fdc0"
|
||||
hint.fd.0.drive="0"
|
||||
hint.fd.1.at="fdc0"
|
||||
hint.fd.1.drive="1"
|
||||
hint.fd.2.at="fdc0"
|
||||
hint.fd.2.drive="2"
|
||||
hint.fd.3.at="fdc0"
|
||||
hint.fd.3.drive="3"
|
||||
hint.wdc.0.at="isa"
|
||||
hint.wdc.0.port="0x640"
|
||||
hint.wdc.0.irq="9"
|
||||
hint.wd.0.at="wdc0"
|
||||
hint.wd.0.drive="0"
|
||||
#hint.wd.1.at="wdc0"
|
||||
#hint.wd.1.drive="1"
|
||||
#hint.wd.2.at="wdc0"
|
||||
#hint.wd.2.drive="2"
|
||||
#hint.wd.3.at="wdc0"
|
||||
#hint.wd.3.drive="3"
|
||||
hint.bs.0.at="isa"
|
||||
hint.bs.0.port="0xCC0"
|
||||
hint.bs.0.irq="5"
|
||||
hint.bs.0.drq="3"
|
||||
hint.bs.0.flags="0"
|
||||
hint.aic.0.at="isa"
|
||||
hint.aic.0.port="0x1840"
|
||||
hint.aic.0.irq="5"
|
||||
hint.aic.0.flags="0x10000"
|
||||
hint.pckbd.0.at="isa"
|
||||
hint.pckbd.0.port="0x041"
|
||||
hint.pckbd.0.irq="1"
|
||||
hint.gdc.0.at="isa"
|
||||
hint.sc.0.at="isa"
|
||||
hint.npx.0.at="nexus"
|
||||
hint.npx.0.port="0x0F8"
|
||||
hint.npx.0.irq="8"
|
||||
hint.pcic.0.at="isa"
|
||||
hint.pcic.0.irq="6"
|
||||
hint.pcic.0.port="0x3e0"
|
||||
hint.sio.0.at="isa"
|
||||
hint.sio.0.port="0x030"
|
||||
hint.sio.0.irq="4"
|
||||
hint.sio.1.at="isa"
|
||||
hint.sio.1.port="0x238"
|
||||
hint.sio.1.irq="5"
|
||||
hint.sio.1.flags="0x12000010"
|
||||
hint.mse.0.at="isa"
|
||||
hint.mse.0.port="0x7FD9"
|
||||
hint.mse.0.irq="13"
|
||||
hint.ppc.0.at="isa"
|
||||
hint.ppc.0.irq="14"
|
||||
hint.olpt.0.at="isa"
|
||||
hint.olpt.0.port="0x040"
|
||||
hint.fe.0.at="isa"
|
||||
hint.fe.0.port="0x00d0"
|
||||
hint.fe.0.irq="3"
|
||||
hint.fe.1.at="isa"
|
||||
hint.fe.1.port="0x73d0"
|
||||
hint.fe.1.irq="5"
|
||||
hint.ep.0.at="isa"
|
||||
hint.ep.0.port="0x40d0"
|
||||
hint.ep.0.irq="3"
|
||||
hint.lnc.0.at="isa"
|
||||
hint.lnc.0.port="0x03d0"
|
||||
hint.lnc.0.irq="6"
|
87
sys/pc98/conf/gethints.pl
Normal file
87
sys/pc98/conf/gethints.pl
Normal file
@ -0,0 +1,87 @@
|
||||
#! /usr/bin/perl
|
||||
#
|
||||
# This is a transition aid. It extracts old-style configuration information
|
||||
# from a config file and writes an equivalent device.hints file to stdout.
|
||||
# You can use that with loader(8) or statically compile it in with the
|
||||
# 'hints' directive. See how GENERIC and GENERIC.hints fit together for
|
||||
# a static example. You should use loader(8) if at all possible.
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
while (<STDIN>) {
|
||||
chop;
|
||||
s/#.*//;
|
||||
next unless /^device/;
|
||||
($dev, $nameunit, $at, $where, @rest) = split;
|
||||
next unless $at eq "at" && $where ne "";
|
||||
$name = $nameunit;
|
||||
$name =~ s/[0-9]*$//g;
|
||||
$unit = $nameunit;
|
||||
$unit =~ s/.*[^0-9]//g;
|
||||
$where =~ s/\?$//;
|
||||
print "hint.$name.$unit.at=\"$where\"\n";
|
||||
while ($key = shift(@rest)) {
|
||||
if ($key eq "disable") {
|
||||
print "hint.$name.$unit.disabled=\"1\"\n";
|
||||
next;
|
||||
}
|
||||
if ($key eq "port") {
|
||||
$val = shift(@rest);
|
||||
$val =~ s/IO_A20CT/0x0F6/;
|
||||
$val =~ s/IO_A2OEN/0x0F2/;
|
||||
$val =~ s/IO_BEEPF/0x3FDB/;
|
||||
$val =~ s/IO_BMS/0x7FD9/;
|
||||
$val =~ s/IO_CGROM/0x0A1/;
|
||||
$val =~ s/IO_COM1/0x030/;
|
||||
$val =~ s/IO_COM2/0x0B1/;
|
||||
$val =~ s/IO_COM3/0x0B9/;
|
||||
$val =~ s/IO_DMA/0x001/;
|
||||
$val =~ s/IO_DMAPG/0x021/;
|
||||
$val =~ s/IO_EGC/0x4A0/;
|
||||
$val =~ s/IO_FD1/0x090/;
|
||||
$val =~ s/IO_FD2/0x0C8/;
|
||||
$val =~ s/IO_FDPORT/0x0BE/;
|
||||
$val =~ s/IO_GDC1/0x060/;
|
||||
$val =~ s/IO_GDC2/0x0A0/;
|
||||
$val =~ s/IO_ICU1/0x000/;
|
||||
$val =~ s/IO_ICU2/0x008/;
|
||||
$val =~ s/IO_KBD/0x041/;
|
||||
$val =~ s/IO_LPT/0x040/;
|
||||
$val =~ s/IO_MOUSE/0x7FD9/;
|
||||
$val =~ s/IO_MOUSETM/0xDFBD/;
|
||||
$val =~ s/IO_MSE/0x7FD9/;
|
||||
$val =~ s/IO_NMI/0x050/;
|
||||
$val =~ s/IO_NPX/0x0F8/;
|
||||
$val =~ s/IO_PPI/0x035/;
|
||||
$val =~ s/IO_REEST/0x0F0/;
|
||||
$val =~ s/IO_RTC/0x020/;
|
||||
$val =~ s/IO_SASI/0x080/;
|
||||
$val =~ s/IO_SCSI/0xCC0/;
|
||||
$val =~ s/IO_SIO1/0x0D0/;
|
||||
$val =~ s/IO_SIO2/0x8D0/;
|
||||
$val =~ s/IO_SOUND/0x188/;
|
||||
$val =~ s/IO_SYSPORT/0x031/;
|
||||
$val =~ s/IO_TIMER1/0x071/;
|
||||
$val =~ s/IO_WAIT/0x05F/;
|
||||
$val =~ s/IO_WD1/0x640/;
|
||||
$val =~ s/IO_WD1_EPSON/0x80/;
|
||||
$val =~ s/IO_WD1_NEC/0x640/;
|
||||
if ($val ne "?") {
|
||||
print "hint.$name.$unit.port=\"$val\"\n";
|
||||
}
|
||||
next;
|
||||
}
|
||||
if ($key eq "irq" || $key eq "drq" || $key eq "drive" ||
|
||||
$key eq "iomem" || $key eq "iosiz" || $key eq "flags"||
|
||||
$key eq "bus" || $key eq "target" || $key eq "unit") {
|
||||
$key =~ s/iomem/maddr/;
|
||||
$key =~ s/iosiz/msize/;
|
||||
$val = shift(@rest);
|
||||
if ($val ne "?") {
|
||||
print "hint.$name.$unit.$key=\"$val\"\n";
|
||||
}
|
||||
next;
|
||||
}
|
||||
print "unrecognized config token $key\n";
|
||||
}
|
||||
}
|
@ -52,12 +52,9 @@
|
||||
* driver entries for polled reinit and polled write).
|
||||
*/
|
||||
|
||||
#include "wd.h"
|
||||
#ifdef NWDC
|
||||
#undef NWDC
|
||||
#endif
|
||||
|
||||
#include "wdc.h"
|
||||
#undef NWD
|
||||
#define NWD (NWDC * 4) /* 4 drives per wdc on PC98 */
|
||||
|
||||
#if NWDC > 0
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
PROG= config
|
||||
CFLAGS+=-I. -I${.CURDIR}
|
||||
CFLAGS+=-Wall -Wunused -Wmissing-prototypes -Wredundant-decls
|
||||
SRCS= config.y main.c lang.l mkioconf.c mkmakefile.c mkheaders.c \
|
||||
SRCS= config.y main.c lang.l mkmakefile.c mkheaders.c \
|
||||
mkoptions.c y.tab.h
|
||||
MAN8= config.8
|
||||
DPADD= ${LIBL}
|
||||
|
@ -76,25 +76,10 @@ struct file_list {
|
||||
|
||||
struct device {
|
||||
int d_type; /* DEVICE, bus adaptor */
|
||||
char *d_conn; /* what it is connected to */
|
||||
int d_connunit; /* unit of connection */
|
||||
char *d_name; /* name of device (e.g. rk11) */
|
||||
int d_unit; /* unit number */
|
||||
int d_drive; /* drive number */
|
||||
int d_target; /* target number */
|
||||
int d_lun; /* unit number */
|
||||
int d_bus; /* controller bus number */
|
||||
int d_count; /* pseudo-device count */
|
||||
int d_count; /* device count */
|
||||
#define QUES -1 /* -1 means '?' */
|
||||
#define UNKNOWN -2 /* -2 means not set yet */
|
||||
int d_flags; /* flags for device init */
|
||||
int d_disabled; /* nonzero to skip probe/attach */
|
||||
char *d_port; /* io port base manifest constant */
|
||||
int d_portn; /* io port base (if number not manifest) */
|
||||
int d_maddr; /* io memory base */
|
||||
int d_msize; /* io memory size */
|
||||
int d_drq; /* DMA request */
|
||||
int d_irq; /* interrupt request */
|
||||
struct device *d_next; /* Next one in list */
|
||||
};
|
||||
|
||||
@ -144,20 +129,20 @@ struct opt_list {
|
||||
} *otab;
|
||||
|
||||
extern char *ident;
|
||||
extern char *hints;
|
||||
extern int do_trace;
|
||||
|
||||
char *get_word __P((FILE *));
|
||||
char *get_quoted_word __P((FILE *));
|
||||
char *path __P((char *));
|
||||
char *raisestr __P((char *));
|
||||
void moveifchanged __P((const char *, const char *));
|
||||
void init_dev __P((struct device *));
|
||||
void newbus_ioconf __P((void));
|
||||
int yyparse __P((void));
|
||||
int yylex __P((void));
|
||||
void options __P((void));
|
||||
void makefile __P((void));
|
||||
void headers __P((void));
|
||||
char *get_word(FILE *);
|
||||
char *get_quoted_word(FILE *);
|
||||
char *path(char *);
|
||||
char *raisestr(char *);
|
||||
void moveifchanged(const char *, const char *);
|
||||
void newbus_ioconf(void);
|
||||
int yyparse(void);
|
||||
int yylex(void);
|
||||
void options(void);
|
||||
void makefile(void);
|
||||
void headers(void);
|
||||
|
||||
extern struct device *dtab;
|
||||
|
||||
|
@ -4,48 +4,25 @@
|
||||
struct file_list *file;
|
||||
}
|
||||
|
||||
%token ANY
|
||||
%token ARCH
|
||||
%token AT
|
||||
%token BUS
|
||||
%token COMMA
|
||||
%token CONFIG
|
||||
%token CONFLICTS
|
||||
%token CONTROLLER
|
||||
%token CPU
|
||||
%token DEVICE
|
||||
%token DISABLE
|
||||
%token DISK
|
||||
%token DRIVE
|
||||
%token DRQ
|
||||
%token EQUALS
|
||||
%token FLAGS
|
||||
%token HINTS
|
||||
%token IDENT
|
||||
%token IOMEM
|
||||
%token IOSIZ
|
||||
%token IRQ
|
||||
%token MAXUSERS
|
||||
%token MINUS
|
||||
%token NEXUS
|
||||
%token OPTIONS
|
||||
%token MAKEOPTIONS
|
||||
%token PORT
|
||||
%token PSEUDO_DEVICE
|
||||
%token SEMICOLON
|
||||
%token TAPE
|
||||
%token TARGET
|
||||
%token TTY
|
||||
%token UNIT
|
||||
%token VECTOR
|
||||
|
||||
%token <str> ID
|
||||
%token <val> NUMBER
|
||||
%token <val> FPNUMBER
|
||||
|
||||
%type <str> Save_id
|
||||
%type <str> Opt_value
|
||||
%type <str> Dev
|
||||
%type <str> device_name
|
||||
|
||||
%{
|
||||
|
||||
@ -97,6 +74,7 @@ static struct device *curp = 0;
|
||||
|
||||
struct device *dtab;
|
||||
char *ident;
|
||||
char *hints;
|
||||
int yyline;
|
||||
struct file_list *ftab;
|
||||
char errbuf[80];
|
||||
@ -104,8 +82,7 @@ int maxusers;
|
||||
|
||||
#define ns(s) strdup(s)
|
||||
|
||||
static int connect __P((char *, int));
|
||||
static void yyerror __P((char *s));
|
||||
static void yyerror(char *s);
|
||||
|
||||
|
||||
%}
|
||||
@ -163,7 +140,9 @@ Config_spec:
|
||||
System_spec
|
||||
|
|
||||
MAXUSERS NUMBER
|
||||
= { maxusers = $2; };
|
||||
= { maxusers = $2; } |
|
||||
HINTS ID
|
||||
= { hints = $2; };
|
||||
|
||||
System_spec:
|
||||
CONFIG System_id System_parameter_list
|
||||
@ -190,41 +169,6 @@ System_parameter_list:
|
||||
| ID
|
||||
;
|
||||
|
||||
device_name:
|
||||
Save_id
|
||||
= { $$ = $1; }
|
||||
| Save_id NUMBER
|
||||
= {
|
||||
char buf[80];
|
||||
|
||||
(void) snprintf(buf, sizeof(buf), "%s%d", $1, $2);
|
||||
$$ = ns(buf); free($1);
|
||||
}
|
||||
| Save_id NUMBER ID
|
||||
= {
|
||||
char buf[80];
|
||||
|
||||
(void) snprintf(buf, sizeof(buf), "%s%d%s", $1, $2, $3);
|
||||
$$ = ns(buf); free($1);
|
||||
}
|
||||
| Save_id NUMBER ID NUMBER
|
||||
= {
|
||||
char buf[80];
|
||||
|
||||
(void) snprintf(buf, sizeof(buf), "%s%d%s%d",
|
||||
$1, $2, $3, $4);
|
||||
$$ = ns(buf); free($1);
|
||||
}
|
||||
| Save_id NUMBER ID NUMBER ID
|
||||
= {
|
||||
char buf[80];
|
||||
|
||||
(void) snprintf(buf, sizeof(buf), "%s%d%s%d%s",
|
||||
$1, $2, $3, $4, $5);
|
||||
$$ = ns(buf); free($1);
|
||||
}
|
||||
;
|
||||
|
||||
Opt_list:
|
||||
Opt_list COMMA Option
|
||||
|
|
||||
@ -304,111 +248,25 @@ Dev:
|
||||
;
|
||||
|
||||
Device_spec:
|
||||
DEVICE Dev_spec
|
||||
= { cur.d_type = DEVICE; } |
|
||||
DISK Dev_spec
|
||||
DEVICE Dev
|
||||
= {
|
||||
warnx("line %d: Obsolete keyword 'disk' found - use 'device'", yyline);
|
||||
cur.d_type = DEVICE;
|
||||
cur.d_name = $2;
|
||||
cur.d_count = UNKNOWN;
|
||||
} |
|
||||
TAPE Dev_spec
|
||||
DEVICE Dev NUMBER
|
||||
= {
|
||||
warnx("line %d: Obsolete keyword 'tape' found - use 'device'", yyline);
|
||||
cur.d_type = DEVICE;
|
||||
} |
|
||||
CONTROLLER Dev_spec
|
||||
= {
|
||||
warnx("line %d: Obsolete keyword 'controller' found - use 'device'", yyline);
|
||||
cur.d_type = DEVICE;
|
||||
} |
|
||||
PSEUDO_DEVICE Init_dev Dev
|
||||
= {
|
||||
cur.d_name = $3;
|
||||
cur.d_type = PSEUDO_DEVICE;
|
||||
} |
|
||||
PSEUDO_DEVICE Init_dev Dev NUMBER
|
||||
= {
|
||||
cur.d_name = $3;
|
||||
cur.d_type = PSEUDO_DEVICE;
|
||||
cur.d_count = $4;
|
||||
cur.d_name = $2;
|
||||
cur.d_count = $3;
|
||||
if (cur.d_count == 0)
|
||||
warnx("line %d: devices with zero units are not likely to be correct", yyline);
|
||||
} ;
|
||||
|
||||
Dev_spec:
|
||||
Init_dev Dev
|
||||
= {
|
||||
cur.d_name = $2;
|
||||
cur.d_unit = UNKNOWN;
|
||||
} |
|
||||
Init_dev Dev NUMBER Dev_info
|
||||
= {
|
||||
cur.d_name = $2;
|
||||
cur.d_unit = $3;
|
||||
};
|
||||
|
||||
Init_dev:
|
||||
/* lambda */
|
||||
= { init_dev(&cur); };
|
||||
|
||||
Dev_info:
|
||||
Con_info Info_list
|
||||
|
|
||||
/* lambda */
|
||||
;
|
||||
|
||||
Con_info:
|
||||
AT Dev NUMBER
|
||||
= {
|
||||
connect($2, $3);
|
||||
cur.d_conn = $2;
|
||||
cur.d_connunit = $3;
|
||||
} |
|
||||
AT NEXUS NUMBER
|
||||
= {
|
||||
cur.d_conn = "nexus";
|
||||
cur.d_connunit = 0;
|
||||
};
|
||||
|
||||
Info_list:
|
||||
Info_list Info
|
||||
|
|
||||
/* lambda */
|
||||
;
|
||||
|
||||
Info:
|
||||
BUS NUMBER /* device scbus1 at ahc0 bus 1 - twin channel */
|
||||
= { cur.d_bus = $2; } |
|
||||
TARGET NUMBER
|
||||
= { cur.d_target = $2; } |
|
||||
UNIT NUMBER
|
||||
= { cur.d_lun = $2; } |
|
||||
DRIVE NUMBER
|
||||
= { cur.d_drive = $2; } |
|
||||
IRQ NUMBER
|
||||
= { cur.d_irq = $2; } |
|
||||
DRQ NUMBER
|
||||
= { cur.d_drq = $2; } |
|
||||
IOMEM NUMBER
|
||||
= { cur.d_maddr = $2; } |
|
||||
IOSIZ NUMBER
|
||||
= { cur.d_msize = $2; } |
|
||||
PORT device_name
|
||||
= { cur.d_port = $2; } |
|
||||
PORT NUMBER
|
||||
= { cur.d_portn = $2; } |
|
||||
FLAGS NUMBER
|
||||
= { cur.d_flags = $2; } |
|
||||
DISABLE
|
||||
= { cur.d_disabled = 1; } |
|
||||
CONFLICTS
|
||||
= {
|
||||
warnx("line %d: Obsolete keyword 'conflicts' found", yyline);
|
||||
};
|
||||
|
||||
%%
|
||||
|
||||
static void
|
||||
yyerror(s)
|
||||
char *s;
|
||||
yyerror(char *s)
|
||||
{
|
||||
|
||||
warnx("line %d: %s", yyline + 1, s);
|
||||
@ -418,23 +276,16 @@ yyerror(s)
|
||||
* add a device to the list of devices
|
||||
*/
|
||||
static void
|
||||
newdev(dp)
|
||||
register struct device *dp;
|
||||
newdev(struct device *dp)
|
||||
{
|
||||
register struct device *np, *xp;
|
||||
struct device *np;
|
||||
|
||||
if (dp->d_unit >= 0) {
|
||||
for (xp = dtab; xp != 0; xp = xp->d_next) {
|
||||
if ((xp->d_unit == dp->d_unit) &&
|
||||
eq(xp->d_name, dp->d_name)) {
|
||||
warnx("line %d: already seen device %s%d",
|
||||
yyline, xp->d_name, xp->d_unit);
|
||||
}
|
||||
}
|
||||
}
|
||||
np = (struct device *) malloc(sizeof *np);
|
||||
memset(np, 0, sizeof(*np));
|
||||
*np = *dp;
|
||||
np->d_name = dp->d_name;
|
||||
np->d_type = dp->d_type;
|
||||
np->d_count = dp->d_count;
|
||||
np->d_next = 0;
|
||||
if (curp == 0)
|
||||
dtab = np;
|
||||
@ -442,63 +293,3 @@ newdev(dp)
|
||||
curp->d_next = np;
|
||||
curp = np;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* find the pointer to connect to the given device and number.
|
||||
* returns 0 if no such device and prints an error message
|
||||
*/
|
||||
static int
|
||||
connect(dev, num)
|
||||
register char *dev;
|
||||
register int num;
|
||||
{
|
||||
register struct device *dp;
|
||||
|
||||
if (num == QUES) {
|
||||
for (dp = dtab; dp != 0; dp = dp->d_next)
|
||||
if (eq(dp->d_name, dev))
|
||||
break;
|
||||
if (dp == 0) {
|
||||
(void) snprintf(errbuf, sizeof(errbuf),
|
||||
"no %s's to wildcard", dev);
|
||||
yyerror(errbuf);
|
||||
return (0);
|
||||
}
|
||||
return (1);
|
||||
}
|
||||
for (dp = dtab; dp != 0; dp = dp->d_next) {
|
||||
if ((num != dp->d_unit) || !eq(dev, dp->d_name))
|
||||
continue;
|
||||
if (dp->d_type != DEVICE) {
|
||||
(void) snprintf(errbuf, sizeof(errbuf),
|
||||
"%s connected to non-device", dev);
|
||||
yyerror(errbuf);
|
||||
return (0);
|
||||
}
|
||||
return (1);
|
||||
}
|
||||
(void) snprintf(errbuf, sizeof(errbuf), "%s %d not defined", dev, num);
|
||||
yyerror(errbuf);
|
||||
return (0);
|
||||
}
|
||||
|
||||
void
|
||||
init_dev(dp)
|
||||
register struct device *dp;
|
||||
{
|
||||
|
||||
dp->d_name = "OHNO!!!";
|
||||
dp->d_type = DEVICE;
|
||||
dp->d_conn = 0;
|
||||
dp->d_disabled = 0;
|
||||
dp->d_flags = 0;
|
||||
dp->d_bus = dp->d_lun = dp->d_target = dp->d_drive = dp->d_unit = \
|
||||
dp->d_count = UNKNOWN;
|
||||
dp->d_port = (char *)0;
|
||||
dp->d_portn = -1;
|
||||
dp->d_irq = -1;
|
||||
dp->d_drq = -1;
|
||||
dp->d_maddr = 0;
|
||||
dp->d_msize = 0;
|
||||
}
|
||||
|
@ -8,4 +8,4 @@
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
#define CONFIGVERS 500001
|
||||
#define CONFIGVERS 500002
|
||||
|
@ -50,40 +50,23 @@ struct kt {
|
||||
char *kt_name;
|
||||
int kt_val;
|
||||
} key_words[] = {
|
||||
{ "at", AT },
|
||||
{ "bus", BUS },
|
||||
{ "conflicts", CONFLICTS },
|
||||
{ "config", CONFIG },
|
||||
{ "controller", CONTROLLER },
|
||||
{ "cpu", CPU },
|
||||
{ "device", DEVICE },
|
||||
{ "disable", DISABLE },
|
||||
{ "disk", DISK },
|
||||
{ "drive", DRIVE },
|
||||
{ "drq", DRQ },
|
||||
{ "flags", FLAGS },
|
||||
{ "hints", HINTS },
|
||||
{ "ident", IDENT },
|
||||
{ "iomem", IOMEM },
|
||||
{ "iosiz", IOSIZ },
|
||||
{ "irq", IRQ },
|
||||
{ "machine", ARCH }, /* MACHINE is defined in /sys/param.h */
|
||||
{ "makeoptions", MAKEOPTIONS },
|
||||
{ "maxusers", MAXUSERS },
|
||||
{ "nexus", NEXUS },
|
||||
{ "option", OPTIONS },
|
||||
{ "options", OPTIONS },
|
||||
{ "port", PORT },
|
||||
{ "pseudo-device",PSEUDO_DEVICE },
|
||||
{ "tape", TAPE },
|
||||
{ "target", TARGET },
|
||||
{ "unit", UNIT },
|
||||
{ 0, 0 },
|
||||
};
|
||||
|
||||
|
||||
int kw_lookup __P((char *));
|
||||
int octal __P((char *));
|
||||
int hex __P((char *));
|
||||
int kw_lookup(char *);
|
||||
int octal(char *);
|
||||
int hex(char *);
|
||||
|
||||
%}
|
||||
WORD [A-Za-z_][-A-Za-z_]*
|
||||
@ -106,8 +89,7 @@ ID [A-Za-z_][-A-Za-z_0-9]*
|
||||
|
||||
if ((i = kw_lookup(yytext)) == -1)
|
||||
REJECT;
|
||||
if (i == CONTROLLER || i == DEVICE || i == DISK || i == TAPE ||
|
||||
i == PSEUDO_DEVICE || i == AT)
|
||||
if (i == DEVICE)
|
||||
BEGIN NONUM;
|
||||
return i;
|
||||
}
|
||||
@ -146,10 +128,6 @@ ID [A-Za-z_][-A-Za-z_0-9]*
|
||||
yylval.val = atoi(yytext);
|
||||
return NUMBER;
|
||||
}
|
||||
[0-9]"."[0-9]* {
|
||||
yylval.val = (int) (60 * atof(yytext) + 0.5);
|
||||
return FPNUMBER;
|
||||
}
|
||||
"?" {
|
||||
yylval.val = -1;
|
||||
return NUMBER;
|
||||
@ -166,7 +144,6 @@ ID [A-Za-z_][-A-Za-z_0-9]*
|
||||
";" { return SEMICOLON; }
|
||||
"," { return COMMA; }
|
||||
"=" { BEGIN TOEOL; return EQUALS; }
|
||||
"@" { return AT; }
|
||||
. { return yytext[0]; }
|
||||
|
||||
%%
|
||||
@ -177,10 +154,9 @@ ID [A-Za-z_][-A-Za-z_0-9]*
|
||||
*/
|
||||
|
||||
int
|
||||
kw_lookup(word)
|
||||
register char *word;
|
||||
kw_lookup(char *word)
|
||||
{
|
||||
register struct kt *kp;
|
||||
struct kt *kp;
|
||||
|
||||
for (kp = key_words; kp->kt_name != 0; kp++)
|
||||
if (eq(word, kp->kt_name))
|
||||
@ -193,8 +169,7 @@ register char *word;
|
||||
*/
|
||||
|
||||
int
|
||||
octal(str)
|
||||
char *str;
|
||||
octal(char *str)
|
||||
{
|
||||
int num;
|
||||
|
||||
@ -203,8 +178,7 @@ char *str;
|
||||
}
|
||||
|
||||
int
|
||||
hex(str)
|
||||
char *str;
|
||||
hex(char *str)
|
||||
{
|
||||
int num;
|
||||
|
||||
|
@ -76,18 +76,16 @@ static int no_config_clobber = TRUE;
|
||||
int debugging;
|
||||
int profiling;
|
||||
|
||||
static void configfile __P((void));
|
||||
static void get_srcdir __P((void));
|
||||
static void usage __P((void));
|
||||
static void configfile(void);
|
||||
static void get_srcdir(void);
|
||||
static void usage(void);
|
||||
|
||||
/*
|
||||
* Config builds a set of files for building a UNIX
|
||||
* system given a description of the desired system.
|
||||
*/
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
|
||||
struct stat buf;
|
||||
@ -170,7 +168,6 @@ main(argc, argv)
|
||||
case MACHINE_I386:
|
||||
case MACHINE_PC98:
|
||||
case MACHINE_ALPHA:
|
||||
newbus_ioconf(); /* Print ioconf.c */
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -206,7 +203,7 @@ main(argc, argv)
|
||||
* and save that in srcdir.
|
||||
*/
|
||||
static void
|
||||
get_srcdir()
|
||||
get_srcdir(void)
|
||||
{
|
||||
int i;
|
||||
char *p;
|
||||
@ -225,7 +222,7 @@ get_srcdir()
|
||||
}
|
||||
|
||||
static void
|
||||
usage()
|
||||
usage(void)
|
||||
{
|
||||
fprintf(stderr, "usage: config [-gpr] [-d destdir] sysname\n");
|
||||
exit(1);
|
||||
@ -238,12 +235,11 @@ usage()
|
||||
* pointer to the word otherwise
|
||||
*/
|
||||
char *
|
||||
get_word(fp)
|
||||
register FILE *fp;
|
||||
get_word(FILE *fp)
|
||||
{
|
||||
static char line[80];
|
||||
register int ch;
|
||||
register char *cp;
|
||||
int ch;
|
||||
char *cp;
|
||||
int escaped_nl = 0;
|
||||
|
||||
begin:
|
||||
@ -284,12 +280,11 @@ get_word(fp)
|
||||
* (to allow embedded spaces).
|
||||
*/
|
||||
char *
|
||||
get_quoted_word(fp)
|
||||
register FILE *fp;
|
||||
get_quoted_word(FILE *fp)
|
||||
{
|
||||
static char line[256];
|
||||
register int ch;
|
||||
register char *cp;
|
||||
int ch;
|
||||
char *cp;
|
||||
int escaped_nl = 0;
|
||||
|
||||
begin:
|
||||
@ -312,7 +307,7 @@ get_quoted_word(fp)
|
||||
}
|
||||
cp = line;
|
||||
if (ch == '"' || ch == '\'') {
|
||||
register int quote = ch;
|
||||
int quote = ch;
|
||||
|
||||
while ((ch = getc(fp)) != EOF) {
|
||||
if (ch == quote)
|
||||
@ -345,10 +340,9 @@ get_quoted_word(fp)
|
||||
* prepend the path to a filename
|
||||
*/
|
||||
char *
|
||||
path(file)
|
||||
char *file;
|
||||
path(char *file)
|
||||
{
|
||||
register char *cp;
|
||||
char *cp;
|
||||
|
||||
cp = malloc((size_t)(strlen(destdir) + (file ? strlen(file) : 0) + 2));
|
||||
(void) strcpy(cp, destdir);
|
||||
@ -360,7 +354,7 @@ path(file)
|
||||
}
|
||||
|
||||
static void
|
||||
configfile()
|
||||
configfile(void)
|
||||
{
|
||||
FILE *fi, *fo;
|
||||
char *p;
|
||||
|
@ -50,24 +50,22 @@ static const char rcsid[] =
|
||||
#include "config.h"
|
||||
#include "y.tab.h"
|
||||
|
||||
static void do_header __P((char *, int));
|
||||
static void do_count __P((char *));
|
||||
static char *toheader __P((char *));
|
||||
static char *tomacro __P((char *));
|
||||
static void do_header(char *, int);
|
||||
static void do_count(char *);
|
||||
static char *toheader(char *);
|
||||
static char *tomacro(char *);
|
||||
|
||||
void
|
||||
headers()
|
||||
headers(void)
|
||||
{
|
||||
register struct file_list *fl;
|
||||
struct file_list *fl;
|
||||
struct device *dp;
|
||||
|
||||
for (fl = ftab; fl != 0; fl = fl->f_next) {
|
||||
if (fl->f_needs != 0) {
|
||||
for (dp = dtab; dp != 0; dp = dp->d_next) {
|
||||
if (eq(dp->d_name, fl->f_needs)) {
|
||||
if ((dp->d_type & TYPEMASK) == PSEUDO_DEVICE)
|
||||
dp->d_type |= DEVDONE;
|
||||
else if ((dp->d_type & TYPEMASK) == DEVICE)
|
||||
if ((dp->d_type & TYPEMASK) == DEVICE)
|
||||
dp->d_type |= DEVDONE;
|
||||
}
|
||||
}
|
||||
@ -76,11 +74,6 @@ headers()
|
||||
}
|
||||
}
|
||||
for (dp = dtab; dp != 0; dp = dp->d_next) {
|
||||
if ((dp->d_type & TYPEMASK) == PSEUDO_DEVICE) {
|
||||
if (!(dp->d_type & DEVDONE))
|
||||
printf("Warning: pseudo-device \"%s\" is unknown\n",
|
||||
dp->d_name);
|
||||
}
|
||||
if ((dp->d_type & TYPEMASK) == DEVICE) {
|
||||
if (!(dp->d_type & DEVDONE))
|
||||
printf("Warning: device \"%s\" is unknown\n",
|
||||
@ -94,11 +87,10 @@ headers()
|
||||
* whatever the device is connected to
|
||||
*/
|
||||
static void
|
||||
do_count(dev)
|
||||
register char *dev;
|
||||
do_count(char *dev)
|
||||
{
|
||||
register struct device *dp;
|
||||
register int count, hicount;
|
||||
struct device *dp;
|
||||
int count, hicount;
|
||||
|
||||
/*
|
||||
* After this loop, "count" will be the actual number of units,
|
||||
@ -106,29 +98,17 @@ do_count(dev)
|
||||
* must use this higher of these values.
|
||||
*/
|
||||
for (hicount = count = 0, dp = dtab; dp != 0; dp = dp->d_next) {
|
||||
if (dp->d_unit != -1 && eq(dp->d_name, dev)) {
|
||||
if ((dp->d_type & TYPEMASK) == PSEUDO_DEVICE) {
|
||||
count =
|
||||
dp->d_count != UNKNOWN ? dp->d_count : 1;
|
||||
break;
|
||||
}
|
||||
count++;
|
||||
/*
|
||||
* Allow holes in unit numbering,
|
||||
* assumption is unit numbering starts
|
||||
* at zero.
|
||||
*/
|
||||
if (dp->d_unit + 1 > hicount)
|
||||
hicount = dp->d_unit + 1;
|
||||
if (eq(dp->d_name, dev)) {
|
||||
count =
|
||||
dp->d_count != UNKNOWN ? dp->d_count : 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
do_header(dev, count > hicount ? count : hicount);
|
||||
do_header(dev, count);
|
||||
}
|
||||
|
||||
static void
|
||||
do_header(dev, count)
|
||||
char *dev;
|
||||
int count;
|
||||
do_header(char *dev, int count)
|
||||
{
|
||||
char *file, *name, *inw;
|
||||
struct file_list *fl, *fl_head, *tflp;
|
||||
@ -207,8 +187,7 @@ do_header(dev, count)
|
||||
* convert a dev name to a .h file name
|
||||
*/
|
||||
static char *
|
||||
toheader(dev)
|
||||
char *dev;
|
||||
toheader(char *dev)
|
||||
{
|
||||
static char hbuf[80];
|
||||
|
||||
@ -221,11 +200,10 @@ toheader(dev)
|
||||
* convert a dev name to a macro name
|
||||
*/
|
||||
static char *
|
||||
tomacro(dev)
|
||||
register char *dev;
|
||||
tomacro(char *dev)
|
||||
{
|
||||
static char mbuf[20];
|
||||
register char *cp;
|
||||
char *cp;
|
||||
|
||||
cp = mbuf;
|
||||
*cp++ = 'N';
|
||||
|
@ -1,200 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)mkioconf.c 8.2 (Berkeley) 1/21/94";
|
||||
#endif
|
||||
static const char rcsid[] =
|
||||
"$FreeBSD$";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <err.h>
|
||||
#include <stdio.h>
|
||||
#include "y.tab.h"
|
||||
#include "config.h"
|
||||
|
||||
/*
|
||||
* build the ioconf.c file
|
||||
*/
|
||||
|
||||
static char *
|
||||
devstr(struct device *dp)
|
||||
{
|
||||
static char buf[100];
|
||||
|
||||
if (dp->d_unit >= 0) {
|
||||
snprintf(buf, sizeof(buf), "%s%d", dp->d_name, dp->d_unit);
|
||||
return buf;
|
||||
} else
|
||||
return dp->d_name;
|
||||
}
|
||||
|
||||
static void
|
||||
write_device_resources(FILE *fp, struct device *dp)
|
||||
{
|
||||
int count = 0;
|
||||
char buf[80];
|
||||
|
||||
fprintf(fp, "struct config_resource %s_resources[] = {\n", devstr(dp));
|
||||
if (dp->d_conn) {
|
||||
if (dp->d_connunit >= 0)
|
||||
snprintf(buf, sizeof(buf), "%s%d", dp->d_conn, dp->d_connunit);
|
||||
else
|
||||
snprintf(buf, sizeof(buf), "%s", dp->d_conn);
|
||||
fprintf(fp, "\t{ \"at\",\tRES_STRING,\t{ (long)\"%s\" }},\n", buf);
|
||||
count++;
|
||||
}
|
||||
if (dp->d_drive != -2) {
|
||||
fprintf(fp, "\t{ \"drive\",\tRES_INT,\t{ %d }},\n", dp->d_drive);
|
||||
count++;
|
||||
}
|
||||
if (dp->d_target != -2) {
|
||||
fprintf(fp, "\t{ \"target\",\tRES_INT,\t{ %d }},\n", dp->d_target);
|
||||
count++;
|
||||
}
|
||||
if (dp->d_lun != -2) {
|
||||
fprintf(fp, "\t{ \"lun\",\tRES_INT,\t{ %d }},\n", dp->d_lun);
|
||||
count++;
|
||||
}
|
||||
if (dp->d_bus != -2) {
|
||||
fprintf(fp, "\t{ \"bus\",\tRES_INT,\t{ %d }},\n", dp->d_bus);
|
||||
count++;
|
||||
}
|
||||
if (dp->d_flags) {
|
||||
fprintf(fp, "\t{ \"flags\",\tRES_INT,\t{ 0x%x }},\n", dp->d_flags);
|
||||
count++;
|
||||
}
|
||||
if (dp->d_disabled) {
|
||||
fprintf(fp, "\t{ \"disabled\",\tRES_INT,\t{ %d }},\n", dp->d_disabled);
|
||||
count++;
|
||||
}
|
||||
if (dp->d_port) {
|
||||
fprintf(fp, "\t{ \"port\",\tRES_INT,\t { %s }},\n", dp->d_port);
|
||||
count++;
|
||||
}
|
||||
if (dp->d_portn > 0) {
|
||||
fprintf(fp, "\t{ \"port\",\tRES_INT,\t{ 0x%x }},\n", dp->d_portn);
|
||||
count++;
|
||||
}
|
||||
if (dp->d_maddr > 0) {
|
||||
fprintf(fp, "\t{ \"maddr\",\tRES_INT,\t{ 0x%x }},\n", dp->d_maddr);
|
||||
count++;
|
||||
}
|
||||
if (dp->d_msize > 0) {
|
||||
fprintf(fp, "\t{ \"msize\",\tRES_INT,\t{ 0x%x }},\n", dp->d_msize);
|
||||
count++;
|
||||
}
|
||||
if (dp->d_drq >= 0) {
|
||||
fprintf(fp, "\t{ \"drq\",\tRES_INT,\t{ %d }},\n", dp->d_drq);
|
||||
count++;
|
||||
}
|
||||
if (dp->d_irq > 0) {
|
||||
fprintf(fp, "\t{ \"irq\",\tRES_INT,\t{ %d }},\n", dp->d_irq);
|
||||
count++;
|
||||
}
|
||||
fprintf(fp, "};\n");
|
||||
fprintf(fp, "#define %s_count %d\n", devstr(dp), count);
|
||||
}
|
||||
|
||||
static void
|
||||
write_all_device_resources(FILE *fp)
|
||||
{
|
||||
struct device *dp;
|
||||
|
||||
for (dp = dtab; dp != 0; dp = dp->d_next) {
|
||||
if (dp->d_type != DEVICE)
|
||||
continue;
|
||||
if (dp->d_unit == UNKNOWN)
|
||||
continue;
|
||||
write_device_resources(fp, dp);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
write_devtab(FILE *fp)
|
||||
{
|
||||
struct device *dp;
|
||||
int count;
|
||||
|
||||
write_all_device_resources(fp);
|
||||
|
||||
count = 0;
|
||||
fprintf(fp, "struct config_device config_devtab[] = {\n");
|
||||
for (dp = dtab; dp != 0; dp = dp->d_next) {
|
||||
char* n = devstr(dp);
|
||||
if (dp->d_type != DEVICE)
|
||||
continue;
|
||||
if (dp->d_unit == UNKNOWN)
|
||||
continue;
|
||||
fprintf(fp, "\t{ \"%s\",\t%d,\t%s_count,\t%s_resources },\n",
|
||||
dp->d_name, dp->d_unit, n, n);
|
||||
count++;
|
||||
}
|
||||
fprintf(fp, "};\n");
|
||||
fprintf(fp, "int devtab_count = %d;\n", count);
|
||||
}
|
||||
|
||||
void
|
||||
newbus_ioconf()
|
||||
{
|
||||
FILE *fp;
|
||||
|
||||
fp = fopen(path("ioconf.c.new"), "w");
|
||||
if (fp == 0)
|
||||
err(1, "%s", path("ioconf.c.new"));
|
||||
fprintf(fp, "/*\n");
|
||||
fprintf(fp, " * I/O configuration.\n");
|
||||
fprintf(fp, " * DO NOT EDIT-- this file is automatically generated.\n");
|
||||
fprintf(fp, " */\n");
|
||||
fprintf(fp, "\n");
|
||||
fprintf(fp, "#include <sys/param.h>\n");
|
||||
fprintf(fp, "\n");
|
||||
fprintf(fp, "/*\n");
|
||||
fprintf(fp, " * New bus architecture devices.\n");
|
||||
fprintf(fp, " */\n");
|
||||
fprintf(fp, "\n");
|
||||
fprintf(fp, "#include <sys/queue.h>\n");
|
||||
fprintf(fp, "#include <sys/sysctl.h>\n");
|
||||
if (machine == MACHINE_PC98)
|
||||
fprintf(fp, "#include <pc98/pc98/pc98.h>\n");
|
||||
else
|
||||
fprintf(fp, "#include <isa/isareg.h>\n");
|
||||
fprintf(fp, "#include <sys/bus_private.h>\n");
|
||||
fprintf(fp, "\n");
|
||||
|
||||
write_devtab(fp);
|
||||
|
||||
(void) fclose(fp);
|
||||
moveifchanged(path("ioconf.c.new"), path("ioconf.c"));
|
||||
}
|
@ -54,14 +54,14 @@ static const char rcsid[] =
|
||||
#include "configvers.h"
|
||||
|
||||
#define next_word(fp, wd) \
|
||||
{ register char *word = get_word(fp); \
|
||||
{ char *word = get_word(fp); \
|
||||
if (word == (char *)EOF) \
|
||||
return; \
|
||||
else \
|
||||
wd = word; \
|
||||
}
|
||||
#define next_quoted_word(fp, wd) \
|
||||
{ register char *word = get_quoted_word(fp); \
|
||||
{ char *word = get_quoted_word(fp); \
|
||||
if (word == (char *)EOF) \
|
||||
return; \
|
||||
else \
|
||||
@ -70,25 +70,24 @@ static const char rcsid[] =
|
||||
|
||||
static struct file_list *fcur;
|
||||
|
||||
static char *tail __P((char *));
|
||||
static void do_clean __P((FILE *));
|
||||
static void do_rules __P((FILE *));
|
||||
static void do_sfiles __P((FILE *));
|
||||
static void do_mfiles __P((FILE *));
|
||||
static void do_cfiles __P((FILE *));
|
||||
static void do_objs __P((FILE *));
|
||||
static void do_before_depend __P((FILE *));
|
||||
static int opteq __P((char *, char *));
|
||||
static void read_files __P((void));
|
||||
static char *tail(char *);
|
||||
static void do_clean(FILE *);
|
||||
static void do_rules(FILE *);
|
||||
static void do_sfiles(FILE *);
|
||||
static void do_mfiles(FILE *);
|
||||
static void do_cfiles(FILE *);
|
||||
static void do_objs(FILE *);
|
||||
static void do_before_depend(FILE *);
|
||||
static int opteq(char *, char *);
|
||||
static void read_files(void);
|
||||
|
||||
/*
|
||||
* Lookup a file, by name.
|
||||
*/
|
||||
static struct file_list *
|
||||
fl_lookup(file)
|
||||
register char *file;
|
||||
fl_lookup(char *file)
|
||||
{
|
||||
register struct file_list *fp;
|
||||
struct file_list *fp;
|
||||
|
||||
for (fp = ftab ; fp != 0; fp = fp->f_next) {
|
||||
if (eq(fp->f_fn, file))
|
||||
@ -101,10 +100,9 @@ fl_lookup(file)
|
||||
* Lookup a file, by final component name.
|
||||
*/
|
||||
static struct file_list *
|
||||
fltail_lookup(file)
|
||||
register char *file;
|
||||
fltail_lookup(char *file)
|
||||
{
|
||||
register struct file_list *fp;
|
||||
struct file_list *fp;
|
||||
|
||||
for (fp = ftab ; fp != 0; fp = fp->f_next) {
|
||||
if (eq(tail(fp->f_fn), tail(file)))
|
||||
@ -117,9 +115,9 @@ fltail_lookup(file)
|
||||
* Make a new file list entry
|
||||
*/
|
||||
static struct file_list *
|
||||
new_fent()
|
||||
new_fent(void)
|
||||
{
|
||||
register struct file_list *fp;
|
||||
struct file_list *fp;
|
||||
|
||||
fp = (struct file_list *) malloc(sizeof *fp);
|
||||
bzero(fp, sizeof *fp);
|
||||
@ -135,12 +133,13 @@ new_fent()
|
||||
* Build the makefile from the skeleton
|
||||
*/
|
||||
void
|
||||
makefile()
|
||||
makefile(void)
|
||||
{
|
||||
FILE *ifp, *ofp;
|
||||
char line[BUFSIZ];
|
||||
struct opt *op;
|
||||
int versreq;
|
||||
char *s;
|
||||
|
||||
read_files();
|
||||
snprintf(line, sizeof(line), "../../conf/Makefile.%s", machinename);
|
||||
@ -216,6 +215,54 @@ makefile()
|
||||
(void) fclose(ofp);
|
||||
moveifchanged(path("Makefile.new"), path("Makefile"));
|
||||
|
||||
if (hints) {
|
||||
ifp = fopen(hints, "r");
|
||||
if (ifp == NULL)
|
||||
err(1, "%s", hints);
|
||||
} else {
|
||||
ifp = NULL;
|
||||
}
|
||||
ofp = fopen(path("hints.c.new"), "w");
|
||||
if (ofp == NULL)
|
||||
err(1, "%s", path("hints.c.new"));
|
||||
fprintf(ofp, "char static_hints[] = {\n");
|
||||
if (ifp) {
|
||||
while (fgets(line, BUFSIZ, ifp) != 0) {
|
||||
/* zap trailing CR and/or LF */
|
||||
while ((s = rindex(line, '\n')) != NULL)
|
||||
*s = '\0';
|
||||
while ((s = rindex(line, '\r')) != NULL)
|
||||
*s = '\0';
|
||||
/* remove # comments */
|
||||
s = index(line, '#');
|
||||
if (s)
|
||||
*s = '\0';
|
||||
/* remove any whitespace and " characters */
|
||||
s = line;
|
||||
while (*s) {
|
||||
if (*s == ' ' || *s == '\t' || *s == '"') {
|
||||
while (*s) {
|
||||
s[0] = s[1];
|
||||
s++;
|
||||
}
|
||||
/* start over */
|
||||
s = line;
|
||||
continue;
|
||||
}
|
||||
s++;
|
||||
}
|
||||
/* anything left? */
|
||||
if (*line == '\0')
|
||||
break;
|
||||
fprintf(ofp, "\"%s\\0\"\n", line);
|
||||
}
|
||||
}
|
||||
fprintf(ofp, "\"\\0\"\n};\n");
|
||||
if (ifp)
|
||||
fclose(ifp);
|
||||
fclose(ofp);
|
||||
moveifchanged(path("hints.c.new"), path("hints.c"));
|
||||
|
||||
printf("Don't forget to do a ``make depend''\n");
|
||||
}
|
||||
|
||||
@ -224,13 +271,13 @@ makefile()
|
||||
* Store it in the ftab linked list.
|
||||
*/
|
||||
static void
|
||||
read_files()
|
||||
read_files(void)
|
||||
{
|
||||
FILE *fp;
|
||||
register struct file_list *tp, *pf;
|
||||
register struct device *dp;
|
||||
struct file_list *tp, *pf;
|
||||
struct device *dp;
|
||||
struct device *save_dp;
|
||||
register struct opt *op;
|
||||
struct opt *op;
|
||||
char *wd, *this, *needs, *special, *depends, *clean, *warn;
|
||||
char fname[80];
|
||||
int ddwarned = 0;
|
||||
@ -250,7 +297,7 @@ read_files()
|
||||
err(1, "%s", fname);
|
||||
next:
|
||||
/*
|
||||
* filename [ standard | mandatory | optional | count]
|
||||
* filename [ standard | mandatory | optional | count ]
|
||||
* [ config-dependent ]
|
||||
* [ dev* | profiling-routine ] [ no-obj ]
|
||||
* [ compile-with "compile rule" [no-implicit-rule] ]
|
||||
@ -428,7 +475,7 @@ read_files()
|
||||
goto invis;
|
||||
for (dp = dtab; dp != 0; save_dp = dp, dp = dp->d_next)
|
||||
if (eq(dp->d_name, wd)) {
|
||||
if (std && dp->d_type == PSEUDO_DEVICE &&
|
||||
if (std && dp->d_type == DEVICE &&
|
||||
dp->d_count <= 0)
|
||||
dp->d_count = 1;
|
||||
goto nextparam;
|
||||
@ -441,9 +488,8 @@ read_files()
|
||||
if (std) {
|
||||
dp = (struct device *) malloc(sizeof *dp);
|
||||
bzero(dp, sizeof *dp);
|
||||
init_dev(dp);
|
||||
dp->d_type = DEVICE;
|
||||
dp->d_name = ns(wd);
|
||||
dp->d_type = PSEUDO_DEVICE;
|
||||
dp->d_count = 1;
|
||||
save_dp->d_next = dp;
|
||||
goto nextparam;
|
||||
@ -517,8 +563,7 @@ read_files()
|
||||
}
|
||||
|
||||
static int
|
||||
opteq(cp, dp)
|
||||
char *cp, *dp;
|
||||
opteq(char *cp, char *dp)
|
||||
{
|
||||
char c, d;
|
||||
|
||||
@ -535,11 +580,10 @@ opteq(cp, dp)
|
||||
}
|
||||
|
||||
static void
|
||||
do_before_depend(fp)
|
||||
FILE *fp;
|
||||
do_before_depend(FILE *fp)
|
||||
{
|
||||
register struct file_list *tp;
|
||||
register int lpos, len;
|
||||
struct file_list *tp;
|
||||
int lpos, len;
|
||||
|
||||
fputs("BEFORE_DEPEND=", fp);
|
||||
lpos = 15;
|
||||
@ -561,12 +605,11 @@ do_before_depend(fp)
|
||||
}
|
||||
|
||||
static void
|
||||
do_objs(fp)
|
||||
FILE *fp;
|
||||
do_objs(FILE *fp)
|
||||
{
|
||||
register struct file_list *tp;
|
||||
register int lpos, len;
|
||||
register char *cp, och, *sp;
|
||||
struct file_list *tp;
|
||||
int lpos, len;
|
||||
char *cp, och, *sp;
|
||||
|
||||
fprintf(fp, "OBJS=");
|
||||
lpos = 6;
|
||||
@ -590,11 +633,10 @@ do_objs(fp)
|
||||
}
|
||||
|
||||
static void
|
||||
do_cfiles(fp)
|
||||
FILE *fp;
|
||||
do_cfiles(FILE *fp)
|
||||
{
|
||||
register struct file_list *tp;
|
||||
register int lpos, len;
|
||||
struct file_list *tp;
|
||||
int lpos, len;
|
||||
|
||||
fputs("CFILES=", fp);
|
||||
lpos = 8;
|
||||
@ -619,11 +661,10 @@ do_cfiles(fp)
|
||||
}
|
||||
|
||||
static void
|
||||
do_mfiles(fp)
|
||||
FILE *fp;
|
||||
do_mfiles(FILE *fp)
|
||||
{
|
||||
register struct file_list *tp;
|
||||
register int lpos, len;
|
||||
struct file_list *tp;
|
||||
int lpos, len;
|
||||
|
||||
fputs("MFILES=", fp);
|
||||
lpos = 8;
|
||||
@ -644,11 +685,10 @@ do_mfiles(fp)
|
||||
}
|
||||
|
||||
static void
|
||||
do_sfiles(fp)
|
||||
FILE *fp;
|
||||
do_sfiles(FILE *fp)
|
||||
{
|
||||
register struct file_list *tp;
|
||||
register int lpos, len;
|
||||
struct file_list *tp;
|
||||
int lpos, len;
|
||||
|
||||
fputs("SFILES=", fp);
|
||||
lpos = 8;
|
||||
@ -668,12 +708,10 @@ do_sfiles(fp)
|
||||
putc('\n', fp);
|
||||
}
|
||||
|
||||
|
||||
static char *
|
||||
tail(fn)
|
||||
char *fn;
|
||||
tail(char *fn)
|
||||
{
|
||||
register char *cp;
|
||||
char *cp;
|
||||
|
||||
cp = rindex(fn, '/');
|
||||
if (cp == 0)
|
||||
@ -689,11 +727,10 @@ tail(fn)
|
||||
* (e.g. for the VAX); assembler files are processed by as.
|
||||
*/
|
||||
static void
|
||||
do_rules(f)
|
||||
FILE *f;
|
||||
do_rules(FILE *f)
|
||||
{
|
||||
register char *cp, *np, och, *tp;
|
||||
register struct file_list *ftp;
|
||||
char *cp, *np, och, *tp;
|
||||
struct file_list *ftp;
|
||||
char *special;
|
||||
|
||||
for (ftp = ftab; ftp != 0; ftp = ftp->f_next) {
|
||||
@ -755,11 +792,10 @@ do_rules(f)
|
||||
}
|
||||
|
||||
static void
|
||||
do_clean(fp)
|
||||
FILE *fp;
|
||||
do_clean(FILE *fp)
|
||||
{
|
||||
register struct file_list *tp;
|
||||
register int lpos, len;
|
||||
struct file_list *tp;
|
||||
int lpos, len;
|
||||
|
||||
fputs("CLEAN=", fp);
|
||||
lpos = 7;
|
||||
@ -778,10 +814,9 @@ do_clean(fp)
|
||||
}
|
||||
|
||||
char *
|
||||
raisestr(str)
|
||||
register char *str;
|
||||
raisestr(char *str)
|
||||
{
|
||||
register char *cp = str;
|
||||
char *cp = str;
|
||||
|
||||
while (*str) {
|
||||
if (islower(*str))
|
||||
|
@ -62,13 +62,13 @@ static struct users {
|
||||
};
|
||||
#define NUSERS (sizeof (users) / sizeof (users[0]))
|
||||
|
||||
static char *lower __P((char *));
|
||||
static void read_options __P((void));
|
||||
static void do_option __P((char *));
|
||||
static char *tooption __P((char *));
|
||||
static char *lower(char *);
|
||||
static void read_options(void);
|
||||
static void do_option(char *);
|
||||
static char *tooption(char *);
|
||||
|
||||
void
|
||||
options()
|
||||
options(void)
|
||||
{
|
||||
char buf[40];
|
||||
struct cputype *cp;
|
||||
@ -126,8 +126,7 @@ options()
|
||||
*/
|
||||
|
||||
static void
|
||||
do_option(name)
|
||||
char *name;
|
||||
do_option(char *name)
|
||||
{
|
||||
char *basefile, *file, *inw;
|
||||
struct opt_list *ol;
|
||||
@ -272,8 +271,7 @@ do_option(name)
|
||||
* Find the filename to store the option spec into.
|
||||
*/
|
||||
static char *
|
||||
tooption(name)
|
||||
char *name;
|
||||
tooption(char *name)
|
||||
{
|
||||
static char hbuf[80];
|
||||
char nbuf[80];
|
||||
@ -297,7 +295,7 @@ tooption(name)
|
||||
* read the options and options.<machine> files
|
||||
*/
|
||||
static void
|
||||
read_options()
|
||||
read_options(void)
|
||||
{
|
||||
FILE *fp;
|
||||
char fname[80];
|
||||
@ -378,10 +376,9 @@ read_options()
|
||||
}
|
||||
|
||||
static char *
|
||||
lower(str)
|
||||
register char *str;
|
||||
lower(char *str)
|
||||
{
|
||||
register char *cp = str;
|
||||
char *cp = str;
|
||||
|
||||
while (*str) {
|
||||
if (isupper(*str))
|
||||
@ -390,4 +387,3 @@ lower(str)
|
||||
}
|
||||
return (cp);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user