This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
include(MAKEDEV.sub)dnl
|
|
|
|
dnl
|
2004-02-13 15:34:13 -08:00
|
|
|
vers(a, {-$OpenBSD: MAKEDEV.mi,v 1.70 2004/02/13 23:34:13 miod Exp $-})dnl
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl
|
|
|
|
divert(1)dnl
|
|
|
|
{-#-}
|
2003-06-18 11:08:59 -07:00
|
|
|
{-#-} Copyright (c) 2001,2002,2003 Todd T. Fries <todd@OpenBSD.org>
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
{-#-}
|
2003-06-18 11:08:59 -07:00
|
|
|
{-#-} Permission to use, copy, modify, and distribute this software for any
|
|
|
|
{-#-} purpose with or without fee is hereby granted, provided that the above
|
|
|
|
{-#-} copyright notice and this permission notice appear in all copies.
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
{-#-}
|
2003-06-18 11:08:59 -07:00
|
|
|
{-#-} THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
|
|
{-#-} WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
|
|
{-#-} MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
|
|
{-#-} ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
|
{-#-} WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
|
|
{-#-} ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
|
|
{-#-} OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
{-#-}
|
|
|
|
dnl
|
|
|
|
dnl Diversions: (upon termination, concatenated output queues)
|
|
|
|
dnl
|
|
|
|
dnl 0 - very top
|
|
|
|
dnl 1 - descriptions of devices
|
|
|
|
dnl 2 - init of script, function definitions, etc
|
|
|
|
dnl 3 - beginning of global recursive R() function
|
|
|
|
dnl 7 - body of MAKEDEV, device creations, etc
|
|
|
|
dnl 9 - end
|
|
|
|
dnl
|
|
|
|
dnl HOW TO ADD A DEVICE:
|
|
|
|
dnl
|
|
|
|
dnl In this file, you must use at least two macros:
|
|
|
|
dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
dnl Use '__devitem(uniqueid, name-pattern, description)' to create an entry
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl in the description at the top of the generated MAKEDEV file:
|
|
|
|
dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
dnl __devitem(sca, sca*, Sugar Generic device)dnl
|
2002-02-24 17:10:26 -08:00
|
|
|
dnl __devitem(cry, crypto, hardware crypto access driver)dnl
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl
|
|
|
|
dnl This is ultimately shown as:
|
|
|
|
dnl
|
|
|
|
dnl # sca* Sugar Generic device
|
2002-02-24 17:10:26 -08:00
|
|
|
dnl # crypto hardware crypto access driver
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
dnl Use '_mkdev(uniqueid, shell-pattern, {-shell-script-})dnl' to create
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl a shell script fragment used to 'create' the device (be sure to match
|
|
|
|
dnl the uniqueid from above):
|
|
|
|
dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
dnl _mkdev(sca, sca*, {-M sca$U c major_sca_c $U
|
|
|
|
dnl M rsca$U b major_sca_b Add($U, 128)-})dnl
|
2002-02-24 17:10:26 -08:00
|
|
|
dnl _mkdev(cry, crypto, {-M crypto c major_cry_c 0-})dnl
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl
|
|
|
|
dnl This is ultimately expanded into:
|
|
|
|
dnl
|
2002-02-24 17:10:26 -08:00
|
|
|
dnl sca*)
|
|
|
|
dnl M sca$U c 24 $U
|
|
|
|
dnl M sca$U b 42 $(($U+128))
|
|
|
|
dnl ;;
|
|
|
|
dnl
|
|
|
|
dnl crypto)
|
|
|
|
dnl M crypto c 47 0
|
|
|
|
dnl ;;
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
dnl In the MAKEDEV.md file, add a '_DEV(uniqueid, charmajor, blockmajor)'
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl entry:
|
|
|
|
dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
dnl _DEV(sca, 24, 42)
|
2002-02-24 17:10:26 -08:00
|
|
|
dnl _DEV(cry, 47)
|
|
|
|
dnl
|
|
|
|
dnl Final step is to use the 'target/twrget' macros to have the 'all)' target
|
|
|
|
dnl generate one or more device(s). Usage of 'target/twrget' is:
|
|
|
|
dnl target(target_name, device_name [, append_string ] .. )
|
|
|
|
dnl twrget(target_name, uniqueid, device_name, [, append_string ] .. )
|
|
|
|
dnl
|
|
|
|
dnl target_name a unique name that later is used as an argument to
|
|
|
|
dnl 'show_target()' (which expands all devices for a
|
|
|
|
dnl given 'target_name').
|
|
|
|
dnl uniqueid same as 'uniqueid' above
|
|
|
|
dnl device_name string representing the device to be mknod'ed
|
|
|
|
dnl append_string for each append_string, `device_name' is prepended
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl
|
2002-02-24 17:10:26 -08:00
|
|
|
dnl Note: 'target(a,b,c)' is equivalent to 'twrget(a,b,b,c)'
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl
|
2002-02-24 17:10:26 -08:00
|
|
|
dnl
|
|
|
|
dnl For a short example:
|
|
|
|
dnl
|
|
|
|
dnl target(all, std)dnl
|
|
|
|
dnl target(all, sca, 0, 1, 2, 3)dnl
|
|
|
|
dnl twrget(all, cry, crypto)dnl
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl
|
|
|
|
dnl would expand to:
|
|
|
|
dnl
|
|
|
|
dnl all)
|
2002-02-24 17:10:26 -08:00
|
|
|
dnl R std sca0 sca1 sca2 sca3 crypto
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl ;;
|
|
|
|
dnl
|
2002-02-24 17:10:26 -08:00
|
|
|
dnl presuming '_DEV(sca, ?, ?)' and '_DEV(std)' were in the MAKEDEV.md file.
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl
|
|
|
|
dnl
|
|
|
|
dnl Everything is 'automatically' added to 'MAKEDEV' based on whether or
|
|
|
|
dnl not the '_DEV()' entry has a corresponding _mkdev() and __devitem()
|
2002-02-24 17:10:26 -08:00
|
|
|
dnl entry in MAKEDEV.mi (this file).
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl
|
|
|
|
dnl Note: be very wary of adding whitespace, carriage returns, or not
|
|
|
|
dnl finishing a macro with ')dnl' .. otherwise, extra blank lines show up
|
|
|
|
dnl in the output.
|
|
|
|
dnl
|
2002-02-14 09:44:38 -08:00
|
|
|
dnl TODO:
|
|
|
|
dnl
|
|
|
|
dnl make a 'disktgt' macro that automatically does:
|
2002-02-16 21:14:30 -08:00
|
|
|
dnl disktgt(rd, {-rd-})
|
2002-02-14 09:44:38 -08:00
|
|
|
dnl
|
|
|
|
dnl target(all,rd,0)
|
|
|
|
dnl target(ramd,rd,0)
|
|
|
|
dnl disk_q(rd)
|
2002-02-16 21:14:30 -08:00
|
|
|
dnl __devitem(rd, {-rd*-}, {-rd-})dnl
|
2002-02-14 09:44:38 -08:00
|
|
|
dnl
|
2002-02-24 17:10:26 -08:00
|
|
|
dnl Note: not all disks are generated in 'all)'. (e.g. vax has a lot of
|
|
|
|
dnl disks that are not generated by 'all)')
|
|
|
|
dnl
|
2002-02-14 09:44:38 -08:00
|
|
|
dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
_mkdev(loc, local, {-test -s $T.local && sh $T.local-})dnl
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
__devtitle(make, Device "make" file. Valid arguments)dnl
|
|
|
|
__devitem({-all-}, {-all-},
|
2002-01-06 22:13:30 -08:00
|
|
|
{-makes all known devices{-,-} including local devices.
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
{-#-} Tries to make the ``standard'' number of each type.-})dnl
|
|
|
|
dnl
|
|
|
|
dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
target(all, mcd, 0)dnl
|
|
|
|
twrget(all, fdesc, fd)dnl
|
|
|
|
target(all, st, 0, 1)dnl
|
|
|
|
target(all, std)dnl
|
|
|
|
target(all, raid, 0, 1, 2, 3)dnl
|
|
|
|
target(all, rz, 0, 1, 2, 3, 4)dnl
|
|
|
|
target(all, hp, 0, 1, 2, 3)dnl
|
|
|
|
target(all, ra, 0, 1, 2, 3)dnl
|
|
|
|
target(all, rx, 0, 1)dnl
|
|
|
|
target(all, wd, 0, 1, 2, 3)dnl
|
|
|
|
target(all, xd, 0, 1, 2, 3)dnl
|
|
|
|
twrget(all, aflo, fd, 0, 1, 2, 3)dnl
|
2002-05-16 09:18:44 -07:00
|
|
|
target(all, systrace)dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
target(all, pctr)dnl
|
|
|
|
target(all, pctr0)dnl
|
|
|
|
target(all, pf)dnl
|
|
|
|
twrget(all, cry, crypto)dnl
|
|
|
|
target(all, apm)dnl
|
|
|
|
twrget(all, tth, ttyh, 0, 1)dnl
|
|
|
|
target(all, ttyA, 0, 1)dnl
|
|
|
|
target(all, ttyB, 0, 1, 2, 3, 4, 5)dnl
|
2002-02-21 10:36:54 -08:00
|
|
|
twrget(all, attyB, ttyB, 0, 1, 2, 3, 4)dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
target(all, tty0, 0, 1, 2, 3)dnl
|
|
|
|
twrget(all, mac_tty0, tty0, 0, 1)dnl
|
|
|
|
twrget(all, tzs, tty, a, b, c, d)dnl
|
|
|
|
twrget(all, czs, cua, a, b, c, d)dnl
|
|
|
|
target(all, ttyc, 0, 1, 2, 3, 4, 5, 6, 7)dnl
|
|
|
|
twrget(all, com, tty0, 0, 1, 2, 3)dnl
|
|
|
|
target(all, lkm)dnl
|
|
|
|
twrget(all, mmcl, mmclock)dnl
|
|
|
|
target(all, lpt, 0, 1, 2)dnl
|
|
|
|
twrget(all, lpt, lpa, 0, 1, 2)dnl
|
|
|
|
target(all, joy, 0, 1)dnl
|
2002-02-24 17:10:26 -08:00
|
|
|
twrget(all, rnd, random)dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
target(all, uk, 0)dnl
|
|
|
|
target(all, wt, 0)dnl
|
|
|
|
target(all, wdt, 0)dnl
|
|
|
|
twrget(all, au, audio, 0)dnl
|
|
|
|
twrget(all, speak, speaker)dnl
|
|
|
|
target(all, asc, 0)dnl
|
|
|
|
target(all, music, 0)dnl
|
|
|
|
target(all, radio, 0)dnl
|
|
|
|
target(all, tuner, 0)dnl
|
|
|
|
target(all, rmidi, 0, 1, 2, 3, 4, 5, 6, 7)dnl
|
|
|
|
target(all, usbs)dnl
|
|
|
|
target(all, adb)dnl
|
|
|
|
target(all, iop, 0, 1)dnl
|
|
|
|
target(all, pci)dnl
|
|
|
|
twrget(all, wsmouse, wscons)dnl
|
2002-02-21 10:36:54 -08:00
|
|
|
twrget(all, grf_mac, grf, 0, 1, 2, 3)dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
target(all, par, 0)dnl
|
|
|
|
twrget(all, amouse, mouse, 0, 1)dnl
|
|
|
|
twrget(all, akbd, kbd)dnl
|
|
|
|
target(all, apci, 0)dnl
|
|
|
|
target(all, ppi, 0)dnl
|
|
|
|
target(all, view0, 0, 1, 2, 3, 4, 5)dnl
|
|
|
|
target(all, local)dnl
|
2002-06-17 17:53:45 -07:00
|
|
|
target(all, gpr, 0)dnl
|
2004-02-09 17:31:20 -08:00
|
|
|
target(all, ptm)dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
dnl
|
|
|
|
_mkdev(all, {-all-}, {-dnl
|
2002-01-22 22:10:35 -08:00
|
|
|
show_target(all)dnl
|
|
|
|
-})dnl
|
|
|
|
dnl
|
2002-02-16 21:14:30 -08:00
|
|
|
__devitem(ramdisk, ramdisk, devices to be put on ramdisk-based media)dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
__devitem(std, {-std-}, standard devices)dnl
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl
|
2002-01-22 22:10:35 -08:00
|
|
|
dnl
|
|
|
|
dnl
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl _std
|
|
|
|
dnl
|
|
|
|
dnl $1: tty
|
|
|
|
dnl $2: memstuff
|
|
|
|
dnl $3: ksyms
|
|
|
|
dnl $4: drum
|
|
|
|
dnl $5: klog
|
|
|
|
dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
define({-_std-}, {-dnl
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
std)
|
|
|
|
M console c 0 0 600
|
|
|
|
M tty c $1 0
|
|
|
|
M mem c $2 0 640 kmem
|
|
|
|
M kmem c $2 1 640 kmem
|
|
|
|
M null c $2 2
|
|
|
|
M zero c $2 12
|
|
|
|
M stdin c major_fdesc_c 0
|
|
|
|
M stdout c major_fdesc_c 1
|
|
|
|
M stderr c major_fdesc_c 2
|
|
|
|
M ksyms c $3 0 640 kmem
|
|
|
|
M drum c $4 0 640 kmem
|
|
|
|
M klog c $5 0 600-})dnl
|
|
|
|
dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
target(usb, usb, 0, 1)dnl
|
|
|
|
target(usb, urio, 0)dnl
|
|
|
|
twrget(usb, uscan, uscanner, 0)dnl
|
|
|
|
target(usb, uhid, 0, 1, 2, 3)dnl
|
|
|
|
target(usb, ulpt, 0, 1)dnl
|
|
|
|
target(usb, ugen, 0, 1)dnl
|
2004-01-12 14:18:23 -08:00
|
|
|
target(usb, ttyU, 0, 1)dnl
|
2002-01-22 22:10:35 -08:00
|
|
|
dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
__devitem({-usbs-}, usbs, make USB devices)dnl
|
|
|
|
_mkdev(usbs, usbs, {-dnl
|
2002-01-22 22:10:35 -08:00
|
|
|
show_target({-usb-})dnl
|
|
|
|
-})dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
__devtitle(tap, Tapes)dnl
|
|
|
|
__devitem(wt, {-wt* -}, QIC-interface (e.g. not SCSI) 3M cartridge tape)dnl
|
|
|
|
_mkdev(wt, wt*,
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
{-name=wt
|
2002-02-13 21:38:22 -08:00
|
|
|
n=Mult($U, 8) m=Add($n, 4)
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
M $name$U b major_wt_b $n 640 operator
|
|
|
|
M r$name$U c major_wt_c $n 640 operator
|
|
|
|
M n$name$U b major_wt_b $m 640 operator
|
|
|
|
M nr$name$U c major_wt_c $m 640 operator-})dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
__devitem(tz, tz*, {-SCSI tapes{-,-} DEC TK50 cartridge tape-})dnl
|
|
|
|
__devitem(st, {-st*-}, SCSI tapes)dnl
|
|
|
|
_mkdev(st, st*, {-n=Mult($U, 16)
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
for pre in " " n e en
|
|
|
|
do
|
|
|
|
M ${pre}st$U b major_st_b $n 660 operator
|
|
|
|
M ${pre}rst$U c major_st_c $n 660 operator
|
2002-02-13 21:38:22 -08:00
|
|
|
n=Add($n, 1)
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
done-})dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
__devitem(ct, ct*, HP300 HP-IB cartridge tape)dnl
|
|
|
|
__devitem(mt, mt*, (Magnetic) 9-track reel tape)dnl
|
|
|
|
__devitem(ht, ht*, massbus tm03 & tu??)dnl
|
|
|
|
__devitem(tm, tm*, unibus tm11 & te10 emulations (e.g. Emulex tc-11))dnl
|
|
|
|
__devitem(ts, ts*, unibus ts11)dnl
|
|
|
|
__devitem(ut, ut*, unibus tu45 emulations (e.g.si 9700))dnl
|
|
|
|
__devtitle(dis, Disks)dnl
|
|
|
|
__devitem(rz, rz*, SCSI disks)dnl
|
2002-02-14 09:44:38 -08:00
|
|
|
__devitem(sd, {-sd*-}, {-SCSI disks, includes flopticals-})dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
__devitem(hd, {-hd*-}, HP300 HP-IB disks)dnl
|
|
|
|
__devitem(cd, {-cd*-}, SCSI cdrom drives)dnl
|
|
|
|
__devitem(acd, acd*, ATAPI cdrom drives)dnl
|
|
|
|
_mkdev(cd, cd*, {-dodisk2 cd $U major_cd_b major_cd_c $U 0{--}ifstep(cd)-})dnl
|
|
|
|
__devitem(mcd, mcd*, Mitsumi cdrom drives)dnl
|
|
|
|
_mkdev(mcd, mcd*, {-dodisk2 mcd $U major_mcd_b major_mcd_c $U 0{--}ifstep(mcd)dnl
|
2002-01-06 22:54:10 -08:00
|
|
|
-})dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
__devitem(ch, {-ch*-}, SCSI media changer)dnl
|
|
|
|
_mcdev(ch, ch*, ch, {-major_ch_c-}, 660, operator)dnl
|
|
|
|
__devitem(uk, uk*, SCSI Unknown device)dnl
|
|
|
|
_mcdev(uk, uk*, uk, {-major_uk_c-}, 640, operator)dnl
|
|
|
|
__devitem(ss, ss*, SCSI scanners)dnl
|
2002-02-14 09:44:38 -08:00
|
|
|
_mkdev(ss, ss*, {-M ss$U c major_ss_c Mult($U,16) 640 operator
|
|
|
|
M nss$U c major_ss_c Add(Mult($U,16),1) 640 operator
|
|
|
|
M enss$U c major_ss_c Add(Mult($U,16),3) 640 operator
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
RMlist="$RMlist scan$U"
|
|
|
|
MKlist="$MKlist;umask 77;ln -s ss$U scan$U"-})dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
__devitem(ses, ses*, SES/SAF-TE SCSI devices)dnl
|
|
|
|
_mkdev(ses, ses*, {-M ses$U c major_ses_c $U 640 operator-})dnl
|
|
|
|
__devitem(ramd, ramdisk, makes all devices for a ramdisk kernel)dnl arc
|
|
|
|
_mkdev(ramd, ramdisk, {-dnl
|
2002-01-22 22:43:53 -08:00
|
|
|
show_target(ramd)dnl
|
|
|
|
-})dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
target(ramd, std)dnl
|
|
|
|
target(ramd, random)dnl
|
|
|
|
target(ramd, bpf, 0)dnl
|
2002-02-16 21:14:30 -08:00
|
|
|
__devitem(rd, {-rd*-}, "rd" pseudo-disks)dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
_mkdev(rd, rd*, {-dodisk2 rd $U major_rd_b major_rd_c $U 0{--}ifstep(rd)-})dnl
|
|
|
|
__devitem(xd, xd*, Xylogic 753/7053 disks)dnl
|
|
|
|
__devitem(xy, xy*, {- Xylogic 450/451 disks-})dnl
|
|
|
|
__devitem(flo, {-fd*-}, {-Floppy disk drives (3 1/2"{-,-} 5 1/4")-})dnl
|
|
|
|
_mkdev(flo, fd*,
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
{-typnam=$U${i#fd[01]*}
|
|
|
|
case $typnam in
|
|
|
|
0|1) typnum=0;; # no type specified, assume A
|
2002-02-10 13:52:30 -08:00
|
|
|
*A) typnum=0; typnam=0;;
|
|
|
|
*B) typnum=1;;
|
|
|
|
*C) typnum=2;;
|
|
|
|
*D) typnum=3;;
|
|
|
|
*E) typnum=4;;
|
|
|
|
*F) typnum=5;;
|
|
|
|
*G) typnum=6;;
|
|
|
|
*H) typnum=7;;
|
|
|
|
*) echo bad type $typnam for $i; exit 1;;
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
esac
|
|
|
|
case $U in
|
|
|
|
0|1) blk=major_flo_b; chr=major_flo_c;;
|
|
|
|
*) echo bad unit $U for $i; exit 1;;
|
|
|
|
esac
|
|
|
|
nam=fd${typnam}
|
2002-02-13 21:38:22 -08:00
|
|
|
n=Add(Mult($U, 128), Mult($typnum, 16))
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
M ${nam}a b $blk $n 640 operator
|
2002-02-13 21:38:22 -08:00
|
|
|
M ${nam}b b $blk Add($n, 1) 640 operator
|
|
|
|
M ${nam}c b $blk Add($n, 2) 640 operator
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
M r${nam}a c $chr $n 640 operator
|
2002-02-13 21:38:22 -08:00
|
|
|
M r${nam}b c $chr Add($n, 1) 640 operator
|
|
|
|
M r${nam}c c $chr Add($n, 2) 640 operator-}, 664)dnl
|
|
|
|
__devitem(aflo, ramdisk, devices needed for install floppies)dnl
|
|
|
|
_mkdev(aflo, fd*, {-case $U in 0|1|2|3)
|
|
|
|
M fd${U}a b major_aflo_b Mult($U, 16) 640 operator
|
|
|
|
M fd${U}b b major_aflo_b Add(Mult($U, 16), 1) 640 operator
|
|
|
|
M rfd${U}a c major_aflo_c Mult($U, 16) 640 operator
|
|
|
|
M rfd${U}b c major_aflo_c Add(Mult($U, 16), 1) 640 operator;;
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
*) echo bad unit for floppy disk in: $i;;
|
|
|
|
esac-})dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
__devitem(iop, iop*, I2O controller device)dnl
|
|
|
|
_mcdev(iop, iop*, iop, {-major_iop_c-}, 660)dnl
|
|
|
|
__devitem(wdt, wdt0, watchdog timer)dnl
|
|
|
|
_mcdev(wdt, wdt0, wdt, {-major_wdt_c-}, 440, operator)dnl
|
|
|
|
__devitem(local, local, configuration specific devices)dnl
|
|
|
|
__devitem(wd, {-wd*-}, {-"winchester" disk drives (ST506, IDE, ESDI, RLL, ...)-})dnl
|
|
|
|
__devitem(ccd, ccd*, concatenated disk devices)dnl
|
|
|
|
__devitem(raid, raid*, RAIDframe disk devices)dnl
|
|
|
|
__devitem(vnd, vnd*, "file" pseudo-disks)dnl
|
|
|
|
_mkdev(vnd, vnd*, {-dodisk vnd $U major_vnd_b major_vnd_c $U 0{--}ifstep(vnd)
|
2003-10-10 20:32:15 -07:00
|
|
|
dodisk svnd $U major_vnd_b major_vnd_c $U 2048{--}ifstep(vnd)-})dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
__devitem(ra, ra*, {-MSCP disks (ra??, hd??)-})dnl
|
|
|
|
__devitem(hp, hp*, {-massbuss rm??-})dnl
|
|
|
|
__devitem(hk, hk*, {-unibus rk06 and rk07-})dnl
|
|
|
|
__devitem(up, up*, {-other unibus devices (e.g. on Emulex sc-21v controller)-})dnl
|
|
|
|
__devitem(rb, rb*, {-730 idc w/ rb80 and/or rb02-})dnl
|
|
|
|
__devitem(rx, rx*, {-MSCP floppy disk (rx33/50/...)-})dnl
|
|
|
|
__devitem(rl, rl*, {-unibus r102-})dnl
|
|
|
|
__devitem(hd, hd*, {-HDC9224 hd disks on VS2000-})dnl
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl
|
|
|
|
dnl For normal disk devices, add a disk_q entry; anything else define like
|
|
|
|
dnl the rest (such as vnd above).
|
|
|
|
dnl
|
2002-01-22 22:10:35 -08:00
|
|
|
disk_q({-ccd-})dnl
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
disk_q({-hd-})dnl
|
2002-01-22 22:10:35 -08:00
|
|
|
disk_q({-hk-})dnl
|
|
|
|
disk_q({-hp-})dnl
|
|
|
|
disk_q({-ra-})dnl
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
disk_q({-raid-})dnl
|
2002-01-22 22:10:35 -08:00
|
|
|
disk_q({-rb-})dnl
|
|
|
|
disk_q({-rl-})dnl
|
|
|
|
disk_q({-rx-})dnl
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
disk_q({-sd-})dnl
|
2002-01-22 22:10:35 -08:00
|
|
|
disk_q({-xy-})dnl
|
|
|
|
disk_q({-xd-})dnl
|
|
|
|
disk_q({-up-})dnl
|
|
|
|
disk_q({-wd-})dnl
|
|
|
|
disk_q({-rz-})dnl
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
__devitem(loc, local, configuration specific devices)dnl
|
|
|
|
_mkdev(loc, local, {-test -s $T.local && sh $T.local-})dnl
|
|
|
|
_mkdev({-disks-}, {-undefine({-C_ase-})show_disks()undefine({-C_ase-})-},
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
{-case $i in
|
|
|
|
show_disks2()dnl
|
2002-01-06 22:54:10 -08:00
|
|
|
esac-})dnl
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
__mkdev({-disks-}){--}dnl
|
|
|
|
dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
__devtitle(cons, Console ports)dnl
|
|
|
|
__devitem(ttyv0, ttyv0, pccons or pcvt screen 0)dnl
|
|
|
|
__devitem(ttyv, ttyv*, pcvt)dnl
|
|
|
|
__devitem(wscons, ttyC0, wscons screen 0)dnl
|
2002-02-19 13:03:18 -08:00
|
|
|
twrget(wscons, wscons, ttyC, cfg, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b)dnl
|
|
|
|
target(wscons, wsmux)dnl
|
|
|
|
target(wscons, wskbd, 0, 1, 2, 3)dnl
|
|
|
|
target(wscons, wsmouse, 0, 1, 2, 3)dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
_mkdev({-wscons-}, {-wscons-}, {-dnl
|
2002-02-19 13:03:18 -08:00
|
|
|
show_target(wscons)dnl
|
|
|
|
-})dnl
|
2002-02-19 13:05:10 -08:00
|
|
|
__devitem(wsdisp, ttyC-F*, wscons virtual consoles)dnl
|
2002-02-19 13:03:18 -08:00
|
|
|
_mkdev({-wsdisp-}, tty[C-F]*, {-U=${i##tty[C-F]}
|
|
|
|
case $i in
|
|
|
|
ttyC*) n=C m=expr(0*256);;
|
|
|
|
ttyD*) n=D m=expr(1*256);;
|
|
|
|
ttyE*) n=E m=expr(2*256);;
|
|
|
|
ttyF*) n=F m=expr(3*256);;
|
|
|
|
esac
|
2002-01-04 08:58:41 -08:00
|
|
|
case $U in
|
2002-02-19 13:03:18 -08:00
|
|
|
[0-9a-f]) M tty$n$U c major_wsdisp_c {-$(( 16#$U + $m ))-} 600;;
|
|
|
|
cfg) M tty${n}cfg c major_wsdisp_c Add(255,$m) 600;;
|
2002-01-04 08:58:41 -08:00
|
|
|
*) echo bad unit $U for $i; exit 1;;
|
2002-01-06 22:54:10 -08:00
|
|
|
esac-})dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
__devitem(wskbd, wskbd*, wscons keyboards)dnl
|
|
|
|
_mkdev(wskbd, wskbd*, {-M wskbd$U c major_wskbd_c $U 600-})dnl
|
|
|
|
__devitem(wsmux, wsmux, wscons keyboard/mouse mux devices)dnl
|
|
|
|
_mkdev(wsmux, wsmux|wsmouse|wskbd, {-M wsmouse c major_wsmux_c 0 600
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
M wskbd c major_wsmux_c 1 600-})dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
__devitem(pcons, console, PROM console)dnl
|
|
|
|
__devtitle(point, Pointing devices)dnl
|
|
|
|
__devitem(wsmouse, wsmouse*, wscons mice)dnl
|
|
|
|
_mkdev(wsmouse, wsmouse*, {-M wsmouse$U c major_wsmouse_c $U 600-})dnl
|
|
|
|
__devitem(quad, quadmouse, "quadrature mouse")dnl
|
|
|
|
__devtitle(pty, Pseudo terminals)dnl
|
2004-02-09 17:31:20 -08:00
|
|
|
__devitem(ptm, ptm, pty master device)dnl
|
|
|
|
_mkdev(ptm, ptm, {-M ptm c major_ptm_c 0 666-})dnl
|
2004-02-13 08:51:27 -08:00
|
|
|
__devitem(tty, tty*, set of 16 slave pseudo terminals)dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
__devitem(pty, pty*, set of 16 master pseudo terminals)dnl
|
2002-02-14 09:44:38 -08:00
|
|
|
_mkdev(pty, pty*, {-if [ $U -gt 15 ]; then
|
|
|
|
echo bad unit for pty in: $i
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
set -A tbl p q r s t u v w x y z P Q R S T
|
|
|
|
name=${tbl[$U]}
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
n=0
|
|
|
|
while [ $n -lt 16 ]
|
|
|
|
do
|
|
|
|
nam=$name$(hex $n)
|
2002-02-14 09:44:38 -08:00
|
|
|
off=Mult($U, 16)
|
2002-02-13 21:38:22 -08:00
|
|
|
M tty$nam c major_tty_c Add($off, $n)
|
|
|
|
M pty$nam c major_pty_c Add($off, $n)
|
|
|
|
n=Add($n, 1)
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
done-})dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
__devitem(dc, dc*, {-4 channel serial interface (keyboard{-,-} mouse{-,-}modem{-,-} printer)-})dnl
|
|
|
|
__devtitle(prn, Printers)dnl
|
|
|
|
__devitem(par, par*, motherboard parallel port)dnl
|
|
|
|
__devitem(lpt, lpt*, IEEE 1284 centronics printer)dnl
|
|
|
|
_mkdev(lpt, lpt*|lpa*,
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
{-case $i in
|
|
|
|
lpt*) n=lpt f=0;;
|
|
|
|
lpa*) n=lpa f=128;;
|
|
|
|
esac
|
2002-02-13 21:38:22 -08:00
|
|
|
M $n$U c major_lpt_c Add($U, $f) 600-})dnl
|
|
|
|
__devitem(lpa, lpa*, interruptless lp)dnl
|
|
|
|
__devitem(ppi, ppi*, HP-IB plotters)dnl
|
|
|
|
__devtitle({-usb-}, USB devices)dnl
|
|
|
|
__devitem({-usb-}, usb*, Bus control devices used by usbd for attach/detach)dnl
|
|
|
|
_mkdev({-usb-}, usb*, {-[ "$i" = "usb" ] && u= || u=$U
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
M usb$u c major_usb_c $U 660-})dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
__devitem(uhid, uhid*, Generic HID devices)dnl
|
|
|
|
_mcdev({-uhid-}, uhid*, {-uhid-}, {-major_uhid_c-}, 660)dnl
|
|
|
|
__devitem(ulpt, ulpt*, Printer devices)dnl
|
|
|
|
_mcdev({-ulpt-}, ulpt*, {-ulpt-}, {-major_ulpt_c-}, 660)dnl
|
2004-01-12 14:18:23 -08:00
|
|
|
__devitem(ttyU, ttyU*, Serial ports)dnl
|
2004-01-12 14:31:34 -08:00
|
|
|
_mkdev({-ttyU-}, {-ttyU[0-9a-zA-Z]-}, {-U=${i#ttyU*}
|
|
|
|
o=$(alph2d $U)
|
|
|
|
M ttyU$U c major_ttyU_c $o 660 dialer uucp-})dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
__devitem(urio, urio*, Diamond Multimedia Rio 500)dnl
|
|
|
|
_mcdev({-urio-}, urio*, {-urio-}, {-major_urio_c-}, 660)dnl
|
|
|
|
__devitem(uscan, uscanner*, Scanners)dnl
|
|
|
|
_mcdev({-uscan-}, uscanner*, {-uscanner-}, {-major_uscan_c-}, 660)dnl
|
|
|
|
__devitem(ugen, ugen*, Generic device)dnl
|
|
|
|
_mkdev(ugen, ugen*, {-n=Mult($U, 16)
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
for j in 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15
|
|
|
|
do
|
2002-02-13 21:38:22 -08:00
|
|
|
M ugen$U.$j c major_ugen_c Add($n, $j) 660
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
done-})dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
__devtitle(cpu, Cpus)dnl
|
|
|
|
__devitem(cpu, cpu*, cpus)dnl
|
|
|
|
__devtitle(call, Call units)dnl
|
|
|
|
__devtitle(term, Terminal ports)dnl
|
|
|
|
__devtitle(termp, Terminal multiplexers)dnl
|
|
|
|
__devitem(dca, dca*, HP200/300 single port serial interface)dnl
|
|
|
|
__devitem(dcm, dcm*, HP200/300 4 port serial mux interface)dnl
|
|
|
|
__devitem(apci, apci*, HP400 4 port serial mux interface)dnl
|
2003-10-14 10:58:23 -07:00
|
|
|
__devitem({-com-}, {-tty[0-7][0-9a-f]-}, NS16x50 serial ports)dnl
|
|
|
|
_mkdev(com, {-tty[0-7][0-9a-f]-}, {-U=${i#tty*}
|
2003-10-14 19:01:04 -07:00
|
|
|
o=$(h2d $U)
|
2003-10-14 10:58:23 -07:00
|
|
|
M tty$U c major_com_c $o 660 dialer uucp
|
|
|
|
M cua$U c major_com_c Add($o, 128) 660 dialer uucp-})dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
__devitem(ttyc, ttyc*, Cyclades serial ports)dnl
|
|
|
|
__devitem(tzs, tty[a-z]*, Zilog 8530 Serial Port)dnl
|
|
|
|
_mkdev(tzs, {-tty[a-z]-}, {-u=${i#tty*}
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
case $u in
|
|
|
|
a) n=0 ;;
|
|
|
|
b) n=1 ;;
|
|
|
|
c) n=4 ;;
|
|
|
|
d) n=5 ;;
|
|
|
|
*) echo unknown tty device $i ;;
|
|
|
|
esac
|
|
|
|
M tty$u c major_tzs_c $n 660 dialer uucp-})dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
__devitem(tth, ttyh*, Sab82532 serial devices)dnl
|
|
|
|
_mkdev(tth, ttyh*, {-M ttyh$U c major_tth_c $U 660 dialer uucp-})dnl
|
|
|
|
__devitem(czs, cua[a-z]*, Zilog 8530 Serial Port)dnl
|
|
|
|
_mkdev(czs, cua[a-z], {-u=${i#cua*}
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
case $u in
|
|
|
|
a) n=0 ;;
|
|
|
|
b) n=1 ;;
|
|
|
|
c) n=4 ;;
|
|
|
|
d) n=5 ;;
|
2002-02-24 17:10:26 -08:00
|
|
|
*) echo unknown cua device $i ;;
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
esac
|
2002-02-13 21:38:22 -08:00
|
|
|
M cua$u c major_czs_c Add($n, 128) 660 dialer uucp-})dnl
|
|
|
|
__devitem(arm_tty, tty*, {-alias for PC COM ports{-,-} this is what the system really wants-})dnl
|
|
|
|
__devitem(tty0, tty00, standard serial port)dnl
|
|
|
|
__devitem(mac_tty0, tty00, standard serial port)dnl
|
|
|
|
__devitem(ttyA, ttyA*, mfc serial ports)dnl
|
|
|
|
__devitem(ttyz, tty[a-d], onboard zs serial ports)dnl
|
|
|
|
__devitem(cuaz, cua[a-d], onboard zs serial ports)dnl
|
|
|
|
__devitem(ttyB, ttyB?, DEC 3000 ZS8530 ("scc") serial ports)dnl
|
|
|
|
__devitem(scc, scc*, 82530 serial interface)dnl
|
|
|
|
__devtitle(spec, Special purpose devices)dnl
|
|
|
|
__devitem(apm, apm , power management device)dnl
|
|
|
|
_mkdev(apm, apm*, {-M apm c major_apm_c 0 644
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
M apmctl c major_apm_c 8 644-})dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
__devitem(pcmcia, pcmcia*, PCMCIA card drivers)dnl
|
|
|
|
__devitem(pctr, pctr*, PC Performance Tuning Register access device)dnl
|
|
|
|
_mkdev(pctr, pctr, {-M pctr c major_pctr_c 0 644-})dnl
|
2002-05-16 09:18:44 -07:00
|
|
|
__devitem(systrace, systrace*, system call tracing device)dnl
|
|
|
|
_mkdev(systrace, systrace, {-M systrace c major_systrace_c 0 644-})dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
__devitem(au, audio*, audio device)dnl
|
|
|
|
_mkdev(au, audio*, {-M sound$U c major_au_c $U
|
|
|
|
M mixer$U c major_au_c Add($U, 16)
|
|
|
|
M audio$U c major_au_c Add($U, 128)
|
|
|
|
M audioctl$U c major_au_c Add($U, 192)
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
MKlist="$MKlist;[ -e audio ] || ln -s audio$U audio"
|
|
|
|
MKlist="$MKlist;[ -e mixer ] || ln -s mixer$U mixer"
|
|
|
|
MKlist="$MKlist;[ -e sound ] || ln -s sound$U sound"
|
|
|
|
MKlist="$MKlist;[ -e audioctl ] || ln -s audioctl$U audioctl"-})dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
__devitem(asc, asc*, ASC Audio device)dnl
|
|
|
|
_mkdev(asc, asc*, {-M asc$U major_asc_c 0-})dnl
|
|
|
|
__devitem(music, music*, midi devices)dnl
|
|
|
|
_mkdev(music, music*, {-M music$U c major_music_c $U
|
|
|
|
M sequencer$U c major_music_c Add($U, 128)
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
MKlist="$MKlist;[ -e music ] || ln -s music$U music"
|
|
|
|
MKlist="$MKlist;[ -e sequencer ] || ln -s sequencer$U sequencer"-})dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
__devitem(radio, radio*, FM tuner device)dnl
|
|
|
|
_mkdev(radio, radio*, {-M radio$U c major_radio_c $U
|
2002-01-06 23:50:48 -08:00
|
|
|
MKlist="$MKlist;[ -e radio ] || ln -s radio$U radio"-})dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
__devitem(fdesc, fd, makes fd/* for the fdescfs)dnl
|
|
|
|
_mkdev(fdesc, fd, {-RMlist="mkdir -p fd;$RMlist" n=0
|
|
|
|
while [ $n -lt 64 ];do M fd/$n c major_fdesc_c $n;n=Add($n, 1);done
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
MKlist="$MKlist;chmod 555 fd"-})dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
__devtitle(graph, Graphics devices)dnl
|
|
|
|
__devitem(grf_mac, grf*, {-custom chip (grf0){-,-} Retina Z2/Z3 (grf1/grf2){-,-}
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
{-#-} Cirrus boards (grf3){-,-} A2410 (grf4) video or
|
|
|
|
{-#-} CyberVision 64 (grf5)-})dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
__devitem(ite, ite*, terminal emulator interface to HP300 graphics devices)dnl
|
|
|
|
__devitem({-hil-}, {-hil-}, HP300 HIL input devices)dnl
|
|
|
|
__devitem(oppr, openprom)dnl
|
|
|
|
_cdev(oppr, openprom, 70, 0)dnl
|
|
|
|
__devitem(cry, crypto, hardware crypto access driver)dnl
|
|
|
|
_mkdev(cry, crypto, {-M crypto c major_cry_c-} 0)dnl
|
|
|
|
__devitem(pf, pf*, Packet Filter)dnl
|
|
|
|
_mkdev(pf, {-pf*-}, {-M pf c major_pf_c 0 600-})dnl
|
|
|
|
__devitem(bpf, bpf*, Berkeley Packet Filter)dnl
|
|
|
|
_mkdev(bpf, {-bpf*-}, {-M bpf$U c major_bpf_c $U 600-}, 600)dnl
|
|
|
|
_mkdev(tun, {-tun*-}, {-M tun$U c major_tun_c $U 600-}, 600)dnl
|
|
|
|
__devitem(speak, speaker, pc speaker)dnl
|
|
|
|
_mkdev(speak, speaker, {-M speaker c major_speak_c 0 600-})dnl
|
|
|
|
__devitem(kbd, kbd, keyboard (provides events, for X11))dnl
|
|
|
|
_cdev(kbd, kbd, {-major_kbd_c-}, 0, 600)dnl
|
|
|
|
__devitem(kbd_atari, kbd, Atari keyboard)dnl
|
|
|
|
__devitem(akbd, kbd, Amiga keyboard)dnl
|
|
|
|
__devitem(rkbd, kbd, raw keyboard)dnl
|
|
|
|
__devitem(kbdctl, kbdctl, keyboard control)dnl
|
|
|
|
__devitem(beep, beep, riscpc speaker)dnl
|
|
|
|
__devitem(iic, iic*, IIC bus device)dnl
|
|
|
|
__devitem(rtc, rtc*, RTC device)dnl
|
|
|
|
__devitem(view, view*, generic interface to graphic displays)dnl
|
|
|
|
__devitem(aconf, aconf, {-autoconfig information (not yet)-})dnl
|
|
|
|
__devitem(mouse-, mouse-*, "mouse link")dnl
|
|
|
|
__devitem(mouse, mouse, mouse (provides events, for X11))dnl
|
|
|
|
__devitem(amouse, mouse*, Amiga mice)dnl
|
|
|
|
__devitem(lkm, lkm, loadable kernel modules interface)dnl
|
2003-01-05 21:57:32 -08:00
|
|
|
_cdev(lkm, lkm, {-major_lkm_c-}, 0, 640, _lkm)dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
__devitem(mmcl, mmclock, memory mapped clock)dnl
|
|
|
|
__devitem(tun, tun*, network tunnel driver)dnl
|
|
|
|
__devitem(rnd, *random, inkernel random data source)dnl
|
|
|
|
_mkdev(rnd, *random, {-n=0
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
for pre in " " s u p a
|
|
|
|
do
|
|
|
|
M ${pre}random c major_rnd_c $n 644
|
2002-02-13 21:38:22 -08:00
|
|
|
n=Add($n, 1)
|
|
|
|
done-}, 644)dnl
|
|
|
|
__devitem(joy, joy*, joystick driver)dnl
|
|
|
|
_mcdev(joy, joy*, joy, {-major_joy_c-}, 666)dnl
|
|
|
|
__devitem(mag, magma*, magma card (makes 16 tty and 2 bpp))dnl
|
|
|
|
__devitem(bppmag, bppmag[mno], magma parallel port device)dnl
|
|
|
|
__devitem(spif, spif*, spif card (makes 8 tty and 1 bpp))dnl
|
|
|
|
__devitem(bppsp, bpp[jkl], spif parallel port device)dnl
|
|
|
|
_mkdev(mag, magma*, {-case $U in
|
2002-01-22 22:10:35 -08:00
|
|
|
0) offset=0 nam=m;;
|
|
|
|
1) offset=16 nam=n;;
|
|
|
|
2) offset=32 nam=o;;
|
|
|
|
*) echo "bad unit for $i: $U"; exit 127;;
|
|
|
|
esac
|
2002-02-13 21:38:22 -08:00
|
|
|
offset=Mult($U, 64)
|
2002-01-22 22:10:35 -08:00
|
|
|
n=0
|
|
|
|
while [ $n -lt 16 ]
|
|
|
|
do
|
|
|
|
name=${nam}`hex $n`
|
2002-02-13 21:38:22 -08:00
|
|
|
M tty$name c major_mag_c Add($offset, $n) 660 dialer uucp
|
|
|
|
n=Add($n, 1)
|
2002-01-22 22:10:35 -08:00
|
|
|
done
|
2002-02-13 21:38:22 -08:00
|
|
|
M bpp${nam}0 c major_bppmag_c Add($offset, 0) 600
|
|
|
|
M bpp${nam}1 c major_bppmag_c Add($offset, 1) 600-})dnl
|
|
|
|
_mkdev(spif, spif*, {-case $U in
|
2002-01-22 22:10:35 -08:00
|
|
|
0) offset=0 nam=j;;
|
|
|
|
1) offset=16 nam=k;;
|
|
|
|
2) offset=32 nam=l;;
|
|
|
|
*) echo "bad unit for $i: $U"; exit 127;;
|
|
|
|
esac
|
2002-02-13 21:38:22 -08:00
|
|
|
offset=Mult($U, 64)
|
2002-01-22 22:10:35 -08:00
|
|
|
n=0
|
|
|
|
while [ $n -lt 8 ]
|
|
|
|
do
|
|
|
|
name=${nam}`hex $n`
|
2002-02-13 21:38:22 -08:00
|
|
|
M tty$name c major_spif_c Add($offset, $n) 660 dialer uucp
|
|
|
|
n=Add($n, 1)
|
2002-01-22 22:10:35 -08:00
|
|
|
done
|
2002-02-13 21:38:22 -08:00
|
|
|
M bpp${nam}0 c major_bppsp_c Add($offset, 0) 600-})dnl
|
|
|
|
__devitem(bpp, bpp*, parallel port devices)dnl
|
2003-05-21 11:48:59 -07:00
|
|
|
_mkdev(bpp, {-bpp*-}, {-M bpp$U c major_bpp_c $U 600-}, 600)dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
__devitem(xfs, xfs*, XFS filesystem devices)dnl
|
|
|
|
_mcdev(xfs, xfs*, xfs, {-major_xfs_c-}, 600)dnl
|
|
|
|
__devitem(hil, hil, HIL input devices)dnl
|
|
|
|
__devitem(rmidi, rmidi*, raw midi devices)dnl
|
|
|
|
_mcdev(rmidi, rmidi*, rmidi, {-major_rmidi_c-}, 666)dnl
|
|
|
|
__devtitle(plat, Platform-specific devices)dnl
|
|
|
|
__devitem(fb, fb*, framebuffer device)dnl
|
|
|
|
__devitem(bktr, bktr*, video capturing)dnl
|
|
|
|
_mcdev(bktr, bktr*, bktr, {-major_bktr_c-}, 644)dnl
|
|
|
|
__devitem(tuner, tuner*, tuner device)dnl
|
|
|
|
_mkdev(tuner, tuner*, {-M tuner$U c major_bktr_c Add(Mult($U, 2), 16) 644-}, 644)dnl
|
|
|
|
__devitem(pci, pci, PCI bus device)dnl
|
2002-04-11 13:28:49 -07:00
|
|
|
_mkdev(pci, pci, {-M pci c major_pci_c 0 600-}, 600)dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
__devitem(adb, adb, Apple Desktop bus event interface)dnl
|
|
|
|
_mkdev(adb, adb, {-M adb c major_adb_c 0-})dnl
|
|
|
|
__devitem(pdc, pdc, PDC device)dnl
|
|
|
|
_mkdev(local, local, {-test -s $T.local && sh $T.local-}, 666)dnl
|
2002-06-17 17:53:45 -07:00
|
|
|
__devitem(gpr, gpr*, gpr400 pcmcia device)dnl
|
|
|
|
_mcdev(gpr, gpr*, gpr, {-major_gpr_c-})dnl
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl
|
|
|
|
divert(1)dnl
|
|
|
|
include(etc.MACHINE/MAKEDEV.md)dnl
|
|
|
|
dnl
|
|
|
|
dnl
|
|
|
|
divert(0)dnl
|
|
|
|
#!/bin/sh -
|
|
|
|
#
|
|
|
|
# THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
|
|
|
|
# generated from:
|
|
|
|
#
|
|
|
|
show_vers()dnl <-- now that all files are included, show versions
|
|
|
|
#
|
|
|
|
dnl
|
|
|
|
divert(2)dnl
|
|
|
|
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
|
|
|
T=$0
|
|
|
|
|
|
|
|
# set this to echo for Echo-Only debugging
|
|
|
|
[ "$eo" ] || eo=
|
|
|
|
|
|
|
|
hex()
|
|
|
|
{
|
|
|
|
case ${--}1 in
|
2002-02-10 13:52:30 -08:00
|
|
|
[0-9]) echo -n {-$-}1;;
|
|
|
|
10) echo -n a;;
|
|
|
|
11) echo -n b;;
|
|
|
|
12) echo -n c;;
|
|
|
|
13) echo -n d;;
|
|
|
|
14) echo -n e;;
|
|
|
|
15) echo -n f;;
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
esac
|
|
|
|
}
|
2002-02-10 13:52:30 -08:00
|
|
|
|
2004-01-12 14:31:34 -08:00
|
|
|
alph2d()
|
|
|
|
{
|
|
|
|
local t="$1"
|
|
|
|
local p="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
|
|
|
local sub=${p%${t}*}
|
|
|
|
echo ${#sub}
|
|
|
|
}
|
|
|
|
|
2003-10-14 10:58:23 -07:00
|
|
|
h2d()
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
{
|
2003-10-14 10:58:23 -07:00
|
|
|
local s="$1"
|
|
|
|
local f=${s%*[0-9a-f]} n=${s#[0-9a-f]*}
|
|
|
|
|
|
|
|
echo $(($(_h2d $f)*16+ $(_h2d $n) ))
|
|
|
|
}
|
|
|
|
|
|
|
|
_h2d()
|
|
|
|
{
|
|
|
|
case $1 in
|
|
|
|
[0-9]) echo -n $1;;
|
|
|
|
a) echo -n 10;;
|
|
|
|
b) echo -n 11;;
|
|
|
|
c) echo -n 12;;
|
|
|
|
d) echo -n 13;;
|
|
|
|
e) echo -n 14;;
|
|
|
|
f) echo -n 15;;
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
esac
|
|
|
|
}
|
2002-02-10 13:52:30 -08:00
|
|
|
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
unt()
|
|
|
|
{
|
|
|
|
# XXX pdksh can't seem to deal with locally scoped variables
|
|
|
|
# in ${foo#$bar} expansions
|
|
|
|
arg="{-$-}1"
|
|
|
|
tmp="${arg#[a-zA-Z]*}"
|
|
|
|
tmp="${tmp%*[a-zA-Z]}"
|
|
|
|
while [ "$tmp" != "$arg" ]
|
|
|
|
do
|
|
|
|
arg=$tmp
|
|
|
|
tmp="${arg#[a-zA-Z]*}"
|
|
|
|
tmp="${tmp%*[a-zA-Z]}"
|
|
|
|
done
|
|
|
|
echo $arg
|
|
|
|
}
|
|
|
|
dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
dnl dodisk(name, unit, blkmaj, chrmaj, unit, off[, stepping])
|
2002-01-06 22:25:32 -08:00
|
|
|
dnl arg: 1 2 3 4 5 6 7
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl
|
2002-02-10 13:52:30 -08:00
|
|
|
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dodisk()
|
|
|
|
{
|
2002-02-13 20:37:15 -08:00
|
|
|
[ "$DEBUG" ] && set -x
|
2002-02-13 21:38:22 -08:00
|
|
|
n=Add(Mult(${5}, ${7:-16}), ${6}) count=0
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
RMlist="$RMlist {-$-}1{-$-}2? r{-$-}1{-$-}2?"
|
2002-01-07 19:14:50 -08:00
|
|
|
[ 0$7 -ne 8 ] && l="i j k l m n o p"
|
|
|
|
for d in a b c d e f g h $l
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
do
|
2002-02-13 21:38:22 -08:00
|
|
|
M {-$-}1{-$-}2$d b {-$-}3 Add($n, $count) 640
|
|
|
|
M r{-$-}1{-$-}2$d c {-$-}4 Add($n, $count) 640
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
let count=count+1
|
|
|
|
done
|
2003-04-10 09:11:12 -07:00
|
|
|
MKlist="$MKlist;chown root:operator {-$-}1{-$-}2? r{-$-}1{-$-}2?"
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
}
|
|
|
|
dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
dnl dodisk2(name, unit, blkmaj, chrmaj, unit, off[, stepping])
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl
|
|
|
|
dnl 1. name - prefix name of the device
|
|
|
|
dnl 2. unit - beginning unit number for block devices
|
|
|
|
dnl 3. blkmaj - block device major number
|
|
|
|
dnl 4. chrmaj - character device major number
|
|
|
|
dnl 5. unit - beginning unit number for character devices
|
|
|
|
dnl 6. off - offset from 0 for all minor numbers (see svnd for an example)
|
2002-01-06 22:25:32 -08:00
|
|
|
dnl 7. step - optional, defaults to 16, number of partitions per device
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl
|
2002-02-10 13:52:30 -08:00
|
|
|
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dodisk2()
|
|
|
|
{
|
2002-02-13 21:38:22 -08:00
|
|
|
n=Add(Mult({-$-}5, ${7:-16}), {-$-}6)
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
M {-$-}1{-$-}2a b {-$-}3 $n 640 operator
|
|
|
|
M r{-$-}1{-$-}2a c {-$-}4 $n 640 operator
|
2002-02-13 21:38:22 -08:00
|
|
|
n=Add($n, 2)
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
M {-$-}1{-$-}2c b {-$-}3 $n 640 operator
|
|
|
|
M r{-$-}1{-$-}2c c {-$-}4 $n 640 operator
|
|
|
|
}
|
|
|
|
|
|
|
|
# M name b/c major minor [mode] [group]
|
|
|
|
RMlist="rm -f"
|
|
|
|
MKlist=":"
|
2002-02-10 13:52:30 -08:00
|
|
|
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
mkl() {
|
|
|
|
dnl
|
|
|
|
dnl uncomment if multi mknod happens
|
|
|
|
dnl
|
2002-02-13 21:38:22 -08:00
|
|
|
ifelse(1, 0,
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
[ "${mklist[{-$-}1]}" ] && mklist[{-$-}1]="${mklist[{-$-}1]} {-$-}2 {-$-}3 {-$-}4 {-$-}5" || {
|
2002-02-14 06:32:26 -08:00
|
|
|
mklist[{-$-}1]="mknod -m {-$-}1 {-$-}2 {-$-}3 {-$-}4 {-$-}5"
|
|
|
|
modes="$modes {-$-}1"
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
},
|
|
|
|
dnl
|
|
|
|
dnl non multi mknod
|
|
|
|
dnl
|
2002-02-10 13:52:30 -08:00
|
|
|
[ "${mklist[{-$-}1]}" ] && {
|
|
|
|
mklist[{-$-}1]="${mklist[{-$-}1]};mknod -m {-$-}1 {-$-}2 {-$-}3 {-$-}4 {-$-}5"
|
|
|
|
} || {
|
|
|
|
mklist[{-$-}1]="mknod -m {-$-}1 {-$-}2 {-$-}3 {-$-}4 {-$-}5"
|
|
|
|
modes="$modes {-$-}1"
|
|
|
|
})
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
}
|
2002-02-10 13:52:30 -08:00
|
|
|
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
M() {
|
|
|
|
RMlist="$RMlist {-$-}1"
|
|
|
|
mkl ${5-666} {-$-}1 {-$-}2 {-$-}3 {-$-}4
|
|
|
|
mklist="$mklist {-$-}1"
|
|
|
|
G={-$-}{6:-wheel}
|
|
|
|
[ "{-$-}7" ] && {
|
2003-04-10 09:11:12 -07:00
|
|
|
MKlist="$MKlist;chown {-$-}7:{-$-}G {-$-}1"
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
} || {
|
|
|
|
case $G in
|
2003-01-06 09:19:16 -08:00
|
|
|
wheel)g=0;;kmem)g=2;;operator)g=5;;tty)g=4;;dialer)g=117;;_lkm)g=61;;
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
esac
|
|
|
|
[ "${grplist[$g]}" ] && {
|
|
|
|
grplist[$g]="${grplist[$g]} {-$-}1"
|
|
|
|
} || {
|
|
|
|
groups="$groups $g"
|
|
|
|
grplist[$g]="chgrp $G {-$-}1"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
divert(7)dnl
|
|
|
|
dnl
|
|
|
|
dnl there is no blank line at the end of etc.arch/MAKEDEV.md files, so add one
|
|
|
|
dnl on the following line:
|
|
|
|
|
|
|
|
show_devs()dnl
|
|
|
|
dnl
|
|
|
|
divert(9)dnl
|
|
|
|
*)
|
|
|
|
echo $i: unknown device
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
}
|
|
|
|
_recurse "$@"
|
|
|
|
list="$RMlist"
|
|
|
|
for mode in $modes; do
|
|
|
|
list="$list;${mklist[$mode]}"
|
|
|
|
done
|
|
|
|
for group in $groups; do
|
|
|
|
list="$list;${grplist[$group]}"
|
|
|
|
done
|
|
|
|
list="$list;$MKlist"
|
2004-02-05 14:22:15 -08:00
|
|
|
if [ "$eo" = "echo" ]; then
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
$eo "$list"
|
|
|
|
else
|
|
|
|
echo "$list" | sh
|
|
|
|
fi
|
2002-02-24 17:10:26 -08:00
|
|
|
divert(3)dnl
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
dnl
|
2002-02-10 13:52:30 -08:00
|
|
|
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
R() {
|
2002-02-08 12:26:36 -08:00
|
|
|
[ "$DEBUG" ] && set -x
|
This is my m4 MAKEDEV generation system.
.mi -> edit this to add new devices
.sub -> hardcore m4 here, be careful
*/*.md -> machine dependent information (generally device,block (& char) major)
Thanks for eyes/conversation about this over the years from espie, deraadt,
johns, fgsch, hugh, weingart, mickey, and others ..
SEE ALSO
. m4(1), MAKEDEV(8)
2002-01-04 01:25:35 -08:00
|
|
|
for i in "$@"
|
|
|
|
do
|
|
|
|
U=`unt $i`
|
|
|
|
[ "$U" ] || U=0
|
|
|
|
|
|
|
|
case $i in
|
|
|
|
dnl
|