History log of /netbsd-current/etc/MAKEDEV.tmpl
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.234 06-Nov-2023 brad

gpioirq(4) version 2

This update makes this driver more than just an example and allows for:

o More than one pin to be attached to a gpioirq instance. That is,
the mask parameter can be greater than 0x01 now.

o A /dev/gpioirqN device that allows GPIO pin interrupts to be
transported into userland. This is a device that can be opened for
reading with a simple fixed output indicating the device unit, pin
number and current pin state.


This update was used as part of a physical intrusion detection system
where multiple switches (i.e. window magnetic reed switches and etc.)
are tied to a bunch of GPIO inputs with userland software that reacts
to the pins changing state.


# 1.233 28-Dec-2022 jakllsch

fix hexprint function


Revision tags: netbsd-10-base
# 1.232 21-Sep-2022 wiz

branches: 1.232.2;
MAKEDEV: make nvmm node group-writable (was readable only; group nvmm)

Needed by qemu


# 1.231 12-Aug-2022 riastradh

viocon(4): New virtio tty driver imported from OpenBSD.

viocon* at virtio?

/dev/ttyVI??

Tested under qemu with:

qemu-system-aarch64 ... \
-device virtio-serial \
-chardev socket,path=/tmp/ttyVI00,server=on,wait=off,id=ttyVI00 \
-device virtconsole,chardev=ttyVI00,name=org.NetBSD.dev.ttyVI00 \
...

I updated MAKEDEV.conf to create /dev/ttyVI?? on all ports where it
looks likely to work based on:
(a) having pci or a non-pci virtio attachment,
(b) `qemu-system-$ARCH -M ?' mentioned something resembling the port,
and
(c) `qemu-system-$ARCH -device virtio-serial' launched without
complaining about the virtio-serial device.

(Criterion (c) excluded sparc and sparc64.)


# 1.230 17-May-2022 uwe

MAKEDEV.tmpl: make /dev/wsfont world-readable

Now that we have WSDISPLAYIO_LISTFONTS we want users to be able to use it.

NB: older kernels didn't check that WSDISPLAYIO_LDFONT was performed
on wsfont(4) device opened for writing and relied on its restrictive
root-only permissions to restrict who can load fonts.


# 1.229 08-Apr-2022 andvar

fix various typos, mainly in comments, but also log messages, docs, game text.


# 1.228 07-Dec-2021 brad

A driver and user land utility for the Sparkfun Serial Controlled Motor
Driver module as illustrated here:

https://www.sparkfun.com/products/13911

A SCMD module is a ARM SOC simular to a Arduino in front of a motor
driver chip. The single SCMD module can control two motors and up to
16 additional modules can be chained together using an internal I2C
bus. One can interface with the SCMD using tty uart commands, SPI or
I2C. The driver in this commit adds a kernel driver for the I2C and
SPI interfaces. The command line utility provides a set of
convenience commands that support most of the functions of the SCMD
and is able to use the tty uart mode, SPI user land or the included
kernel driver in a uniform manor.

The use of the SCMD module is mostly for small robots and the like,
but it can control anything that is controllable by voltage.


# 1.227 06-Nov-2021 brad

Driver for the Sensirion SHT30/SHT31/SHT35 temperature and humidity
sensor such as:

https://www.adafruit.com/product/2857

This is a higher priced sensor with a lot of features, including the
ability to do sub-second periodic updates. The driver supports
everything about the sensor except for the alert pin.


# 1.226 12-Oct-2021 christos

PR/56452: RVP: MAKEDEV should also create /dev/dri/renderD* devices


# 1.225 10-Oct-2021 jmcneill

efi: Add /dev/efi character device

Introduce a /dev/efi character device that provides a means for accessing
UEFI RT variable services from userland. Compatible with the FreeBSD ioctl
interface for ease of porting their libefivar and associated tools.

The ioctl interface is defined in sys/efiio.h.

To enable support for this on an arch, the kernel needs `pseudo-device efi`
and the MD EFI implementation needs to register its backend by calling
efi_ops_register(). This commit includes an implementation for Arm.


# 1.224 24-Jul-2021 jmcneill

smbios: Add character device for accessing SMBIOS tables

The /dev/smbios character device gives an aperture into physical memory
that allows read-only access to the SMBIOS header and tables.


# 1.223 29-Jun-2021 nia

Remove uscanner(4) driver

This exists for compatibility with a Linux interface which was apparently
deprecated in Linux 2.6. There are various mailing list threads going
back to 2004 where the usefulness of this driver is discussed, but
the conclusion is that scanner software has all moved to using ugen(4)
instead, and enabling this driver will not help you scan things.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.222 06-Dec-2020 jmcneill

acpi: add character device for accessing ACPI tables

The /dev/acpi character device gives an aperture into physical memory
that allows only read access to known ACPI tables: RSDP, XSDT/RSDT, and
the root tables. Adapt acpidump(8) to use this interface by default,
falling back to the old /dev/mem method if it is not available or if
ACPIDUMP_USE_DEVMEM=1 is set in the environment. The user visible benefit
of this change is that "options INSECURE" is no longer required to
dump ACPI tables.


# 1.221 26-Jul-2020 jdolecek

add support for wwanc(4) device nodes (xmm[0-9])


# 1.220 07-Jun-2020 maxv

Add fault(4).


# 1.219 05-Jun-2020 maxv

Register eight vHCI buses, and use separate KCOV mailboxes for them.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406
# 1.218 04-Apr-2020 jdolecek

remove nsmb(4)


# 1.217 01-Apr-2020 gson

Create the qemufwcfg device as part of "all". Discussed with jmcneill.
Also, include it in the list of special purpose devices.


# 1.216 02-Mar-2020 riastradh

Create /dev/ipmi0 in `MAKEDEV all'.

Works on my machine with sysutils/ipmitool if the latter is built
with CONFIGURE_ARGS+= --enable-intf-open.


Revision tags: is-mlppp-base
# 1.215 27-Feb-2020 riastradh

Create some more cgd device nodes.


# 1.214 29-Jan-2020 maya

remove urio(4), a driver for the Rio500 MP3 player.

At this point it is highly unlikely this 1999 device still has users,
but it still comes up in the context of maxv's USB-fuzzing (and any device
could pretend to be a urio(4)), so it's best to get rid of it.

Renamed all major entries to obsolete, as was done in previous removals.

This still requires an update to sanitizers, but they're located in
"external", perhaps it should be first committed upstream?

Proposed on tech-kern a month ago.


# 1.213 19-Jan-2020 riastradh

Remove filemon(4).

Discussed on tech-kern:
https://mail-index.NetBSD.org/tech-kern/2020/01/13/msg025938.html

This was never (intentionally) enabled by default, and the design has
some shortcomings. You can get mostly the same results with ktrace,
as in usr.bin/make/filemon/filemon_ktrace.c which is now used instead
of filemon for make's meta mode.

If applications require higher performance than ktrace, or nesting
that ktrace doesn't support, we might consider adding something back
into the vfs system calls themselves, without hijacking the syscall
table. (Might want a more reliable output format too, e.g. one that
can handle newlines in file names.)


# 1.212 23-Dec-2019 maxv

Revert the removal of filemon.


# 1.211 18-Dec-2019 maxv

Retire filemon, discussed on tech-kern@.


Revision tags: phil-wifi-20191119
# 1.210 01-Nov-2019 ozaki-r

MAKEDEV: add entry for vio9p(4)


# 1.209 27-Oct-2019 maxv

Add the "nvmm" group, and make nvmm_init() public. Sent to tech-kern@ a few
days ago.


# 1.208 19-Sep-2019 thorpej

Create the character device for spiflash, in addition to the block device.
This is needed for getdiskrawname() to DTRT (for installboot(8)).

XXX pullup-9


# 1.207 15-Sep-2019 ryoon

Replace major number in MAKEDEV for vhci


# 1.206 14-Sep-2019 maxv

Add vHCI, a driver which allows to send and receive USB packets directly
from userland via /dev/vhci. Using this, it becomes possible to test and
fuzz the USB stack and all the USB drivers without having the associated
hardware.

The vHCI device has four ports independently addressable.

For each xfer on each port, we create two packets: a setup packet (which
indicates mostly the type of request) and a data packet (which contains
the raw data). These packets are processed by read and write operations
on /dev/vhci: userland poll-reads it to fetch usb_device_request_t
structures, and dispatches the requests depending on bRequest and
bmRequestType.

A few ioctls are available:

VHCI_IOC_GET_INFO - Get the current status
VHCI_IOC_SET_PORT - Choose a vHCI port
VHCI_IOC_USB_ATTACH - Attach a USB device on the current port
VHCI_IOC_USB_DETACH - Detach the USB device on the current port

vHCI has already allowed me to automatically find several bugs in the USB
stack and its drivers.


Revision tags: netbsd-9-base
# 1.205 29-Jul-2019 gdt

branches: 1.205.2;
MAKEDEV.tmpl: Create nodes for 16 USB hubs

As proposed on current-users, but with better formatting.


Revision tags: phil-wifi-20190609
# 1.204 31-May-2019 nia

Raise the number of uhid nodes from 4 to 16.

My keyboard and mouse use multiple device nodes each. I can't use
any other devices once they're attached. With my keyboard, mouse,
and two game controllers attached, a total of 9 nodes are required.

Particularly, high-end keyboards with N-key rollover support require
more device nodes, since they pretend to be multiple keyboards to work
around limitations in the uhid compat spec.

My original intention was to raise it from 4 to 12, but martin
suggested increasing it to 16.

"somewhat insane, but so is reality" - mlelstv


# 1.203 18-May-2019 mlelstv

Add experimental userland interface to IPMI driver. Currently, transactions
(like sensor readout) are locked, so that a userland program may interfere with
envsys operation.

To use this you need a program like ipmitool built with OpenIPMI support.


# 1.202 01-Apr-2019 martin

Double the number of wedge device nodes


# 1.201 27-Mar-2019 mlelstv

Actually use unit number for iscsi device.


# 1.200 26-Mar-2019 pgoyette

Add srt(4) to /etc/MAKEDEV and corresponding update to MAKEDEV.8 man page.


# 1.199 23-Feb-2019 mlelstv

Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).


# 1.198 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


# 1.197 27-Jan-2019 maxv

Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.196 07-Nov-2018 maxv

Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

/usr/include/dev/nvmm/nvmm.h
/usr/include/dev/nvmm/nvmm_ioctl.h
/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.


# 1.195 04-Nov-2018 maxv

Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.194 23-Sep-2018 maxv

Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.


# 1.193 22-Sep-2018 kre

Avoid use of test -o for when this is used as part of an INSTALL system
and the SMALL test does not support -o


Revision tags: pgoyette-compat-0906
# 1.192 28-Jul-2018 sevan

Create fw(4) & fwmem(4) device nodes by default so fwctl(8) works out of the
box.


Revision tags: pgoyette-compat-0728
# 1.191 21-Jul-2018 maxv

Create /dev/ksyms as "440 $g_kmem". This prevents unprivileged users from
reading the kernel symbols. Discussed in January 2018 on tech-kern@,
reported by maya@, tested by tih@.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.190 20-May-2018 thorpej

branches: 1.190.2;
Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.189 09-Jan-2018 christos

branches: 1.189.2;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.233 28-Dec-2022 jakllsch

fix hexprint function


Revision tags: netbsd-10-base
# 1.232 21-Sep-2022 wiz

MAKEDEV: make nvmm node group-writable (was readable only; group nvmm)

Needed by qemu


# 1.231 12-Aug-2022 riastradh

viocon(4): New virtio tty driver imported from OpenBSD.

viocon* at virtio?

/dev/ttyVI??

Tested under qemu with:

qemu-system-aarch64 ... \
-device virtio-serial \
-chardev socket,path=/tmp/ttyVI00,server=on,wait=off,id=ttyVI00 \
-device virtconsole,chardev=ttyVI00,name=org.NetBSD.dev.ttyVI00 \
...

I updated MAKEDEV.conf to create /dev/ttyVI?? on all ports where it
looks likely to work based on:
(a) having pci or a non-pci virtio attachment,
(b) `qemu-system-$ARCH -M ?' mentioned something resembling the port,
and
(c) `qemu-system-$ARCH -device virtio-serial' launched without
complaining about the virtio-serial device.

(Criterion (c) excluded sparc and sparc64.)


# 1.230 17-May-2022 uwe

MAKEDEV.tmpl: make /dev/wsfont world-readable

Now that we have WSDISPLAYIO_LISTFONTS we want users to be able to use it.

NB: older kernels didn't check that WSDISPLAYIO_LDFONT was performed
on wsfont(4) device opened for writing and relied on its restrictive
root-only permissions to restrict who can load fonts.


# 1.229 08-Apr-2022 andvar

fix various typos, mainly in comments, but also log messages, docs, game text.


# 1.228 07-Dec-2021 brad

A driver and user land utility for the Sparkfun Serial Controlled Motor
Driver module as illustrated here:

https://www.sparkfun.com/products/13911

A SCMD module is a ARM SOC simular to a Arduino in front of a motor
driver chip. The single SCMD module can control two motors and up to
16 additional modules can be chained together using an internal I2C
bus. One can interface with the SCMD using tty uart commands, SPI or
I2C. The driver in this commit adds a kernel driver for the I2C and
SPI interfaces. The command line utility provides a set of
convenience commands that support most of the functions of the SCMD
and is able to use the tty uart mode, SPI user land or the included
kernel driver in a uniform manor.

The use of the SCMD module is mostly for small robots and the like,
but it can control anything that is controllable by voltage.


# 1.227 06-Nov-2021 brad

Driver for the Sensirion SHT30/SHT31/SHT35 temperature and humidity
sensor such as:

https://www.adafruit.com/product/2857

This is a higher priced sensor with a lot of features, including the
ability to do sub-second periodic updates. The driver supports
everything about the sensor except for the alert pin.


# 1.226 12-Oct-2021 christos

PR/56452: RVP: MAKEDEV should also create /dev/dri/renderD* devices


# 1.225 10-Oct-2021 jmcneill

efi: Add /dev/efi character device

Introduce a /dev/efi character device that provides a means for accessing
UEFI RT variable services from userland. Compatible with the FreeBSD ioctl
interface for ease of porting their libefivar and associated tools.

The ioctl interface is defined in sys/efiio.h.

To enable support for this on an arch, the kernel needs `pseudo-device efi`
and the MD EFI implementation needs to register its backend by calling
efi_ops_register(). This commit includes an implementation for Arm.


# 1.224 24-Jul-2021 jmcneill

smbios: Add character device for accessing SMBIOS tables

The /dev/smbios character device gives an aperture into physical memory
that allows read-only access to the SMBIOS header and tables.


# 1.223 29-Jun-2021 nia

Remove uscanner(4) driver

This exists for compatibility with a Linux interface which was apparently
deprecated in Linux 2.6. There are various mailing list threads going
back to 2004 where the usefulness of this driver is discussed, but
the conclusion is that scanner software has all moved to using ugen(4)
instead, and enabling this driver will not help you scan things.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.222 06-Dec-2020 jmcneill

acpi: add character device for accessing ACPI tables

The /dev/acpi character device gives an aperture into physical memory
that allows only read access to known ACPI tables: RSDP, XSDT/RSDT, and
the root tables. Adapt acpidump(8) to use this interface by default,
falling back to the old /dev/mem method if it is not available or if
ACPIDUMP_USE_DEVMEM=1 is set in the environment. The user visible benefit
of this change is that "options INSECURE" is no longer required to
dump ACPI tables.


# 1.221 26-Jul-2020 jdolecek

add support for wwanc(4) device nodes (xmm[0-9])


# 1.220 07-Jun-2020 maxv

Add fault(4).


# 1.219 05-Jun-2020 maxv

Register eight vHCI buses, and use separate KCOV mailboxes for them.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406
# 1.218 04-Apr-2020 jdolecek

remove nsmb(4)


# 1.217 01-Apr-2020 gson

Create the qemufwcfg device as part of "all". Discussed with jmcneill.
Also, include it in the list of special purpose devices.


# 1.216 02-Mar-2020 riastradh

Create /dev/ipmi0 in `MAKEDEV all'.

Works on my machine with sysutils/ipmitool if the latter is built
with CONFIGURE_ARGS+= --enable-intf-open.


Revision tags: is-mlppp-base
# 1.215 27-Feb-2020 riastradh

Create some more cgd device nodes.


# 1.214 29-Jan-2020 maya

remove urio(4), a driver for the Rio500 MP3 player.

At this point it is highly unlikely this 1999 device still has users,
but it still comes up in the context of maxv's USB-fuzzing (and any device
could pretend to be a urio(4)), so it's best to get rid of it.

Renamed all major entries to obsolete, as was done in previous removals.

This still requires an update to sanitizers, but they're located in
"external", perhaps it should be first committed upstream?

Proposed on tech-kern a month ago.


# 1.213 19-Jan-2020 riastradh

Remove filemon(4).

Discussed on tech-kern:
https://mail-index.NetBSD.org/tech-kern/2020/01/13/msg025938.html

This was never (intentionally) enabled by default, and the design has
some shortcomings. You can get mostly the same results with ktrace,
as in usr.bin/make/filemon/filemon_ktrace.c which is now used instead
of filemon for make's meta mode.

If applications require higher performance than ktrace, or nesting
that ktrace doesn't support, we might consider adding something back
into the vfs system calls themselves, without hijacking the syscall
table. (Might want a more reliable output format too, e.g. one that
can handle newlines in file names.)


# 1.212 23-Dec-2019 maxv

Revert the removal of filemon.


# 1.211 18-Dec-2019 maxv

Retire filemon, discussed on tech-kern@.


Revision tags: phil-wifi-20191119
# 1.210 01-Nov-2019 ozaki-r

MAKEDEV: add entry for vio9p(4)


# 1.209 27-Oct-2019 maxv

Add the "nvmm" group, and make nvmm_init() public. Sent to tech-kern@ a few
days ago.


# 1.208 19-Sep-2019 thorpej

Create the character device for spiflash, in addition to the block device.
This is needed for getdiskrawname() to DTRT (for installboot(8)).

XXX pullup-9


# 1.207 15-Sep-2019 ryoon

Replace major number in MAKEDEV for vhci


# 1.206 14-Sep-2019 maxv

Add vHCI, a driver which allows to send and receive USB packets directly
from userland via /dev/vhci. Using this, it becomes possible to test and
fuzz the USB stack and all the USB drivers without having the associated
hardware.

The vHCI device has four ports independently addressable.

For each xfer on each port, we create two packets: a setup packet (which
indicates mostly the type of request) and a data packet (which contains
the raw data). These packets are processed by read and write operations
on /dev/vhci: userland poll-reads it to fetch usb_device_request_t
structures, and dispatches the requests depending on bRequest and
bmRequestType.

A few ioctls are available:

VHCI_IOC_GET_INFO - Get the current status
VHCI_IOC_SET_PORT - Choose a vHCI port
VHCI_IOC_USB_ATTACH - Attach a USB device on the current port
VHCI_IOC_USB_DETACH - Detach the USB device on the current port

vHCI has already allowed me to automatically find several bugs in the USB
stack and its drivers.


Revision tags: netbsd-9-base
# 1.205 29-Jul-2019 gdt

branches: 1.205.2;
MAKEDEV.tmpl: Create nodes for 16 USB hubs

As proposed on current-users, but with better formatting.


Revision tags: phil-wifi-20190609
# 1.204 31-May-2019 nia

Raise the number of uhid nodes from 4 to 16.

My keyboard and mouse use multiple device nodes each. I can't use
any other devices once they're attached. With my keyboard, mouse,
and two game controllers attached, a total of 9 nodes are required.

Particularly, high-end keyboards with N-key rollover support require
more device nodes, since they pretend to be multiple keyboards to work
around limitations in the uhid compat spec.

My original intention was to raise it from 4 to 12, but martin
suggested increasing it to 16.

"somewhat insane, but so is reality" - mlelstv


# 1.203 18-May-2019 mlelstv

Add experimental userland interface to IPMI driver. Currently, transactions
(like sensor readout) are locked, so that a userland program may interfere with
envsys operation.

To use this you need a program like ipmitool built with OpenIPMI support.


# 1.202 01-Apr-2019 martin

Double the number of wedge device nodes


# 1.201 27-Mar-2019 mlelstv

Actually use unit number for iscsi device.


# 1.200 26-Mar-2019 pgoyette

Add srt(4) to /etc/MAKEDEV and corresponding update to MAKEDEV.8 man page.


# 1.199 23-Feb-2019 mlelstv

Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).


# 1.198 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


# 1.197 27-Jan-2019 maxv

Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.196 07-Nov-2018 maxv

Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

/usr/include/dev/nvmm/nvmm.h
/usr/include/dev/nvmm/nvmm_ioctl.h
/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.


# 1.195 04-Nov-2018 maxv

Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.194 23-Sep-2018 maxv

Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.


# 1.193 22-Sep-2018 kre

Avoid use of test -o for when this is used as part of an INSTALL system
and the SMALL test does not support -o


Revision tags: pgoyette-compat-0906
# 1.192 28-Jul-2018 sevan

Create fw(4) & fwmem(4) device nodes by default so fwctl(8) works out of the
box.


Revision tags: pgoyette-compat-0728
# 1.191 21-Jul-2018 maxv

Create /dev/ksyms as "440 $g_kmem". This prevents unprivileged users from
reading the kernel symbols. Discussed in January 2018 on tech-kern@,
reported by maya@, tested by tih@.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.190 20-May-2018 thorpej

branches: 1.190.2;
Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.189 09-Jan-2018 christos

branches: 1.189.2;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.232 21-Sep-2022 wiz

MAKEDEV: make nvmm node group-writable (was readable only; group nvmm)

Needed by qemu


# 1.231 12-Aug-2022 riastradh

viocon(4): New virtio tty driver imported from OpenBSD.

viocon* at virtio?

/dev/ttyVI??

Tested under qemu with:

qemu-system-aarch64 ... \
-device virtio-serial \
-chardev socket,path=/tmp/ttyVI00,server=on,wait=off,id=ttyVI00 \
-device virtconsole,chardev=ttyVI00,name=org.NetBSD.dev.ttyVI00 \
...

I updated MAKEDEV.conf to create /dev/ttyVI?? on all ports where it
looks likely to work based on:
(a) having pci or a non-pci virtio attachment,
(b) `qemu-system-$ARCH -M ?' mentioned something resembling the port,
and
(c) `qemu-system-$ARCH -device virtio-serial' launched without
complaining about the virtio-serial device.

(Criterion (c) excluded sparc and sparc64.)


# 1.230 17-May-2022 uwe

MAKEDEV.tmpl: make /dev/wsfont world-readable

Now that we have WSDISPLAYIO_LISTFONTS we want users to be able to use it.

NB: older kernels didn't check that WSDISPLAYIO_LDFONT was performed
on wsfont(4) device opened for writing and relied on its restrictive
root-only permissions to restrict who can load fonts.


# 1.229 08-Apr-2022 andvar

fix various typos, mainly in comments, but also log messages, docs, game text.


# 1.228 07-Dec-2021 brad

A driver and user land utility for the Sparkfun Serial Controlled Motor
Driver module as illustrated here:

https://www.sparkfun.com/products/13911

A SCMD module is a ARM SOC simular to a Arduino in front of a motor
driver chip. The single SCMD module can control two motors and up to
16 additional modules can be chained together using an internal I2C
bus. One can interface with the SCMD using tty uart commands, SPI or
I2C. The driver in this commit adds a kernel driver for the I2C and
SPI interfaces. The command line utility provides a set of
convenience commands that support most of the functions of the SCMD
and is able to use the tty uart mode, SPI user land or the included
kernel driver in a uniform manor.

The use of the SCMD module is mostly for small robots and the like,
but it can control anything that is controllable by voltage.


# 1.227 06-Nov-2021 brad

Driver for the Sensirion SHT30/SHT31/SHT35 temperature and humidity
sensor such as:

https://www.adafruit.com/product/2857

This is a higher priced sensor with a lot of features, including the
ability to do sub-second periodic updates. The driver supports
everything about the sensor except for the alert pin.


# 1.226 12-Oct-2021 christos

PR/56452: RVP: MAKEDEV should also create /dev/dri/renderD* devices


# 1.225 10-Oct-2021 jmcneill

efi: Add /dev/efi character device

Introduce a /dev/efi character device that provides a means for accessing
UEFI RT variable services from userland. Compatible with the FreeBSD ioctl
interface for ease of porting their libefivar and associated tools.

The ioctl interface is defined in sys/efiio.h.

To enable support for this on an arch, the kernel needs `pseudo-device efi`
and the MD EFI implementation needs to register its backend by calling
efi_ops_register(). This commit includes an implementation for Arm.


# 1.224 24-Jul-2021 jmcneill

smbios: Add character device for accessing SMBIOS tables

The /dev/smbios character device gives an aperture into physical memory
that allows read-only access to the SMBIOS header and tables.


# 1.223 29-Jun-2021 nia

Remove uscanner(4) driver

This exists for compatibility with a Linux interface which was apparently
deprecated in Linux 2.6. There are various mailing list threads going
back to 2004 where the usefulness of this driver is discussed, but
the conclusion is that scanner software has all moved to using ugen(4)
instead, and enabling this driver will not help you scan things.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.222 06-Dec-2020 jmcneill

acpi: add character device for accessing ACPI tables

The /dev/acpi character device gives an aperture into physical memory
that allows only read access to known ACPI tables: RSDP, XSDT/RSDT, and
the root tables. Adapt acpidump(8) to use this interface by default,
falling back to the old /dev/mem method if it is not available or if
ACPIDUMP_USE_DEVMEM=1 is set in the environment. The user visible benefit
of this change is that "options INSECURE" is no longer required to
dump ACPI tables.


# 1.221 26-Jul-2020 jdolecek

add support for wwanc(4) device nodes (xmm[0-9])


# 1.220 07-Jun-2020 maxv

Add fault(4).


# 1.219 05-Jun-2020 maxv

Register eight vHCI buses, and use separate KCOV mailboxes for them.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406
# 1.218 04-Apr-2020 jdolecek

remove nsmb(4)


# 1.217 01-Apr-2020 gson

Create the qemufwcfg device as part of "all". Discussed with jmcneill.
Also, include it in the list of special purpose devices.


# 1.216 02-Mar-2020 riastradh

Create /dev/ipmi0 in `MAKEDEV all'.

Works on my machine with sysutils/ipmitool if the latter is built
with CONFIGURE_ARGS+= --enable-intf-open.


Revision tags: is-mlppp-base
# 1.215 27-Feb-2020 riastradh

Create some more cgd device nodes.


# 1.214 29-Jan-2020 maya

remove urio(4), a driver for the Rio500 MP3 player.

At this point it is highly unlikely this 1999 device still has users,
but it still comes up in the context of maxv's USB-fuzzing (and any device
could pretend to be a urio(4)), so it's best to get rid of it.

Renamed all major entries to obsolete, as was done in previous removals.

This still requires an update to sanitizers, but they're located in
"external", perhaps it should be first committed upstream?

Proposed on tech-kern a month ago.


# 1.213 19-Jan-2020 riastradh

Remove filemon(4).

Discussed on tech-kern:
https://mail-index.NetBSD.org/tech-kern/2020/01/13/msg025938.html

This was never (intentionally) enabled by default, and the design has
some shortcomings. You can get mostly the same results with ktrace,
as in usr.bin/make/filemon/filemon_ktrace.c which is now used instead
of filemon for make's meta mode.

If applications require higher performance than ktrace, or nesting
that ktrace doesn't support, we might consider adding something back
into the vfs system calls themselves, without hijacking the syscall
table. (Might want a more reliable output format too, e.g. one that
can handle newlines in file names.)


# 1.212 23-Dec-2019 maxv

Revert the removal of filemon.


# 1.211 18-Dec-2019 maxv

Retire filemon, discussed on tech-kern@.


Revision tags: phil-wifi-20191119
# 1.210 01-Nov-2019 ozaki-r

MAKEDEV: add entry for vio9p(4)


# 1.209 27-Oct-2019 maxv

Add the "nvmm" group, and make nvmm_init() public. Sent to tech-kern@ a few
days ago.


# 1.208 19-Sep-2019 thorpej

Create the character device for spiflash, in addition to the block device.
This is needed for getdiskrawname() to DTRT (for installboot(8)).

XXX pullup-9


# 1.207 15-Sep-2019 ryoon

Replace major number in MAKEDEV for vhci


# 1.206 14-Sep-2019 maxv

Add vHCI, a driver which allows to send and receive USB packets directly
from userland via /dev/vhci. Using this, it becomes possible to test and
fuzz the USB stack and all the USB drivers without having the associated
hardware.

The vHCI device has four ports independently addressable.

For each xfer on each port, we create two packets: a setup packet (which
indicates mostly the type of request) and a data packet (which contains
the raw data). These packets are processed by read and write operations
on /dev/vhci: userland poll-reads it to fetch usb_device_request_t
structures, and dispatches the requests depending on bRequest and
bmRequestType.

A few ioctls are available:

VHCI_IOC_GET_INFO - Get the current status
VHCI_IOC_SET_PORT - Choose a vHCI port
VHCI_IOC_USB_ATTACH - Attach a USB device on the current port
VHCI_IOC_USB_DETACH - Detach the USB device on the current port

vHCI has already allowed me to automatically find several bugs in the USB
stack and its drivers.


Revision tags: netbsd-9-base
# 1.205 29-Jul-2019 gdt

branches: 1.205.2;
MAKEDEV.tmpl: Create nodes for 16 USB hubs

As proposed on current-users, but with better formatting.


Revision tags: phil-wifi-20190609
# 1.204 31-May-2019 nia

Raise the number of uhid nodes from 4 to 16.

My keyboard and mouse use multiple device nodes each. I can't use
any other devices once they're attached. With my keyboard, mouse,
and two game controllers attached, a total of 9 nodes are required.

Particularly, high-end keyboards with N-key rollover support require
more device nodes, since they pretend to be multiple keyboards to work
around limitations in the uhid compat spec.

My original intention was to raise it from 4 to 12, but martin
suggested increasing it to 16.

"somewhat insane, but so is reality" - mlelstv


# 1.203 18-May-2019 mlelstv

Add experimental userland interface to IPMI driver. Currently, transactions
(like sensor readout) are locked, so that a userland program may interfere with
envsys operation.

To use this you need a program like ipmitool built with OpenIPMI support.


# 1.202 01-Apr-2019 martin

Double the number of wedge device nodes


# 1.201 27-Mar-2019 mlelstv

Actually use unit number for iscsi device.


# 1.200 26-Mar-2019 pgoyette

Add srt(4) to /etc/MAKEDEV and corresponding update to MAKEDEV.8 man page.


# 1.199 23-Feb-2019 mlelstv

Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).


# 1.198 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


# 1.197 27-Jan-2019 maxv

Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.196 07-Nov-2018 maxv

Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

/usr/include/dev/nvmm/nvmm.h
/usr/include/dev/nvmm/nvmm_ioctl.h
/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.


# 1.195 04-Nov-2018 maxv

Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.194 23-Sep-2018 maxv

Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.


# 1.193 22-Sep-2018 kre

Avoid use of test -o for when this is used as part of an INSTALL system
and the SMALL test does not support -o


Revision tags: pgoyette-compat-0906
# 1.192 28-Jul-2018 sevan

Create fw(4) & fwmem(4) device nodes by default so fwctl(8) works out of the
box.


Revision tags: pgoyette-compat-0728
# 1.191 21-Jul-2018 maxv

Create /dev/ksyms as "440 $g_kmem". This prevents unprivileged users from
reading the kernel symbols. Discussed in January 2018 on tech-kern@,
reported by maya@, tested by tih@.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.190 20-May-2018 thorpej

branches: 1.190.2;
Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.189 09-Jan-2018 christos

branches: 1.189.2;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.231 12-Aug-2022 riastradh

viocon(4): New virtio tty driver imported from OpenBSD.

viocon* at virtio?

/dev/ttyVI??

Tested under qemu with:

qemu-system-aarch64 ... \
-device virtio-serial \
-chardev socket,path=/tmp/ttyVI00,server=on,wait=off,id=ttyVI00 \
-device virtconsole,chardev=ttyVI00,name=org.NetBSD.dev.ttyVI00 \
...

I updated MAKEDEV.conf to create /dev/ttyVI?? on all ports where it
looks likely to work based on:
(a) having pci or a non-pci virtio attachment,
(b) `qemu-system-$ARCH -M ?' mentioned something resembling the port,
and
(c) `qemu-system-$ARCH -device virtio-serial' launched without
complaining about the virtio-serial device.

(Criterion (c) excluded sparc and sparc64.)


# 1.230 17-May-2022 uwe

MAKEDEV.tmpl: make /dev/wsfont world-readable

Now that we have WSDISPLAYIO_LISTFONTS we want users to be able to use it.

NB: older kernels didn't check that WSDISPLAYIO_LDFONT was performed
on wsfont(4) device opened for writing and relied on its restrictive
root-only permissions to restrict who can load fonts.


# 1.229 08-Apr-2022 andvar

fix various typos, mainly in comments, but also log messages, docs, game text.


# 1.228 07-Dec-2021 brad

A driver and user land utility for the Sparkfun Serial Controlled Motor
Driver module as illustrated here:

https://www.sparkfun.com/products/13911

A SCMD module is a ARM SOC simular to a Arduino in front of a motor
driver chip. The single SCMD module can control two motors and up to
16 additional modules can be chained together using an internal I2C
bus. One can interface with the SCMD using tty uart commands, SPI or
I2C. The driver in this commit adds a kernel driver for the I2C and
SPI interfaces. The command line utility provides a set of
convenience commands that support most of the functions of the SCMD
and is able to use the tty uart mode, SPI user land or the included
kernel driver in a uniform manor.

The use of the SCMD module is mostly for small robots and the like,
but it can control anything that is controllable by voltage.


# 1.227 06-Nov-2021 brad

Driver for the Sensirion SHT30/SHT31/SHT35 temperature and humidity
sensor such as:

https://www.adafruit.com/product/2857

This is a higher priced sensor with a lot of features, including the
ability to do sub-second periodic updates. The driver supports
everything about the sensor except for the alert pin.


# 1.226 12-Oct-2021 christos

PR/56452: RVP: MAKEDEV should also create /dev/dri/renderD* devices


# 1.225 10-Oct-2021 jmcneill

efi: Add /dev/efi character device

Introduce a /dev/efi character device that provides a means for accessing
UEFI RT variable services from userland. Compatible with the FreeBSD ioctl
interface for ease of porting their libefivar and associated tools.

The ioctl interface is defined in sys/efiio.h.

To enable support for this on an arch, the kernel needs `pseudo-device efi`
and the MD EFI implementation needs to register its backend by calling
efi_ops_register(). This commit includes an implementation for Arm.


# 1.224 24-Jul-2021 jmcneill

smbios: Add character device for accessing SMBIOS tables

The /dev/smbios character device gives an aperture into physical memory
that allows read-only access to the SMBIOS header and tables.


# 1.223 29-Jun-2021 nia

Remove uscanner(4) driver

This exists for compatibility with a Linux interface which was apparently
deprecated in Linux 2.6. There are various mailing list threads going
back to 2004 where the usefulness of this driver is discussed, but
the conclusion is that scanner software has all moved to using ugen(4)
instead, and enabling this driver will not help you scan things.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.222 06-Dec-2020 jmcneill

acpi: add character device for accessing ACPI tables

The /dev/acpi character device gives an aperture into physical memory
that allows only read access to known ACPI tables: RSDP, XSDT/RSDT, and
the root tables. Adapt acpidump(8) to use this interface by default,
falling back to the old /dev/mem method if it is not available or if
ACPIDUMP_USE_DEVMEM=1 is set in the environment. The user visible benefit
of this change is that "options INSECURE" is no longer required to
dump ACPI tables.


# 1.221 26-Jul-2020 jdolecek

add support for wwanc(4) device nodes (xmm[0-9])


# 1.220 07-Jun-2020 maxv

Add fault(4).


# 1.219 05-Jun-2020 maxv

Register eight vHCI buses, and use separate KCOV mailboxes for them.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406
# 1.218 04-Apr-2020 jdolecek

remove nsmb(4)


# 1.217 01-Apr-2020 gson

Create the qemufwcfg device as part of "all". Discussed with jmcneill.
Also, include it in the list of special purpose devices.


# 1.216 02-Mar-2020 riastradh

Create /dev/ipmi0 in `MAKEDEV all'.

Works on my machine with sysutils/ipmitool if the latter is built
with CONFIGURE_ARGS+= --enable-intf-open.


Revision tags: is-mlppp-base
# 1.215 27-Feb-2020 riastradh

Create some more cgd device nodes.


# 1.214 29-Jan-2020 maya

remove urio(4), a driver for the Rio500 MP3 player.

At this point it is highly unlikely this 1999 device still has users,
but it still comes up in the context of maxv's USB-fuzzing (and any device
could pretend to be a urio(4)), so it's best to get rid of it.

Renamed all major entries to obsolete, as was done in previous removals.

This still requires an update to sanitizers, but they're located in
"external", perhaps it should be first committed upstream?

Proposed on tech-kern a month ago.


# 1.213 19-Jan-2020 riastradh

Remove filemon(4).

Discussed on tech-kern:
https://mail-index.NetBSD.org/tech-kern/2020/01/13/msg025938.html

This was never (intentionally) enabled by default, and the design has
some shortcomings. You can get mostly the same results with ktrace,
as in usr.bin/make/filemon/filemon_ktrace.c which is now used instead
of filemon for make's meta mode.

If applications require higher performance than ktrace, or nesting
that ktrace doesn't support, we might consider adding something back
into the vfs system calls themselves, without hijacking the syscall
table. (Might want a more reliable output format too, e.g. one that
can handle newlines in file names.)


# 1.212 23-Dec-2019 maxv

Revert the removal of filemon.


# 1.211 18-Dec-2019 maxv

Retire filemon, discussed on tech-kern@.


Revision tags: phil-wifi-20191119
# 1.210 01-Nov-2019 ozaki-r

MAKEDEV: add entry for vio9p(4)


# 1.209 27-Oct-2019 maxv

Add the "nvmm" group, and make nvmm_init() public. Sent to tech-kern@ a few
days ago.


# 1.208 19-Sep-2019 thorpej

Create the character device for spiflash, in addition to the block device.
This is needed for getdiskrawname() to DTRT (for installboot(8)).

XXX pullup-9


# 1.207 15-Sep-2019 ryoon

Replace major number in MAKEDEV for vhci


# 1.206 14-Sep-2019 maxv

Add vHCI, a driver which allows to send and receive USB packets directly
from userland via /dev/vhci. Using this, it becomes possible to test and
fuzz the USB stack and all the USB drivers without having the associated
hardware.

The vHCI device has four ports independently addressable.

For each xfer on each port, we create two packets: a setup packet (which
indicates mostly the type of request) and a data packet (which contains
the raw data). These packets are processed by read and write operations
on /dev/vhci: userland poll-reads it to fetch usb_device_request_t
structures, and dispatches the requests depending on bRequest and
bmRequestType.

A few ioctls are available:

VHCI_IOC_GET_INFO - Get the current status
VHCI_IOC_SET_PORT - Choose a vHCI port
VHCI_IOC_USB_ATTACH - Attach a USB device on the current port
VHCI_IOC_USB_DETACH - Detach the USB device on the current port

vHCI has already allowed me to automatically find several bugs in the USB
stack and its drivers.


Revision tags: netbsd-9-base
# 1.205 29-Jul-2019 gdt

branches: 1.205.2;
MAKEDEV.tmpl: Create nodes for 16 USB hubs

As proposed on current-users, but with better formatting.


Revision tags: phil-wifi-20190609
# 1.204 31-May-2019 nia

Raise the number of uhid nodes from 4 to 16.

My keyboard and mouse use multiple device nodes each. I can't use
any other devices once they're attached. With my keyboard, mouse,
and two game controllers attached, a total of 9 nodes are required.

Particularly, high-end keyboards with N-key rollover support require
more device nodes, since they pretend to be multiple keyboards to work
around limitations in the uhid compat spec.

My original intention was to raise it from 4 to 12, but martin
suggested increasing it to 16.

"somewhat insane, but so is reality" - mlelstv


# 1.203 18-May-2019 mlelstv

Add experimental userland interface to IPMI driver. Currently, transactions
(like sensor readout) are locked, so that a userland program may interfere with
envsys operation.

To use this you need a program like ipmitool built with OpenIPMI support.


# 1.202 01-Apr-2019 martin

Double the number of wedge device nodes


# 1.201 27-Mar-2019 mlelstv

Actually use unit number for iscsi device.


# 1.200 26-Mar-2019 pgoyette

Add srt(4) to /etc/MAKEDEV and corresponding update to MAKEDEV.8 man page.


# 1.199 23-Feb-2019 mlelstv

Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).


# 1.198 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


# 1.197 27-Jan-2019 maxv

Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.196 07-Nov-2018 maxv

Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

/usr/include/dev/nvmm/nvmm.h
/usr/include/dev/nvmm/nvmm_ioctl.h
/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.


# 1.195 04-Nov-2018 maxv

Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.194 23-Sep-2018 maxv

Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.


# 1.193 22-Sep-2018 kre

Avoid use of test -o for when this is used as part of an INSTALL system
and the SMALL test does not support -o


Revision tags: pgoyette-compat-0906
# 1.192 28-Jul-2018 sevan

Create fw(4) & fwmem(4) device nodes by default so fwctl(8) works out of the
box.


Revision tags: pgoyette-compat-0728
# 1.191 21-Jul-2018 maxv

Create /dev/ksyms as "440 $g_kmem". This prevents unprivileged users from
reading the kernel symbols. Discussed in January 2018 on tech-kern@,
reported by maya@, tested by tih@.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.190 20-May-2018 thorpej

branches: 1.190.2;
Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.189 09-Jan-2018 christos

branches: 1.189.2;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.230 17-May-2022 uwe

MAKEDEV.tmpl: make /dev/wsfont world-readable

Now that we have WSDISPLAYIO_LISTFONTS we want users to be able to use it.

NB: older kernels didn't check that WSDISPLAYIO_LDFONT was performed
on wsfont(4) device opened for writing and relied on its restrictive
root-only permissions to restrict who can load fonts.


# 1.229 08-Apr-2022 andvar

fix various typos, mainly in comments, but also log messages, docs, game text.


# 1.228 07-Dec-2021 brad

A driver and user land utility for the Sparkfun Serial Controlled Motor
Driver module as illustrated here:

https://www.sparkfun.com/products/13911

A SCMD module is a ARM SOC simular to a Arduino in front of a motor
driver chip. The single SCMD module can control two motors and up to
16 additional modules can be chained together using an internal I2C
bus. One can interface with the SCMD using tty uart commands, SPI or
I2C. The driver in this commit adds a kernel driver for the I2C and
SPI interfaces. The command line utility provides a set of
convenience commands that support most of the functions of the SCMD
and is able to use the tty uart mode, SPI user land or the included
kernel driver in a uniform manor.

The use of the SCMD module is mostly for small robots and the like,
but it can control anything that is controllable by voltage.


# 1.227 06-Nov-2021 brad

Driver for the Sensirion SHT30/SHT31/SHT35 temperature and humidity
sensor such as:

https://www.adafruit.com/product/2857

This is a higher priced sensor with a lot of features, including the
ability to do sub-second periodic updates. The driver supports
everything about the sensor except for the alert pin.


# 1.226 12-Oct-2021 christos

PR/56452: RVP: MAKEDEV should also create /dev/dri/renderD* devices


# 1.225 10-Oct-2021 jmcneill

efi: Add /dev/efi character device

Introduce a /dev/efi character device that provides a means for accessing
UEFI RT variable services from userland. Compatible with the FreeBSD ioctl
interface for ease of porting their libefivar and associated tools.

The ioctl interface is defined in sys/efiio.h.

To enable support for this on an arch, the kernel needs `pseudo-device efi`
and the MD EFI implementation needs to register its backend by calling
efi_ops_register(). This commit includes an implementation for Arm.


# 1.224 24-Jul-2021 jmcneill

smbios: Add character device for accessing SMBIOS tables

The /dev/smbios character device gives an aperture into physical memory
that allows read-only access to the SMBIOS header and tables.


# 1.223 29-Jun-2021 nia

Remove uscanner(4) driver

This exists for compatibility with a Linux interface which was apparently
deprecated in Linux 2.6. There are various mailing list threads going
back to 2004 where the usefulness of this driver is discussed, but
the conclusion is that scanner software has all moved to using ugen(4)
instead, and enabling this driver will not help you scan things.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.222 06-Dec-2020 jmcneill

acpi: add character device for accessing ACPI tables

The /dev/acpi character device gives an aperture into physical memory
that allows only read access to known ACPI tables: RSDP, XSDT/RSDT, and
the root tables. Adapt acpidump(8) to use this interface by default,
falling back to the old /dev/mem method if it is not available or if
ACPIDUMP_USE_DEVMEM=1 is set in the environment. The user visible benefit
of this change is that "options INSECURE" is no longer required to
dump ACPI tables.


# 1.221 26-Jul-2020 jdolecek

add support for wwanc(4) device nodes (xmm[0-9])


# 1.220 07-Jun-2020 maxv

Add fault(4).


# 1.219 05-Jun-2020 maxv

Register eight vHCI buses, and use separate KCOV mailboxes for them.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406
# 1.218 04-Apr-2020 jdolecek

remove nsmb(4)


# 1.217 01-Apr-2020 gson

Create the qemufwcfg device as part of "all". Discussed with jmcneill.
Also, include it in the list of special purpose devices.


# 1.216 02-Mar-2020 riastradh

Create /dev/ipmi0 in `MAKEDEV all'.

Works on my machine with sysutils/ipmitool if the latter is built
with CONFIGURE_ARGS+= --enable-intf-open.


Revision tags: is-mlppp-base
# 1.215 27-Feb-2020 riastradh

Create some more cgd device nodes.


# 1.214 29-Jan-2020 maya

remove urio(4), a driver for the Rio500 MP3 player.

At this point it is highly unlikely this 1999 device still has users,
but it still comes up in the context of maxv's USB-fuzzing (and any device
could pretend to be a urio(4)), so it's best to get rid of it.

Renamed all major entries to obsolete, as was done in previous removals.

This still requires an update to sanitizers, but they're located in
"external", perhaps it should be first committed upstream?

Proposed on tech-kern a month ago.


# 1.213 19-Jan-2020 riastradh

Remove filemon(4).

Discussed on tech-kern:
https://mail-index.NetBSD.org/tech-kern/2020/01/13/msg025938.html

This was never (intentionally) enabled by default, and the design has
some shortcomings. You can get mostly the same results with ktrace,
as in usr.bin/make/filemon/filemon_ktrace.c which is now used instead
of filemon for make's meta mode.

If applications require higher performance than ktrace, or nesting
that ktrace doesn't support, we might consider adding something back
into the vfs system calls themselves, without hijacking the syscall
table. (Might want a more reliable output format too, e.g. one that
can handle newlines in file names.)


# 1.212 23-Dec-2019 maxv

Revert the removal of filemon.


# 1.211 18-Dec-2019 maxv

Retire filemon, discussed on tech-kern@.


Revision tags: phil-wifi-20191119
# 1.210 01-Nov-2019 ozaki-r

MAKEDEV: add entry for vio9p(4)


# 1.209 27-Oct-2019 maxv

Add the "nvmm" group, and make nvmm_init() public. Sent to tech-kern@ a few
days ago.


# 1.208 19-Sep-2019 thorpej

Create the character device for spiflash, in addition to the block device.
This is needed for getdiskrawname() to DTRT (for installboot(8)).

XXX pullup-9


# 1.207 15-Sep-2019 ryoon

Replace major number in MAKEDEV for vhci


# 1.206 14-Sep-2019 maxv

Add vHCI, a driver which allows to send and receive USB packets directly
from userland via /dev/vhci. Using this, it becomes possible to test and
fuzz the USB stack and all the USB drivers without having the associated
hardware.

The vHCI device has four ports independently addressable.

For each xfer on each port, we create two packets: a setup packet (which
indicates mostly the type of request) and a data packet (which contains
the raw data). These packets are processed by read and write operations
on /dev/vhci: userland poll-reads it to fetch usb_device_request_t
structures, and dispatches the requests depending on bRequest and
bmRequestType.

A few ioctls are available:

VHCI_IOC_GET_INFO - Get the current status
VHCI_IOC_SET_PORT - Choose a vHCI port
VHCI_IOC_USB_ATTACH - Attach a USB device on the current port
VHCI_IOC_USB_DETACH - Detach the USB device on the current port

vHCI has already allowed me to automatically find several bugs in the USB
stack and its drivers.


Revision tags: netbsd-9-base
# 1.205 29-Jul-2019 gdt

branches: 1.205.2;
MAKEDEV.tmpl: Create nodes for 16 USB hubs

As proposed on current-users, but with better formatting.


Revision tags: phil-wifi-20190609
# 1.204 31-May-2019 nia

Raise the number of uhid nodes from 4 to 16.

My keyboard and mouse use multiple device nodes each. I can't use
any other devices once they're attached. With my keyboard, mouse,
and two game controllers attached, a total of 9 nodes are required.

Particularly, high-end keyboards with N-key rollover support require
more device nodes, since they pretend to be multiple keyboards to work
around limitations in the uhid compat spec.

My original intention was to raise it from 4 to 12, but martin
suggested increasing it to 16.

"somewhat insane, but so is reality" - mlelstv


# 1.203 18-May-2019 mlelstv

Add experimental userland interface to IPMI driver. Currently, transactions
(like sensor readout) are locked, so that a userland program may interfere with
envsys operation.

To use this you need a program like ipmitool built with OpenIPMI support.


# 1.202 01-Apr-2019 martin

Double the number of wedge device nodes


# 1.201 27-Mar-2019 mlelstv

Actually use unit number for iscsi device.


# 1.200 26-Mar-2019 pgoyette

Add srt(4) to /etc/MAKEDEV and corresponding update to MAKEDEV.8 man page.


# 1.199 23-Feb-2019 mlelstv

Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).


# 1.198 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


# 1.197 27-Jan-2019 maxv

Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.196 07-Nov-2018 maxv

Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

/usr/include/dev/nvmm/nvmm.h
/usr/include/dev/nvmm/nvmm_ioctl.h
/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.


# 1.195 04-Nov-2018 maxv

Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.194 23-Sep-2018 maxv

Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.


# 1.193 22-Sep-2018 kre

Avoid use of test -o for when this is used as part of an INSTALL system
and the SMALL test does not support -o


Revision tags: pgoyette-compat-0906
# 1.192 28-Jul-2018 sevan

Create fw(4) & fwmem(4) device nodes by default so fwctl(8) works out of the
box.


Revision tags: pgoyette-compat-0728
# 1.191 21-Jul-2018 maxv

Create /dev/ksyms as "440 $g_kmem". This prevents unprivileged users from
reading the kernel symbols. Discussed in January 2018 on tech-kern@,
reported by maya@, tested by tih@.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.190 20-May-2018 thorpej

branches: 1.190.2;
Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.189 09-Jan-2018 christos

branches: 1.189.2;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.229 08-Apr-2022 andvar

fix various typos, mainly in comments, but also log messages, docs, game text.


# 1.228 07-Dec-2021 brad

A driver and user land utility for the Sparkfun Serial Controlled Motor
Driver module as illustrated here:

https://www.sparkfun.com/products/13911

A SCMD module is a ARM SOC simular to a Arduino in front of a motor
driver chip. The single SCMD module can control two motors and up to
16 additional modules can be chained together using an internal I2C
bus. One can interface with the SCMD using tty uart commands, SPI or
I2C. The driver in this commit adds a kernel driver for the I2C and
SPI interfaces. The command line utility provides a set of
convenience commands that support most of the functions of the SCMD
and is able to use the tty uart mode, SPI user land or the included
kernel driver in a uniform manor.

The use of the SCMD module is mostly for small robots and the like,
but it can control anything that is controllable by voltage.


# 1.227 06-Nov-2021 brad

Driver for the Sensirion SHT30/SHT31/SHT35 temperature and humidity
sensor such as:

https://www.adafruit.com/product/2857

This is a higher priced sensor with a lot of features, including the
ability to do sub-second periodic updates. The driver supports
everything about the sensor except for the alert pin.


# 1.226 12-Oct-2021 christos

PR/56452: RVP: MAKEDEV should also create /dev/dri/renderD* devices


# 1.225 10-Oct-2021 jmcneill

efi: Add /dev/efi character device

Introduce a /dev/efi character device that provides a means for accessing
UEFI RT variable services from userland. Compatible with the FreeBSD ioctl
interface for ease of porting their libefivar and associated tools.

The ioctl interface is defined in sys/efiio.h.

To enable support for this on an arch, the kernel needs `pseudo-device efi`
and the MD EFI implementation needs to register its backend by calling
efi_ops_register(). This commit includes an implementation for Arm.


# 1.224 24-Jul-2021 jmcneill

smbios: Add character device for accessing SMBIOS tables

The /dev/smbios character device gives an aperture into physical memory
that allows read-only access to the SMBIOS header and tables.


# 1.223 29-Jun-2021 nia

Remove uscanner(4) driver

This exists for compatibility with a Linux interface which was apparently
deprecated in Linux 2.6. There are various mailing list threads going
back to 2004 where the usefulness of this driver is discussed, but
the conclusion is that scanner software has all moved to using ugen(4)
instead, and enabling this driver will not help you scan things.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.222 06-Dec-2020 jmcneill

acpi: add character device for accessing ACPI tables

The /dev/acpi character device gives an aperture into physical memory
that allows only read access to known ACPI tables: RSDP, XSDT/RSDT, and
the root tables. Adapt acpidump(8) to use this interface by default,
falling back to the old /dev/mem method if it is not available or if
ACPIDUMP_USE_DEVMEM=1 is set in the environment. The user visible benefit
of this change is that "options INSECURE" is no longer required to
dump ACPI tables.


# 1.221 26-Jul-2020 jdolecek

add support for wwanc(4) device nodes (xmm[0-9])


# 1.220 07-Jun-2020 maxv

Add fault(4).


# 1.219 05-Jun-2020 maxv

Register eight vHCI buses, and use separate KCOV mailboxes for them.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406
# 1.218 04-Apr-2020 jdolecek

remove nsmb(4)


# 1.217 01-Apr-2020 gson

Create the qemufwcfg device as part of "all". Discussed with jmcneill.
Also, include it in the list of special purpose devices.


# 1.216 02-Mar-2020 riastradh

Create /dev/ipmi0 in `MAKEDEV all'.

Works on my machine with sysutils/ipmitool if the latter is built
with CONFIGURE_ARGS+= --enable-intf-open.


Revision tags: is-mlppp-base
# 1.215 27-Feb-2020 riastradh

Create some more cgd device nodes.


# 1.214 29-Jan-2020 maya

remove urio(4), a driver for the Rio500 MP3 player.

At this point it is highly unlikely this 1999 device still has users,
but it still comes up in the context of maxv's USB-fuzzing (and any device
could pretend to be a urio(4)), so it's best to get rid of it.

Renamed all major entries to obsolete, as was done in previous removals.

This still requires an update to sanitizers, but they're located in
"external", perhaps it should be first committed upstream?

Proposed on tech-kern a month ago.


# 1.213 19-Jan-2020 riastradh

Remove filemon(4).

Discussed on tech-kern:
https://mail-index.NetBSD.org/tech-kern/2020/01/13/msg025938.html

This was never (intentionally) enabled by default, and the design has
some shortcomings. You can get mostly the same results with ktrace,
as in usr.bin/make/filemon/filemon_ktrace.c which is now used instead
of filemon for make's meta mode.

If applications require higher performance than ktrace, or nesting
that ktrace doesn't support, we might consider adding something back
into the vfs system calls themselves, without hijacking the syscall
table. (Might want a more reliable output format too, e.g. one that
can handle newlines in file names.)


# 1.212 23-Dec-2019 maxv

Revert the removal of filemon.


# 1.211 18-Dec-2019 maxv

Retire filemon, discussed on tech-kern@.


Revision tags: phil-wifi-20191119
# 1.210 01-Nov-2019 ozaki-r

MAKEDEV: add entry for vio9p(4)


# 1.209 27-Oct-2019 maxv

Add the "nvmm" group, and make nvmm_init() public. Sent to tech-kern@ a few
days ago.


# 1.208 19-Sep-2019 thorpej

Create the character device for spiflash, in addition to the block device.
This is needed for getdiskrawname() to DTRT (for installboot(8)).

XXX pullup-9


# 1.207 15-Sep-2019 ryoon

Replace major number in MAKEDEV for vhci


# 1.206 14-Sep-2019 maxv

Add vHCI, a driver which allows to send and receive USB packets directly
from userland via /dev/vhci. Using this, it becomes possible to test and
fuzz the USB stack and all the USB drivers without having the associated
hardware.

The vHCI device has four ports independently addressable.

For each xfer on each port, we create two packets: a setup packet (which
indicates mostly the type of request) and a data packet (which contains
the raw data). These packets are processed by read and write operations
on /dev/vhci: userland poll-reads it to fetch usb_device_request_t
structures, and dispatches the requests depending on bRequest and
bmRequestType.

A few ioctls are available:

VHCI_IOC_GET_INFO - Get the current status
VHCI_IOC_SET_PORT - Choose a vHCI port
VHCI_IOC_USB_ATTACH - Attach a USB device on the current port
VHCI_IOC_USB_DETACH - Detach the USB device on the current port

vHCI has already allowed me to automatically find several bugs in the USB
stack and its drivers.


Revision tags: netbsd-9-base
# 1.205 29-Jul-2019 gdt

branches: 1.205.2;
MAKEDEV.tmpl: Create nodes for 16 USB hubs

As proposed on current-users, but with better formatting.


Revision tags: phil-wifi-20190609
# 1.204 31-May-2019 nia

Raise the number of uhid nodes from 4 to 16.

My keyboard and mouse use multiple device nodes each. I can't use
any other devices once they're attached. With my keyboard, mouse,
and two game controllers attached, a total of 9 nodes are required.

Particularly, high-end keyboards with N-key rollover support require
more device nodes, since they pretend to be multiple keyboards to work
around limitations in the uhid compat spec.

My original intention was to raise it from 4 to 12, but martin
suggested increasing it to 16.

"somewhat insane, but so is reality" - mlelstv


# 1.203 18-May-2019 mlelstv

Add experimental userland interface to IPMI driver. Currently, transactions
(like sensor readout) are locked, so that a userland program may interfere with
envsys operation.

To use this you need a program like ipmitool built with OpenIPMI support.


# 1.202 01-Apr-2019 martin

Double the number of wedge device nodes


# 1.201 27-Mar-2019 mlelstv

Actually use unit number for iscsi device.


# 1.200 26-Mar-2019 pgoyette

Add srt(4) to /etc/MAKEDEV and corresponding update to MAKEDEV.8 man page.


# 1.199 23-Feb-2019 mlelstv

Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).


# 1.198 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


# 1.197 27-Jan-2019 maxv

Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.196 07-Nov-2018 maxv

Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

/usr/include/dev/nvmm/nvmm.h
/usr/include/dev/nvmm/nvmm_ioctl.h
/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.


# 1.195 04-Nov-2018 maxv

Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.194 23-Sep-2018 maxv

Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.


# 1.193 22-Sep-2018 kre

Avoid use of test -o for when this is used as part of an INSTALL system
and the SMALL test does not support -o


Revision tags: pgoyette-compat-0906
# 1.192 28-Jul-2018 sevan

Create fw(4) & fwmem(4) device nodes by default so fwctl(8) works out of the
box.


Revision tags: pgoyette-compat-0728
# 1.191 21-Jul-2018 maxv

Create /dev/ksyms as "440 $g_kmem". This prevents unprivileged users from
reading the kernel symbols. Discussed in January 2018 on tech-kern@,
reported by maya@, tested by tih@.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.190 20-May-2018 thorpej

branches: 1.190.2;
Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.189 09-Jan-2018 christos

branches: 1.189.2;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.228 07-Dec-2021 brad

A driver and user land utility for the Sparkfun Serial Controlled Motor
Driver module as illustrated here:

https://www.sparkfun.com/products/13911

A SCMD module is a ARM SOC simular to a Arduino in front of a motor
driver chip. The single SCMD module can control two motors and up to
16 additional modules can be chained together using an internal I2C
bus. One can interface with the SCMD using tty uart commands, SPI or
I2C. The driver in this commit adds a kernel driver for the I2C and
SPI interfaces. The command line utility provides a set of
convenience commands that support most of the functions of the SCMD
and is able to use the tty uart mode, SPI user land or the included
kernel driver in a uniform manor.

The use of the SCMD module is mostly for small robots and the like,
but it can control anything that is controllable by voltage.


# 1.227 06-Nov-2021 brad

Driver for the Sensirion SHT30/SHT31/SHT35 temperature and humidity
sensor such as:

https://www.adafruit.com/product/2857

This is a higher priced sensor with a lot of features, including the
ability to do sub-second periodic updates. The driver supports
everything about the sensor except for the alert pin.


# 1.226 12-Oct-2021 christos

PR/56452: RVP: MAKEDEV should also create /dev/dri/renderD* devices


# 1.225 10-Oct-2021 jmcneill

efi: Add /dev/efi character device

Introduce a /dev/efi character device that provides a means for accessing
UEFI RT variable services from userland. Compatible with the FreeBSD ioctl
interface for ease of porting their libefivar and associated tools.

The ioctl interface is defined in sys/efiio.h.

To enable support for this on an arch, the kernel needs `pseudo-device efi`
and the MD EFI implementation needs to register its backend by calling
efi_ops_register(). This commit includes an implementation for Arm.


# 1.224 24-Jul-2021 jmcneill

smbios: Add character device for accessing SMBIOS tables

The /dev/smbios character device gives an aperture into physical memory
that allows read-only access to the SMBIOS header and tables.


# 1.223 29-Jun-2021 nia

Remove uscanner(4) driver

This exists for compatibility with a Linux interface which was apparently
deprecated in Linux 2.6. There are various mailing list threads going
back to 2004 where the usefulness of this driver is discussed, but
the conclusion is that scanner software has all moved to using ugen(4)
instead, and enabling this driver will not help you scan things.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.222 06-Dec-2020 jmcneill

acpi: add character device for accessing ACPI tables

The /dev/acpi character device gives an aperture into physical memory
that allows only read access to known ACPI tables: RSDP, XSDT/RSDT, and
the root tables. Adapt acpidump(8) to use this interface by default,
falling back to the old /dev/mem method if it is not available or if
ACPIDUMP_USE_DEVMEM=1 is set in the environment. The user visible benefit
of this change is that "options INSECURE" is no longer required to
dump ACPI tables.


# 1.221 26-Jul-2020 jdolecek

add support for wwanc(4) device nodes (xmm[0-9])


# 1.220 07-Jun-2020 maxv

Add fault(4).


# 1.219 05-Jun-2020 maxv

Register eight vHCI buses, and use separate KCOV mailboxes for them.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406
# 1.218 04-Apr-2020 jdolecek

remove nsmb(4)


# 1.217 01-Apr-2020 gson

Create the qemufwcfg device as part of "all". Discussed with jmcneill.
Also, include it in the list of special purpose devices.


# 1.216 02-Mar-2020 riastradh

Create /dev/ipmi0 in `MAKEDEV all'.

Works on my machine with sysutils/ipmitool if the latter is built
with CONFIGURE_ARGS+= --enable-intf-open.


Revision tags: is-mlppp-base
# 1.215 27-Feb-2020 riastradh

Create some more cgd device nodes.


# 1.214 29-Jan-2020 maya

remove urio(4), a driver for the Rio500 MP3 player.

At this point it is highly unlikely this 1999 device still has users,
but it still comes up in the context of maxv's USB-fuzzing (and any device
could pretend to be a urio(4)), so it's best to get rid of it.

Renamed all major entries to obsolete, as was done in previous removals.

This still requires an update to sanitizers, but they're located in
"external", perhaps it should be first committed upstream?

Proposed on tech-kern a month ago.


# 1.213 19-Jan-2020 riastradh

Remove filemon(4).

Discussed on tech-kern:
https://mail-index.NetBSD.org/tech-kern/2020/01/13/msg025938.html

This was never (intentionally) enabled by default, and the design has
some shortcomings. You can get mostly the same results with ktrace,
as in usr.bin/make/filemon/filemon_ktrace.c which is now used instead
of filemon for make's meta mode.

If applications require higher performance than ktrace, or nesting
that ktrace doesn't support, we might consider adding something back
into the vfs system calls themselves, without hijacking the syscall
table. (Might want a more reliable output format too, e.g. one that
can handle newlines in file names.)


# 1.212 23-Dec-2019 maxv

Revert the removal of filemon.


# 1.211 18-Dec-2019 maxv

Retire filemon, discussed on tech-kern@.


Revision tags: phil-wifi-20191119
# 1.210 01-Nov-2019 ozaki-r

MAKEDEV: add entry for vio9p(4)


# 1.209 27-Oct-2019 maxv

Add the "nvmm" group, and make nvmm_init() public. Sent to tech-kern@ a few
days ago.


# 1.208 19-Sep-2019 thorpej

Create the character device for spiflash, in addition to the block device.
This is needed for getdiskrawname() to DTRT (for installboot(8)).

XXX pullup-9


# 1.207 15-Sep-2019 ryoon

Replace major number in MAKEDEV for vhci


# 1.206 14-Sep-2019 maxv

Add vHCI, a driver which allows to send and receive USB packets directly
from userland via /dev/vhci. Using this, it becomes possible to test and
fuzz the USB stack and all the USB drivers without having the associated
hardware.

The vHCI device has four ports independently addressable.

For each xfer on each port, we create two packets: a setup packet (which
indicates mostly the type of request) and a data packet (which contains
the raw data). These packets are processed by read and write operations
on /dev/vhci: userland poll-reads it to fetch usb_device_request_t
structures, and dispatches the requests depending on bRequest and
bmRequestType.

A few ioctls are available:

VHCI_IOC_GET_INFO - Get the current status
VHCI_IOC_SET_PORT - Choose a vHCI port
VHCI_IOC_USB_ATTACH - Attach a USB device on the current port
VHCI_IOC_USB_DETACH - Detach the USB device on the current port

vHCI has already allowed me to automatically find several bugs in the USB
stack and its drivers.


Revision tags: netbsd-9-base
# 1.205 29-Jul-2019 gdt

branches: 1.205.2;
MAKEDEV.tmpl: Create nodes for 16 USB hubs

As proposed on current-users, but with better formatting.


Revision tags: phil-wifi-20190609
# 1.204 31-May-2019 nia

Raise the number of uhid nodes from 4 to 16.

My keyboard and mouse use multiple device nodes each. I can't use
any other devices once they're attached. With my keyboard, mouse,
and two game controllers attached, a total of 9 nodes are required.

Particularly, high-end keyboards with N-key rollover support require
more device nodes, since they pretend to be multiple keyboards to work
around limitations in the uhid compat spec.

My original intention was to raise it from 4 to 12, but martin
suggested increasing it to 16.

"somewhat insane, but so is reality" - mlelstv


# 1.203 18-May-2019 mlelstv

Add experimental userland interface to IPMI driver. Currently, transactions
(like sensor readout) are locked, so that a userland program may interfere with
envsys operation.

To use this you need a program like ipmitool built with OpenIPMI support.


# 1.202 01-Apr-2019 martin

Double the number of wedge device nodes


# 1.201 27-Mar-2019 mlelstv

Actually use unit number for iscsi device.


# 1.200 26-Mar-2019 pgoyette

Add srt(4) to /etc/MAKEDEV and corresponding update to MAKEDEV.8 man page.


# 1.199 23-Feb-2019 mlelstv

Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).


# 1.198 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


# 1.197 27-Jan-2019 maxv

Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.196 07-Nov-2018 maxv

Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

/usr/include/dev/nvmm/nvmm.h
/usr/include/dev/nvmm/nvmm_ioctl.h
/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.


# 1.195 04-Nov-2018 maxv

Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.194 23-Sep-2018 maxv

Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.


# 1.193 22-Sep-2018 kre

Avoid use of test -o for when this is used as part of an INSTALL system
and the SMALL test does not support -o


Revision tags: pgoyette-compat-0906
# 1.192 28-Jul-2018 sevan

Create fw(4) & fwmem(4) device nodes by default so fwctl(8) works out of the
box.


Revision tags: pgoyette-compat-0728
# 1.191 21-Jul-2018 maxv

Create /dev/ksyms as "440 $g_kmem". This prevents unprivileged users from
reading the kernel symbols. Discussed in January 2018 on tech-kern@,
reported by maya@, tested by tih@.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.190 20-May-2018 thorpej

branches: 1.190.2;
Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.189 09-Jan-2018 christos

branches: 1.189.2;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.227 06-Nov-2021 brad

Driver for the Sensirion SHT30/SHT31/SHT35 temperature and humidity
sensor such as:

https://www.adafruit.com/product/2857

This is a higher priced sensor with a lot of features, including the
ability to do sub-second periodic updates. The driver supports
everything about the sensor except for the alert pin.


# 1.226 12-Oct-2021 christos

PR/56452: RVP: MAKEDEV should also create /dev/dri/renderD* devices


# 1.225 10-Oct-2021 jmcneill

efi: Add /dev/efi character device

Introduce a /dev/efi character device that provides a means for accessing
UEFI RT variable services from userland. Compatible with the FreeBSD ioctl
interface for ease of porting their libefivar and associated tools.

The ioctl interface is defined in sys/efiio.h.

To enable support for this on an arch, the kernel needs `pseudo-device efi`
and the MD EFI implementation needs to register its backend by calling
efi_ops_register(). This commit includes an implementation for Arm.


# 1.224 24-Jul-2021 jmcneill

smbios: Add character device for accessing SMBIOS tables

The /dev/smbios character device gives an aperture into physical memory
that allows read-only access to the SMBIOS header and tables.


# 1.223 29-Jun-2021 nia

Remove uscanner(4) driver

This exists for compatibility with a Linux interface which was apparently
deprecated in Linux 2.6. There are various mailing list threads going
back to 2004 where the usefulness of this driver is discussed, but
the conclusion is that scanner software has all moved to using ugen(4)
instead, and enabling this driver will not help you scan things.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.222 06-Dec-2020 jmcneill

acpi: add character device for accessing ACPI tables

The /dev/acpi character device gives an aperture into physical memory
that allows only read access to known ACPI tables: RSDP, XSDT/RSDT, and
the root tables. Adapt acpidump(8) to use this interface by default,
falling back to the old /dev/mem method if it is not available or if
ACPIDUMP_USE_DEVMEM=1 is set in the environment. The user visible benefit
of this change is that "options INSECURE" is no longer required to
dump ACPI tables.


# 1.221 26-Jul-2020 jdolecek

add support for wwanc(4) device nodes (xmm[0-9])


# 1.220 07-Jun-2020 maxv

Add fault(4).


# 1.219 05-Jun-2020 maxv

Register eight vHCI buses, and use separate KCOV mailboxes for them.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406
# 1.218 04-Apr-2020 jdolecek

remove nsmb(4)


# 1.217 01-Apr-2020 gson

Create the qemufwcfg device as part of "all". Discussed with jmcneill.
Also, include it in the list of special purpose devices.


# 1.216 02-Mar-2020 riastradh

Create /dev/ipmi0 in `MAKEDEV all'.

Works on my machine with sysutils/ipmitool if the latter is built
with CONFIGURE_ARGS+= --enable-intf-open.


Revision tags: is-mlppp-base
# 1.215 27-Feb-2020 riastradh

Create some more cgd device nodes.


# 1.214 29-Jan-2020 maya

remove urio(4), a driver for the Rio500 MP3 player.

At this point it is highly unlikely this 1999 device still has users,
but it still comes up in the context of maxv's USB-fuzzing (and any device
could pretend to be a urio(4)), so it's best to get rid of it.

Renamed all major entries to obsolete, as was done in previous removals.

This still requires an update to sanitizers, but they're located in
"external", perhaps it should be first committed upstream?

Proposed on tech-kern a month ago.


# 1.213 19-Jan-2020 riastradh

Remove filemon(4).

Discussed on tech-kern:
https://mail-index.NetBSD.org/tech-kern/2020/01/13/msg025938.html

This was never (intentionally) enabled by default, and the design has
some shortcomings. You can get mostly the same results with ktrace,
as in usr.bin/make/filemon/filemon_ktrace.c which is now used instead
of filemon for make's meta mode.

If applications require higher performance than ktrace, or nesting
that ktrace doesn't support, we might consider adding something back
into the vfs system calls themselves, without hijacking the syscall
table. (Might want a more reliable output format too, e.g. one that
can handle newlines in file names.)


# 1.212 23-Dec-2019 maxv

Revert the removal of filemon.


# 1.211 18-Dec-2019 maxv

Retire filemon, discussed on tech-kern@.


Revision tags: phil-wifi-20191119
# 1.210 01-Nov-2019 ozaki-r

MAKEDEV: add entry for vio9p(4)


# 1.209 27-Oct-2019 maxv

Add the "nvmm" group, and make nvmm_init() public. Sent to tech-kern@ a few
days ago.


# 1.208 19-Sep-2019 thorpej

Create the character device for spiflash, in addition to the block device.
This is needed for getdiskrawname() to DTRT (for installboot(8)).

XXX pullup-9


# 1.207 15-Sep-2019 ryoon

Replace major number in MAKEDEV for vhci


# 1.206 14-Sep-2019 maxv

Add vHCI, a driver which allows to send and receive USB packets directly
from userland via /dev/vhci. Using this, it becomes possible to test and
fuzz the USB stack and all the USB drivers without having the associated
hardware.

The vHCI device has four ports independently addressable.

For each xfer on each port, we create two packets: a setup packet (which
indicates mostly the type of request) and a data packet (which contains
the raw data). These packets are processed by read and write operations
on /dev/vhci: userland poll-reads it to fetch usb_device_request_t
structures, and dispatches the requests depending on bRequest and
bmRequestType.

A few ioctls are available:

VHCI_IOC_GET_INFO - Get the current status
VHCI_IOC_SET_PORT - Choose a vHCI port
VHCI_IOC_USB_ATTACH - Attach a USB device on the current port
VHCI_IOC_USB_DETACH - Detach the USB device on the current port

vHCI has already allowed me to automatically find several bugs in the USB
stack and its drivers.


Revision tags: netbsd-9-base
# 1.205 29-Jul-2019 gdt

branches: 1.205.2;
MAKEDEV.tmpl: Create nodes for 16 USB hubs

As proposed on current-users, but with better formatting.


Revision tags: phil-wifi-20190609
# 1.204 31-May-2019 nia

Raise the number of uhid nodes from 4 to 16.

My keyboard and mouse use multiple device nodes each. I can't use
any other devices once they're attached. With my keyboard, mouse,
and two game controllers attached, a total of 9 nodes are required.

Particularly, high-end keyboards with N-key rollover support require
more device nodes, since they pretend to be multiple keyboards to work
around limitations in the uhid compat spec.

My original intention was to raise it from 4 to 12, but martin
suggested increasing it to 16.

"somewhat insane, but so is reality" - mlelstv


# 1.203 18-May-2019 mlelstv

Add experimental userland interface to IPMI driver. Currently, transactions
(like sensor readout) are locked, so that a userland program may interfere with
envsys operation.

To use this you need a program like ipmitool built with OpenIPMI support.


# 1.202 01-Apr-2019 martin

Double the number of wedge device nodes


# 1.201 27-Mar-2019 mlelstv

Actually use unit number for iscsi device.


# 1.200 26-Mar-2019 pgoyette

Add srt(4) to /etc/MAKEDEV and corresponding update to MAKEDEV.8 man page.


# 1.199 23-Feb-2019 mlelstv

Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).


# 1.198 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


# 1.197 27-Jan-2019 maxv

Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.196 07-Nov-2018 maxv

Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

/usr/include/dev/nvmm/nvmm.h
/usr/include/dev/nvmm/nvmm_ioctl.h
/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.


# 1.195 04-Nov-2018 maxv

Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.194 23-Sep-2018 maxv

Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.


# 1.193 22-Sep-2018 kre

Avoid use of test -o for when this is used as part of an INSTALL system
and the SMALL test does not support -o


Revision tags: pgoyette-compat-0906
# 1.192 28-Jul-2018 sevan

Create fw(4) & fwmem(4) device nodes by default so fwctl(8) works out of the
box.


Revision tags: pgoyette-compat-0728
# 1.191 21-Jul-2018 maxv

Create /dev/ksyms as "440 $g_kmem". This prevents unprivileged users from
reading the kernel symbols. Discussed in January 2018 on tech-kern@,
reported by maya@, tested by tih@.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.190 20-May-2018 thorpej

branches: 1.190.2;
Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.189 09-Jan-2018 christos

branches: 1.189.2;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.226 12-Oct-2021 christos

PR/56452: RVP: MAKEDEV should also create /dev/dri/renderD* devices


# 1.225 10-Oct-2021 jmcneill

efi: Add /dev/efi character device

Introduce a /dev/efi character device that provides a means for accessing
UEFI RT variable services from userland. Compatible with the FreeBSD ioctl
interface for ease of porting their libefivar and associated tools.

The ioctl interface is defined in sys/efiio.h.

To enable support for this on an arch, the kernel needs `pseudo-device efi`
and the MD EFI implementation needs to register its backend by calling
efi_ops_register(). This commit includes an implementation for Arm.


# 1.224 24-Jul-2021 jmcneill

smbios: Add character device for accessing SMBIOS tables

The /dev/smbios character device gives an aperture into physical memory
that allows read-only access to the SMBIOS header and tables.


# 1.223 29-Jun-2021 nia

Remove uscanner(4) driver

This exists for compatibility with a Linux interface which was apparently
deprecated in Linux 2.6. There are various mailing list threads going
back to 2004 where the usefulness of this driver is discussed, but
the conclusion is that scanner software has all moved to using ugen(4)
instead, and enabling this driver will not help you scan things.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.222 06-Dec-2020 jmcneill

acpi: add character device for accessing ACPI tables

The /dev/acpi character device gives an aperture into physical memory
that allows only read access to known ACPI tables: RSDP, XSDT/RSDT, and
the root tables. Adapt acpidump(8) to use this interface by default,
falling back to the old /dev/mem method if it is not available or if
ACPIDUMP_USE_DEVMEM=1 is set in the environment. The user visible benefit
of this change is that "options INSECURE" is no longer required to
dump ACPI tables.


# 1.221 26-Jul-2020 jdolecek

add support for wwanc(4) device nodes (xmm[0-9])


# 1.220 07-Jun-2020 maxv

Add fault(4).


# 1.219 05-Jun-2020 maxv

Register eight vHCI buses, and use separate KCOV mailboxes for them.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406
# 1.218 04-Apr-2020 jdolecek

remove nsmb(4)


# 1.217 01-Apr-2020 gson

Create the qemufwcfg device as part of "all". Discussed with jmcneill.
Also, include it in the list of special purpose devices.


# 1.216 02-Mar-2020 riastradh

Create /dev/ipmi0 in `MAKEDEV all'.

Works on my machine with sysutils/ipmitool if the latter is built
with CONFIGURE_ARGS+= --enable-intf-open.


Revision tags: is-mlppp-base
# 1.215 27-Feb-2020 riastradh

Create some more cgd device nodes.


# 1.214 29-Jan-2020 maya

remove urio(4), a driver for the Rio500 MP3 player.

At this point it is highly unlikely this 1999 device still has users,
but it still comes up in the context of maxv's USB-fuzzing (and any device
could pretend to be a urio(4)), so it's best to get rid of it.

Renamed all major entries to obsolete, as was done in previous removals.

This still requires an update to sanitizers, but they're located in
"external", perhaps it should be first committed upstream?

Proposed on tech-kern a month ago.


# 1.213 19-Jan-2020 riastradh

Remove filemon(4).

Discussed on tech-kern:
https://mail-index.NetBSD.org/tech-kern/2020/01/13/msg025938.html

This was never (intentionally) enabled by default, and the design has
some shortcomings. You can get mostly the same results with ktrace,
as in usr.bin/make/filemon/filemon_ktrace.c which is now used instead
of filemon for make's meta mode.

If applications require higher performance than ktrace, or nesting
that ktrace doesn't support, we might consider adding something back
into the vfs system calls themselves, without hijacking the syscall
table. (Might want a more reliable output format too, e.g. one that
can handle newlines in file names.)


# 1.212 23-Dec-2019 maxv

Revert the removal of filemon.


# 1.211 18-Dec-2019 maxv

Retire filemon, discussed on tech-kern@.


Revision tags: phil-wifi-20191119
# 1.210 01-Nov-2019 ozaki-r

MAKEDEV: add entry for vio9p(4)


# 1.209 27-Oct-2019 maxv

Add the "nvmm" group, and make nvmm_init() public. Sent to tech-kern@ a few
days ago.


# 1.208 19-Sep-2019 thorpej

Create the character device for spiflash, in addition to the block device.
This is needed for getdiskrawname() to DTRT (for installboot(8)).

XXX pullup-9


# 1.207 15-Sep-2019 ryoon

Replace major number in MAKEDEV for vhci


# 1.206 14-Sep-2019 maxv

Add vHCI, a driver which allows to send and receive USB packets directly
from userland via /dev/vhci. Using this, it becomes possible to test and
fuzz the USB stack and all the USB drivers without having the associated
hardware.

The vHCI device has four ports independently addressable.

For each xfer on each port, we create two packets: a setup packet (which
indicates mostly the type of request) and a data packet (which contains
the raw data). These packets are processed by read and write operations
on /dev/vhci: userland poll-reads it to fetch usb_device_request_t
structures, and dispatches the requests depending on bRequest and
bmRequestType.

A few ioctls are available:

VHCI_IOC_GET_INFO - Get the current status
VHCI_IOC_SET_PORT - Choose a vHCI port
VHCI_IOC_USB_ATTACH - Attach a USB device on the current port
VHCI_IOC_USB_DETACH - Detach the USB device on the current port

vHCI has already allowed me to automatically find several bugs in the USB
stack and its drivers.


Revision tags: netbsd-9-base
# 1.205 29-Jul-2019 gdt

branches: 1.205.2;
MAKEDEV.tmpl: Create nodes for 16 USB hubs

As proposed on current-users, but with better formatting.


Revision tags: phil-wifi-20190609
# 1.204 31-May-2019 nia

Raise the number of uhid nodes from 4 to 16.

My keyboard and mouse use multiple device nodes each. I can't use
any other devices once they're attached. With my keyboard, mouse,
and two game controllers attached, a total of 9 nodes are required.

Particularly, high-end keyboards with N-key rollover support require
more device nodes, since they pretend to be multiple keyboards to work
around limitations in the uhid compat spec.

My original intention was to raise it from 4 to 12, but martin
suggested increasing it to 16.

"somewhat insane, but so is reality" - mlelstv


# 1.203 18-May-2019 mlelstv

Add experimental userland interface to IPMI driver. Currently, transactions
(like sensor readout) are locked, so that a userland program may interfere with
envsys operation.

To use this you need a program like ipmitool built with OpenIPMI support.


# 1.202 01-Apr-2019 martin

Double the number of wedge device nodes


# 1.201 27-Mar-2019 mlelstv

Actually use unit number for iscsi device.


# 1.200 26-Mar-2019 pgoyette

Add srt(4) to /etc/MAKEDEV and corresponding update to MAKEDEV.8 man page.


# 1.199 23-Feb-2019 mlelstv

Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).


# 1.198 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


# 1.197 27-Jan-2019 maxv

Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.196 07-Nov-2018 maxv

Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

/usr/include/dev/nvmm/nvmm.h
/usr/include/dev/nvmm/nvmm_ioctl.h
/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.


# 1.195 04-Nov-2018 maxv

Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.194 23-Sep-2018 maxv

Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.


# 1.193 22-Sep-2018 kre

Avoid use of test -o for when this is used as part of an INSTALL system
and the SMALL test does not support -o


Revision tags: pgoyette-compat-0906
# 1.192 28-Jul-2018 sevan

Create fw(4) & fwmem(4) device nodes by default so fwctl(8) works out of the
box.


Revision tags: pgoyette-compat-0728
# 1.191 21-Jul-2018 maxv

Create /dev/ksyms as "440 $g_kmem". This prevents unprivileged users from
reading the kernel symbols. Discussed in January 2018 on tech-kern@,
reported by maya@, tested by tih@.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.190 20-May-2018 thorpej

branches: 1.190.2;
Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.189 09-Jan-2018 christos

branches: 1.189.2;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.224 24-Jul-2021 jmcneill

smbios: Add character device for accessing SMBIOS tables

The /dev/smbios character device gives an aperture into physical memory
that allows read-only access to the SMBIOS header and tables.


# 1.223 29-Jun-2021 nia

Remove uscanner(4) driver

This exists for compatibility with a Linux interface which was apparently
deprecated in Linux 2.6. There are various mailing list threads going
back to 2004 where the usefulness of this driver is discussed, but
the conclusion is that scanner software has all moved to using ugen(4)
instead, and enabling this driver will not help you scan things.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.222 06-Dec-2020 jmcneill

acpi: add character device for accessing ACPI tables

The /dev/acpi character device gives an aperture into physical memory
that allows only read access to known ACPI tables: RSDP, XSDT/RSDT, and
the root tables. Adapt acpidump(8) to use this interface by default,
falling back to the old /dev/mem method if it is not available or if
ACPIDUMP_USE_DEVMEM=1 is set in the environment. The user visible benefit
of this change is that "options INSECURE" is no longer required to
dump ACPI tables.


# 1.221 26-Jul-2020 jdolecek

add support for wwanc(4) device nodes (xmm[0-9])


# 1.220 07-Jun-2020 maxv

Add fault(4).


# 1.219 05-Jun-2020 maxv

Register eight vHCI buses, and use separate KCOV mailboxes for them.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406
# 1.218 04-Apr-2020 jdolecek

remove nsmb(4)


# 1.217 01-Apr-2020 gson

Create the qemufwcfg device as part of "all". Discussed with jmcneill.
Also, include it in the list of special purpose devices.


# 1.216 02-Mar-2020 riastradh

Create /dev/ipmi0 in `MAKEDEV all'.

Works on my machine with sysutils/ipmitool if the latter is built
with CONFIGURE_ARGS+= --enable-intf-open.


Revision tags: is-mlppp-base
# 1.215 27-Feb-2020 riastradh

Create some more cgd device nodes.


# 1.214 29-Jan-2020 maya

remove urio(4), a driver for the Rio500 MP3 player.

At this point it is highly unlikely this 1999 device still has users,
but it still comes up in the context of maxv's USB-fuzzing (and any device
could pretend to be a urio(4)), so it's best to get rid of it.

Renamed all major entries to obsolete, as was done in previous removals.

This still requires an update to sanitizers, but they're located in
"external", perhaps it should be first committed upstream?

Proposed on tech-kern a month ago.


# 1.213 19-Jan-2020 riastradh

Remove filemon(4).

Discussed on tech-kern:
https://mail-index.NetBSD.org/tech-kern/2020/01/13/msg025938.html

This was never (intentionally) enabled by default, and the design has
some shortcomings. You can get mostly the same results with ktrace,
as in usr.bin/make/filemon/filemon_ktrace.c which is now used instead
of filemon for make's meta mode.

If applications require higher performance than ktrace, or nesting
that ktrace doesn't support, we might consider adding something back
into the vfs system calls themselves, without hijacking the syscall
table. (Might want a more reliable output format too, e.g. one that
can handle newlines in file names.)


# 1.212 23-Dec-2019 maxv

Revert the removal of filemon.


# 1.211 18-Dec-2019 maxv

Retire filemon, discussed on tech-kern@.


Revision tags: phil-wifi-20191119
# 1.210 01-Nov-2019 ozaki-r

MAKEDEV: add entry for vio9p(4)


# 1.209 27-Oct-2019 maxv

Add the "nvmm" group, and make nvmm_init() public. Sent to tech-kern@ a few
days ago.


# 1.208 19-Sep-2019 thorpej

Create the character device for spiflash, in addition to the block device.
This is needed for getdiskrawname() to DTRT (for installboot(8)).

XXX pullup-9


# 1.207 15-Sep-2019 ryoon

Replace major number in MAKEDEV for vhci


# 1.206 14-Sep-2019 maxv

Add vHCI, a driver which allows to send and receive USB packets directly
from userland via /dev/vhci. Using this, it becomes possible to test and
fuzz the USB stack and all the USB drivers without having the associated
hardware.

The vHCI device has four ports independently addressable.

For each xfer on each port, we create two packets: a setup packet (which
indicates mostly the type of request) and a data packet (which contains
the raw data). These packets are processed by read and write operations
on /dev/vhci: userland poll-reads it to fetch usb_device_request_t
structures, and dispatches the requests depending on bRequest and
bmRequestType.

A few ioctls are available:

VHCI_IOC_GET_INFO - Get the current status
VHCI_IOC_SET_PORT - Choose a vHCI port
VHCI_IOC_USB_ATTACH - Attach a USB device on the current port
VHCI_IOC_USB_DETACH - Detach the USB device on the current port

vHCI has already allowed me to automatically find several bugs in the USB
stack and its drivers.


Revision tags: netbsd-9-base
# 1.205 29-Jul-2019 gdt

branches: 1.205.2;
MAKEDEV.tmpl: Create nodes for 16 USB hubs

As proposed on current-users, but with better formatting.


Revision tags: phil-wifi-20190609
# 1.204 31-May-2019 nia

Raise the number of uhid nodes from 4 to 16.

My keyboard and mouse use multiple device nodes each. I can't use
any other devices once they're attached. With my keyboard, mouse,
and two game controllers attached, a total of 9 nodes are required.

Particularly, high-end keyboards with N-key rollover support require
more device nodes, since they pretend to be multiple keyboards to work
around limitations in the uhid compat spec.

My original intention was to raise it from 4 to 12, but martin
suggested increasing it to 16.

"somewhat insane, but so is reality" - mlelstv


# 1.203 18-May-2019 mlelstv

Add experimental userland interface to IPMI driver. Currently, transactions
(like sensor readout) are locked, so that a userland program may interfere with
envsys operation.

To use this you need a program like ipmitool built with OpenIPMI support.


# 1.202 01-Apr-2019 martin

Double the number of wedge device nodes


# 1.201 27-Mar-2019 mlelstv

Actually use unit number for iscsi device.


# 1.200 26-Mar-2019 pgoyette

Add srt(4) to /etc/MAKEDEV and corresponding update to MAKEDEV.8 man page.


# 1.199 23-Feb-2019 mlelstv

Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).


# 1.198 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


# 1.197 27-Jan-2019 maxv

Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.196 07-Nov-2018 maxv

Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

/usr/include/dev/nvmm/nvmm.h
/usr/include/dev/nvmm/nvmm_ioctl.h
/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.


# 1.195 04-Nov-2018 maxv

Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.194 23-Sep-2018 maxv

Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.


# 1.193 22-Sep-2018 kre

Avoid use of test -o for when this is used as part of an INSTALL system
and the SMALL test does not support -o


Revision tags: pgoyette-compat-0906
# 1.192 28-Jul-2018 sevan

Create fw(4) & fwmem(4) device nodes by default so fwctl(8) works out of the
box.


Revision tags: pgoyette-compat-0728
# 1.191 21-Jul-2018 maxv

Create /dev/ksyms as "440 $g_kmem". This prevents unprivileged users from
reading the kernel symbols. Discussed in January 2018 on tech-kern@,
reported by maya@, tested by tih@.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.190 20-May-2018 thorpej

branches: 1.190.2;
Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.189 09-Jan-2018 christos

branches: 1.189.2;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.223 29-Jun-2021 nia

Remove uscanner(4) driver

This exists for compatibility with a Linux interface which was apparently
deprecated in Linux 2.6. There are various mailing list threads going
back to 2004 where the usefulness of this driver is discussed, but
the conclusion is that scanner software has all moved to using ugen(4)
instead, and enabling this driver will not help you scan things.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.222 06-Dec-2020 jmcneill

acpi: add character device for accessing ACPI tables

The /dev/acpi character device gives an aperture into physical memory
that allows only read access to known ACPI tables: RSDP, XSDT/RSDT, and
the root tables. Adapt acpidump(8) to use this interface by default,
falling back to the old /dev/mem method if it is not available or if
ACPIDUMP_USE_DEVMEM=1 is set in the environment. The user visible benefit
of this change is that "options INSECURE" is no longer required to
dump ACPI tables.


# 1.221 26-Jul-2020 jdolecek

add support for wwanc(4) device nodes (xmm[0-9])


# 1.220 07-Jun-2020 maxv

Add fault(4).


# 1.219 05-Jun-2020 maxv

Register eight vHCI buses, and use separate KCOV mailboxes for them.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406
# 1.218 04-Apr-2020 jdolecek

remove nsmb(4)


# 1.217 01-Apr-2020 gson

Create the qemufwcfg device as part of "all". Discussed with jmcneill.
Also, include it in the list of special purpose devices.


# 1.216 02-Mar-2020 riastradh

Create /dev/ipmi0 in `MAKEDEV all'.

Works on my machine with sysutils/ipmitool if the latter is built
with CONFIGURE_ARGS+= --enable-intf-open.


Revision tags: is-mlppp-base
# 1.215 27-Feb-2020 riastradh

Create some more cgd device nodes.


# 1.214 29-Jan-2020 maya

remove urio(4), a driver for the Rio500 MP3 player.

At this point it is highly unlikely this 1999 device still has users,
but it still comes up in the context of maxv's USB-fuzzing (and any device
could pretend to be a urio(4)), so it's best to get rid of it.

Renamed all major entries to obsolete, as was done in previous removals.

This still requires an update to sanitizers, but they're located in
"external", perhaps it should be first committed upstream?

Proposed on tech-kern a month ago.


# 1.213 19-Jan-2020 riastradh

Remove filemon(4).

Discussed on tech-kern:
https://mail-index.NetBSD.org/tech-kern/2020/01/13/msg025938.html

This was never (intentionally) enabled by default, and the design has
some shortcomings. You can get mostly the same results with ktrace,
as in usr.bin/make/filemon/filemon_ktrace.c which is now used instead
of filemon for make's meta mode.

If applications require higher performance than ktrace, or nesting
that ktrace doesn't support, we might consider adding something back
into the vfs system calls themselves, without hijacking the syscall
table. (Might want a more reliable output format too, e.g. one that
can handle newlines in file names.)


# 1.212 23-Dec-2019 maxv

Revert the removal of filemon.


# 1.211 18-Dec-2019 maxv

Retire filemon, discussed on tech-kern@.


Revision tags: phil-wifi-20191119
# 1.210 01-Nov-2019 ozaki-r

MAKEDEV: add entry for vio9p(4)


# 1.209 27-Oct-2019 maxv

Add the "nvmm" group, and make nvmm_init() public. Sent to tech-kern@ a few
days ago.


# 1.208 19-Sep-2019 thorpej

Create the character device for spiflash, in addition to the block device.
This is needed for getdiskrawname() to DTRT (for installboot(8)).

XXX pullup-9


# 1.207 15-Sep-2019 ryoon

Replace major number in MAKEDEV for vhci


# 1.206 14-Sep-2019 maxv

Add vHCI, a driver which allows to send and receive USB packets directly
from userland via /dev/vhci. Using this, it becomes possible to test and
fuzz the USB stack and all the USB drivers without having the associated
hardware.

The vHCI device has four ports independently addressable.

For each xfer on each port, we create two packets: a setup packet (which
indicates mostly the type of request) and a data packet (which contains
the raw data). These packets are processed by read and write operations
on /dev/vhci: userland poll-reads it to fetch usb_device_request_t
structures, and dispatches the requests depending on bRequest and
bmRequestType.

A few ioctls are available:

VHCI_IOC_GET_INFO - Get the current status
VHCI_IOC_SET_PORT - Choose a vHCI port
VHCI_IOC_USB_ATTACH - Attach a USB device on the current port
VHCI_IOC_USB_DETACH - Detach the USB device on the current port

vHCI has already allowed me to automatically find several bugs in the USB
stack and its drivers.


Revision tags: netbsd-9-base
# 1.205 29-Jul-2019 gdt

branches: 1.205.2;
MAKEDEV.tmpl: Create nodes for 16 USB hubs

As proposed on current-users, but with better formatting.


Revision tags: phil-wifi-20190609
# 1.204 31-May-2019 nia

Raise the number of uhid nodes from 4 to 16.

My keyboard and mouse use multiple device nodes each. I can't use
any other devices once they're attached. With my keyboard, mouse,
and two game controllers attached, a total of 9 nodes are required.

Particularly, high-end keyboards with N-key rollover support require
more device nodes, since they pretend to be multiple keyboards to work
around limitations in the uhid compat spec.

My original intention was to raise it from 4 to 12, but martin
suggested increasing it to 16.

"somewhat insane, but so is reality" - mlelstv


# 1.203 18-May-2019 mlelstv

Add experimental userland interface to IPMI driver. Currently, transactions
(like sensor readout) are locked, so that a userland program may interfere with
envsys operation.

To use this you need a program like ipmitool built with OpenIPMI support.


# 1.202 01-Apr-2019 martin

Double the number of wedge device nodes


# 1.201 27-Mar-2019 mlelstv

Actually use unit number for iscsi device.


# 1.200 26-Mar-2019 pgoyette

Add srt(4) to /etc/MAKEDEV and corresponding update to MAKEDEV.8 man page.


# 1.199 23-Feb-2019 mlelstv

Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).


# 1.198 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


# 1.197 27-Jan-2019 maxv

Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.196 07-Nov-2018 maxv

Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

/usr/include/dev/nvmm/nvmm.h
/usr/include/dev/nvmm/nvmm_ioctl.h
/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.


# 1.195 04-Nov-2018 maxv

Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.194 23-Sep-2018 maxv

Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.


# 1.193 22-Sep-2018 kre

Avoid use of test -o for when this is used as part of an INSTALL system
and the SMALL test does not support -o


Revision tags: pgoyette-compat-0906
# 1.192 28-Jul-2018 sevan

Create fw(4) & fwmem(4) device nodes by default so fwctl(8) works out of the
box.


Revision tags: pgoyette-compat-0728
# 1.191 21-Jul-2018 maxv

Create /dev/ksyms as "440 $g_kmem". This prevents unprivileged users from
reading the kernel symbols. Discussed in January 2018 on tech-kern@,
reported by maya@, tested by tih@.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.190 20-May-2018 thorpej

branches: 1.190.2;
Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.189 09-Jan-2018 christos

branches: 1.189.2;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.222 06-Dec-2020 jmcneill

acpi: add character device for accessing ACPI tables

The /dev/acpi character device gives an aperture into physical memory
that allows only read access to known ACPI tables: RSDP, XSDT/RSDT, and
the root tables. Adapt acpidump(8) to use this interface by default,
falling back to the old /dev/mem method if it is not available or if
ACPIDUMP_USE_DEVMEM=1 is set in the environment. The user visible benefit
of this change is that "options INSECURE" is no longer required to
dump ACPI tables.


# 1.221 26-Jul-2020 jdolecek

add support for wwanc(4) device nodes (xmm[0-9])


# 1.220 07-Jun-2020 maxv

Add fault(4).


# 1.219 05-Jun-2020 maxv

Register eight vHCI buses, and use separate KCOV mailboxes for them.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406
# 1.218 04-Apr-2020 jdolecek

remove nsmb(4)


# 1.217 01-Apr-2020 gson

Create the qemufwcfg device as part of "all". Discussed with jmcneill.
Also, include it in the list of special purpose devices.


# 1.216 02-Mar-2020 riastradh

Create /dev/ipmi0 in `MAKEDEV all'.

Works on my machine with sysutils/ipmitool if the latter is built
with CONFIGURE_ARGS+= --enable-intf-open.


Revision tags: is-mlppp-base
# 1.215 27-Feb-2020 riastradh

Create some more cgd device nodes.


# 1.214 29-Jan-2020 maya

remove urio(4), a driver for the Rio500 MP3 player.

At this point it is highly unlikely this 1999 device still has users,
but it still comes up in the context of maxv's USB-fuzzing (and any device
could pretend to be a urio(4)), so it's best to get rid of it.

Renamed all major entries to obsolete, as was done in previous removals.

This still requires an update to sanitizers, but they're located in
"external", perhaps it should be first committed upstream?

Proposed on tech-kern a month ago.


# 1.213 19-Jan-2020 riastradh

Remove filemon(4).

Discussed on tech-kern:
https://mail-index.NetBSD.org/tech-kern/2020/01/13/msg025938.html

This was never (intentionally) enabled by default, and the design has
some shortcomings. You can get mostly the same results with ktrace,
as in usr.bin/make/filemon/filemon_ktrace.c which is now used instead
of filemon for make's meta mode.

If applications require higher performance than ktrace, or nesting
that ktrace doesn't support, we might consider adding something back
into the vfs system calls themselves, without hijacking the syscall
table. (Might want a more reliable output format too, e.g. one that
can handle newlines in file names.)


# 1.212 23-Dec-2019 maxv

Revert the removal of filemon.


# 1.211 18-Dec-2019 maxv

Retire filemon, discussed on tech-kern@.


Revision tags: phil-wifi-20191119
# 1.210 01-Nov-2019 ozaki-r

MAKEDEV: add entry for vio9p(4)


# 1.209 27-Oct-2019 maxv

Add the "nvmm" group, and make nvmm_init() public. Sent to tech-kern@ a few
days ago.


# 1.208 19-Sep-2019 thorpej

Create the character device for spiflash, in addition to the block device.
This is needed for getdiskrawname() to DTRT (for installboot(8)).

XXX pullup-9


# 1.207 15-Sep-2019 ryoon

Replace major number in MAKEDEV for vhci


# 1.206 14-Sep-2019 maxv

Add vHCI, a driver which allows to send and receive USB packets directly
from userland via /dev/vhci. Using this, it becomes possible to test and
fuzz the USB stack and all the USB drivers without having the associated
hardware.

The vHCI device has four ports independently addressable.

For each xfer on each port, we create two packets: a setup packet (which
indicates mostly the type of request) and a data packet (which contains
the raw data). These packets are processed by read and write operations
on /dev/vhci: userland poll-reads it to fetch usb_device_request_t
structures, and dispatches the requests depending on bRequest and
bmRequestType.

A few ioctls are available:

VHCI_IOC_GET_INFO - Get the current status
VHCI_IOC_SET_PORT - Choose a vHCI port
VHCI_IOC_USB_ATTACH - Attach a USB device on the current port
VHCI_IOC_USB_DETACH - Detach the USB device on the current port

vHCI has already allowed me to automatically find several bugs in the USB
stack and its drivers.


Revision tags: netbsd-9-base
# 1.205 29-Jul-2019 gdt

branches: 1.205.2;
MAKEDEV.tmpl: Create nodes for 16 USB hubs

As proposed on current-users, but with better formatting.


Revision tags: phil-wifi-20190609
# 1.204 31-May-2019 nia

Raise the number of uhid nodes from 4 to 16.

My keyboard and mouse use multiple device nodes each. I can't use
any other devices once they're attached. With my keyboard, mouse,
and two game controllers attached, a total of 9 nodes are required.

Particularly, high-end keyboards with N-key rollover support require
more device nodes, since they pretend to be multiple keyboards to work
around limitations in the uhid compat spec.

My original intention was to raise it from 4 to 12, but martin
suggested increasing it to 16.

"somewhat insane, but so is reality" - mlelstv


# 1.203 18-May-2019 mlelstv

Add experimental userland interface to IPMI driver. Currently, transactions
(like sensor readout) are locked, so that a userland program may interfere with
envsys operation.

To use this you need a program like ipmitool built with OpenIPMI support.


# 1.202 01-Apr-2019 martin

Double the number of wedge device nodes


# 1.201 27-Mar-2019 mlelstv

Actually use unit number for iscsi device.


# 1.200 26-Mar-2019 pgoyette

Add srt(4) to /etc/MAKEDEV and corresponding update to MAKEDEV.8 man page.


# 1.199 23-Feb-2019 mlelstv

Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).


# 1.198 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


# 1.197 27-Jan-2019 maxv

Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.196 07-Nov-2018 maxv

Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

/usr/include/dev/nvmm/nvmm.h
/usr/include/dev/nvmm/nvmm_ioctl.h
/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.


# 1.195 04-Nov-2018 maxv

Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.194 23-Sep-2018 maxv

Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.


# 1.193 22-Sep-2018 kre

Avoid use of test -o for when this is used as part of an INSTALL system
and the SMALL test does not support -o


Revision tags: pgoyette-compat-0906
# 1.192 28-Jul-2018 sevan

Create fw(4) & fwmem(4) device nodes by default so fwctl(8) works out of the
box.


Revision tags: pgoyette-compat-0728
# 1.191 21-Jul-2018 maxv

Create /dev/ksyms as "440 $g_kmem". This prevents unprivileged users from
reading the kernel symbols. Discussed in January 2018 on tech-kern@,
reported by maya@, tested by tih@.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.190 20-May-2018 thorpej

branches: 1.190.2;
Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.189 09-Jan-2018 christos

branches: 1.189.2;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.221 26-Jul-2020 jdolecek

add support for wwanc(4) device nodes (xmm[0-9])


# 1.220 07-Jun-2020 maxv

Add fault(4).


# 1.219 05-Jun-2020 maxv

Register eight vHCI buses, and use separate KCOV mailboxes for them.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406
# 1.218 04-Apr-2020 jdolecek

remove nsmb(4)


# 1.217 01-Apr-2020 gson

Create the qemufwcfg device as part of "all". Discussed with jmcneill.
Also, include it in the list of special purpose devices.


# 1.216 02-Mar-2020 riastradh

Create /dev/ipmi0 in `MAKEDEV all'.

Works on my machine with sysutils/ipmitool if the latter is built
with CONFIGURE_ARGS+= --enable-intf-open.


Revision tags: is-mlppp-base
# 1.215 27-Feb-2020 riastradh

Create some more cgd device nodes.


# 1.214 29-Jan-2020 maya

remove urio(4), a driver for the Rio500 MP3 player.

At this point it is highly unlikely this 1999 device still has users,
but it still comes up in the context of maxv's USB-fuzzing (and any device
could pretend to be a urio(4)), so it's best to get rid of it.

Renamed all major entries to obsolete, as was done in previous removals.

This still requires an update to sanitizers, but they're located in
"external", perhaps it should be first committed upstream?

Proposed on tech-kern a month ago.


# 1.213 19-Jan-2020 riastradh

Remove filemon(4).

Discussed on tech-kern:
https://mail-index.NetBSD.org/tech-kern/2020/01/13/msg025938.html

This was never (intentionally) enabled by default, and the design has
some shortcomings. You can get mostly the same results with ktrace,
as in usr.bin/make/filemon/filemon_ktrace.c which is now used instead
of filemon for make's meta mode.

If applications require higher performance than ktrace, or nesting
that ktrace doesn't support, we might consider adding something back
into the vfs system calls themselves, without hijacking the syscall
table. (Might want a more reliable output format too, e.g. one that
can handle newlines in file names.)


# 1.212 23-Dec-2019 maxv

Revert the removal of filemon.


# 1.211 18-Dec-2019 maxv

Retire filemon, discussed on tech-kern@.


Revision tags: phil-wifi-20191119
# 1.210 01-Nov-2019 ozaki-r

MAKEDEV: add entry for vio9p(4)


# 1.209 27-Oct-2019 maxv

Add the "nvmm" group, and make nvmm_init() public. Sent to tech-kern@ a few
days ago.


# 1.208 19-Sep-2019 thorpej

Create the character device for spiflash, in addition to the block device.
This is needed for getdiskrawname() to DTRT (for installboot(8)).

XXX pullup-9


# 1.207 15-Sep-2019 ryoon

Replace major number in MAKEDEV for vhci


# 1.206 14-Sep-2019 maxv

Add vHCI, a driver which allows to send and receive USB packets directly
from userland via /dev/vhci. Using this, it becomes possible to test and
fuzz the USB stack and all the USB drivers without having the associated
hardware.

The vHCI device has four ports independently addressable.

For each xfer on each port, we create two packets: a setup packet (which
indicates mostly the type of request) and a data packet (which contains
the raw data). These packets are processed by read and write operations
on /dev/vhci: userland poll-reads it to fetch usb_device_request_t
structures, and dispatches the requests depending on bRequest and
bmRequestType.

A few ioctls are available:

VHCI_IOC_GET_INFO - Get the current status
VHCI_IOC_SET_PORT - Choose a vHCI port
VHCI_IOC_USB_ATTACH - Attach a USB device on the current port
VHCI_IOC_USB_DETACH - Detach the USB device on the current port

vHCI has already allowed me to automatically find several bugs in the USB
stack and its drivers.


Revision tags: netbsd-9-base
# 1.205 29-Jul-2019 gdt

branches: 1.205.2;
MAKEDEV.tmpl: Create nodes for 16 USB hubs

As proposed on current-users, but with better formatting.


Revision tags: phil-wifi-20190609
# 1.204 31-May-2019 nia

Raise the number of uhid nodes from 4 to 16.

My keyboard and mouse use multiple device nodes each. I can't use
any other devices once they're attached. With my keyboard, mouse,
and two game controllers attached, a total of 9 nodes are required.

Particularly, high-end keyboards with N-key rollover support require
more device nodes, since they pretend to be multiple keyboards to work
around limitations in the uhid compat spec.

My original intention was to raise it from 4 to 12, but martin
suggested increasing it to 16.

"somewhat insane, but so is reality" - mlelstv


# 1.203 18-May-2019 mlelstv

Add experimental userland interface to IPMI driver. Currently, transactions
(like sensor readout) are locked, so that a userland program may interfere with
envsys operation.

To use this you need a program like ipmitool built with OpenIPMI support.


# 1.202 01-Apr-2019 martin

Double the number of wedge device nodes


# 1.201 27-Mar-2019 mlelstv

Actually use unit number for iscsi device.


# 1.200 26-Mar-2019 pgoyette

Add srt(4) to /etc/MAKEDEV and corresponding update to MAKEDEV.8 man page.


# 1.199 23-Feb-2019 mlelstv

Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).


# 1.198 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


# 1.197 27-Jan-2019 maxv

Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.196 07-Nov-2018 maxv

Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

/usr/include/dev/nvmm/nvmm.h
/usr/include/dev/nvmm/nvmm_ioctl.h
/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.


# 1.195 04-Nov-2018 maxv

Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.194 23-Sep-2018 maxv

Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.


# 1.193 22-Sep-2018 kre

Avoid use of test -o for when this is used as part of an INSTALL system
and the SMALL test does not support -o


Revision tags: pgoyette-compat-0906
# 1.192 28-Jul-2018 sevan

Create fw(4) & fwmem(4) device nodes by default so fwctl(8) works out of the
box.


Revision tags: pgoyette-compat-0728
# 1.191 21-Jul-2018 maxv

Create /dev/ksyms as "440 $g_kmem". This prevents unprivileged users from
reading the kernel symbols. Discussed in January 2018 on tech-kern@,
reported by maya@, tested by tih@.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.190 20-May-2018 thorpej

branches: 1.190.2;
Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.189 09-Jan-2018 christos

branches: 1.189.2;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.220 07-Jun-2020 maxv

Add fault(4).


# 1.219 05-Jun-2020 maxv

Register eight vHCI buses, and use separate KCOV mailboxes for them.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406
# 1.218 04-Apr-2020 jdolecek

remove nsmb(4)


# 1.217 01-Apr-2020 gson

Create the qemufwcfg device as part of "all". Discussed with jmcneill.
Also, include it in the list of special purpose devices.


# 1.216 02-Mar-2020 riastradh

Create /dev/ipmi0 in `MAKEDEV all'.

Works on my machine with sysutils/ipmitool if the latter is built
with CONFIGURE_ARGS+= --enable-intf-open.


Revision tags: is-mlppp-base
# 1.215 27-Feb-2020 riastradh

Create some more cgd device nodes.


# 1.214 29-Jan-2020 maya

remove urio(4), a driver for the Rio500 MP3 player.

At this point it is highly unlikely this 1999 device still has users,
but it still comes up in the context of maxv's USB-fuzzing (and any device
could pretend to be a urio(4)), so it's best to get rid of it.

Renamed all major entries to obsolete, as was done in previous removals.

This still requires an update to sanitizers, but they're located in
"external", perhaps it should be first committed upstream?

Proposed on tech-kern a month ago.


# 1.213 19-Jan-2020 riastradh

Remove filemon(4).

Discussed on tech-kern:
https://mail-index.NetBSD.org/tech-kern/2020/01/13/msg025938.html

This was never (intentionally) enabled by default, and the design has
some shortcomings. You can get mostly the same results with ktrace,
as in usr.bin/make/filemon/filemon_ktrace.c which is now used instead
of filemon for make's meta mode.

If applications require higher performance than ktrace, or nesting
that ktrace doesn't support, we might consider adding something back
into the vfs system calls themselves, without hijacking the syscall
table. (Might want a more reliable output format too, e.g. one that
can handle newlines in file names.)


# 1.212 23-Dec-2019 maxv

Revert the removal of filemon.


# 1.211 18-Dec-2019 maxv

Retire filemon, discussed on tech-kern@.


Revision tags: phil-wifi-20191119
# 1.210 01-Nov-2019 ozaki-r

MAKEDEV: add entry for vio9p(4)


# 1.209 27-Oct-2019 maxv

Add the "nvmm" group, and make nvmm_init() public. Sent to tech-kern@ a few
days ago.


# 1.208 19-Sep-2019 thorpej

Create the character device for spiflash, in addition to the block device.
This is needed for getdiskrawname() to DTRT (for installboot(8)).

XXX pullup-9


# 1.207 15-Sep-2019 ryoon

Replace major number in MAKEDEV for vhci


# 1.206 14-Sep-2019 maxv

Add vHCI, a driver which allows to send and receive USB packets directly
from userland via /dev/vhci. Using this, it becomes possible to test and
fuzz the USB stack and all the USB drivers without having the associated
hardware.

The vHCI device has four ports independently addressable.

For each xfer on each port, we create two packets: a setup packet (which
indicates mostly the type of request) and a data packet (which contains
the raw data). These packets are processed by read and write operations
on /dev/vhci: userland poll-reads it to fetch usb_device_request_t
structures, and dispatches the requests depending on bRequest and
bmRequestType.

A few ioctls are available:

VHCI_IOC_GET_INFO - Get the current status
VHCI_IOC_SET_PORT - Choose a vHCI port
VHCI_IOC_USB_ATTACH - Attach a USB device on the current port
VHCI_IOC_USB_DETACH - Detach the USB device on the current port

vHCI has already allowed me to automatically find several bugs in the USB
stack and its drivers.


Revision tags: netbsd-9-base
# 1.205 29-Jul-2019 gdt

branches: 1.205.2;
MAKEDEV.tmpl: Create nodes for 16 USB hubs

As proposed on current-users, but with better formatting.


Revision tags: phil-wifi-20190609
# 1.204 31-May-2019 nia

Raise the number of uhid nodes from 4 to 16.

My keyboard and mouse use multiple device nodes each. I can't use
any other devices once they're attached. With my keyboard, mouse,
and two game controllers attached, a total of 9 nodes are required.

Particularly, high-end keyboards with N-key rollover support require
more device nodes, since they pretend to be multiple keyboards to work
around limitations in the uhid compat spec.

My original intention was to raise it from 4 to 12, but martin
suggested increasing it to 16.

"somewhat insane, but so is reality" - mlelstv


# 1.203 18-May-2019 mlelstv

Add experimental userland interface to IPMI driver. Currently, transactions
(like sensor readout) are locked, so that a userland program may interfere with
envsys operation.

To use this you need a program like ipmitool built with OpenIPMI support.


# 1.202 01-Apr-2019 martin

Double the number of wedge device nodes


# 1.201 27-Mar-2019 mlelstv

Actually use unit number for iscsi device.


# 1.200 26-Mar-2019 pgoyette

Add srt(4) to /etc/MAKEDEV and corresponding update to MAKEDEV.8 man page.


# 1.199 23-Feb-2019 mlelstv

Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).


# 1.198 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


# 1.197 27-Jan-2019 maxv

Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.196 07-Nov-2018 maxv

Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

/usr/include/dev/nvmm/nvmm.h
/usr/include/dev/nvmm/nvmm_ioctl.h
/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.


# 1.195 04-Nov-2018 maxv

Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.194 23-Sep-2018 maxv

Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.


# 1.193 22-Sep-2018 kre

Avoid use of test -o for when this is used as part of an INSTALL system
and the SMALL test does not support -o


Revision tags: pgoyette-compat-0906
# 1.192 28-Jul-2018 sevan

Create fw(4) & fwmem(4) device nodes by default so fwctl(8) works out of the
box.


Revision tags: pgoyette-compat-0728
# 1.191 21-Jul-2018 maxv

Create /dev/ksyms as "440 $g_kmem". This prevents unprivileged users from
reading the kernel symbols. Discussed in January 2018 on tech-kern@,
reported by maya@, tested by tih@.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.190 20-May-2018 thorpej

branches: 1.190.2;
Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.189 09-Jan-2018 christos

branches: 1.189.2;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.219 05-Jun-2020 maxv

Register eight vHCI buses, and use separate KCOV mailboxes for them.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406
# 1.218 04-Apr-2020 jdolecek

remove nsmb(4)


# 1.217 01-Apr-2020 gson

Create the qemufwcfg device as part of "all". Discussed with jmcneill.
Also, include it in the list of special purpose devices.


# 1.216 02-Mar-2020 riastradh

Create /dev/ipmi0 in `MAKEDEV all'.

Works on my machine with sysutils/ipmitool if the latter is built
with CONFIGURE_ARGS+= --enable-intf-open.


Revision tags: is-mlppp-base
# 1.215 27-Feb-2020 riastradh

Create some more cgd device nodes.


# 1.214 29-Jan-2020 maya

remove urio(4), a driver for the Rio500 MP3 player.

At this point it is highly unlikely this 1999 device still has users,
but it still comes up in the context of maxv's USB-fuzzing (and any device
could pretend to be a urio(4)), so it's best to get rid of it.

Renamed all major entries to obsolete, as was done in previous removals.

This still requires an update to sanitizers, but they're located in
"external", perhaps it should be first committed upstream?

Proposed on tech-kern a month ago.


# 1.213 19-Jan-2020 riastradh

Remove filemon(4).

Discussed on tech-kern:
https://mail-index.NetBSD.org/tech-kern/2020/01/13/msg025938.html

This was never (intentionally) enabled by default, and the design has
some shortcomings. You can get mostly the same results with ktrace,
as in usr.bin/make/filemon/filemon_ktrace.c which is now used instead
of filemon for make's meta mode.

If applications require higher performance than ktrace, or nesting
that ktrace doesn't support, we might consider adding something back
into the vfs system calls themselves, without hijacking the syscall
table. (Might want a more reliable output format too, e.g. one that
can handle newlines in file names.)


# 1.212 23-Dec-2019 maxv

Revert the removal of filemon.


# 1.211 18-Dec-2019 maxv

Retire filemon, discussed on tech-kern@.


Revision tags: phil-wifi-20191119
# 1.210 01-Nov-2019 ozaki-r

MAKEDEV: add entry for vio9p(4)


# 1.209 27-Oct-2019 maxv

Add the "nvmm" group, and make nvmm_init() public. Sent to tech-kern@ a few
days ago.


# 1.208 19-Sep-2019 thorpej

Create the character device for spiflash, in addition to the block device.
This is needed for getdiskrawname() to DTRT (for installboot(8)).

XXX pullup-9


# 1.207 15-Sep-2019 ryoon

Replace major number in MAKEDEV for vhci


# 1.206 14-Sep-2019 maxv

Add vHCI, a driver which allows to send and receive USB packets directly
from userland via /dev/vhci. Using this, it becomes possible to test and
fuzz the USB stack and all the USB drivers without having the associated
hardware.

The vHCI device has four ports independently addressable.

For each xfer on each port, we create two packets: a setup packet (which
indicates mostly the type of request) and a data packet (which contains
the raw data). These packets are processed by read and write operations
on /dev/vhci: userland poll-reads it to fetch usb_device_request_t
structures, and dispatches the requests depending on bRequest and
bmRequestType.

A few ioctls are available:

VHCI_IOC_GET_INFO - Get the current status
VHCI_IOC_SET_PORT - Choose a vHCI port
VHCI_IOC_USB_ATTACH - Attach a USB device on the current port
VHCI_IOC_USB_DETACH - Detach the USB device on the current port

vHCI has already allowed me to automatically find several bugs in the USB
stack and its drivers.


Revision tags: netbsd-9-base
# 1.205 29-Jul-2019 gdt

branches: 1.205.2;
MAKEDEV.tmpl: Create nodes for 16 USB hubs

As proposed on current-users, but with better formatting.


Revision tags: phil-wifi-20190609
# 1.204 31-May-2019 nia

Raise the number of uhid nodes from 4 to 16.

My keyboard and mouse use multiple device nodes each. I can't use
any other devices once they're attached. With my keyboard, mouse,
and two game controllers attached, a total of 9 nodes are required.

Particularly, high-end keyboards with N-key rollover support require
more device nodes, since they pretend to be multiple keyboards to work
around limitations in the uhid compat spec.

My original intention was to raise it from 4 to 12, but martin
suggested increasing it to 16.

"somewhat insane, but so is reality" - mlelstv


# 1.203 18-May-2019 mlelstv

Add experimental userland interface to IPMI driver. Currently, transactions
(like sensor readout) are locked, so that a userland program may interfere with
envsys operation.

To use this you need a program like ipmitool built with OpenIPMI support.


# 1.202 01-Apr-2019 martin

Double the number of wedge device nodes


# 1.201 27-Mar-2019 mlelstv

Actually use unit number for iscsi device.


# 1.200 26-Mar-2019 pgoyette

Add srt(4) to /etc/MAKEDEV and corresponding update to MAKEDEV.8 man page.


# 1.199 23-Feb-2019 mlelstv

Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).


# 1.198 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


# 1.197 27-Jan-2019 maxv

Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.196 07-Nov-2018 maxv

Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

/usr/include/dev/nvmm/nvmm.h
/usr/include/dev/nvmm/nvmm_ioctl.h
/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.


# 1.195 04-Nov-2018 maxv

Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.194 23-Sep-2018 maxv

Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.


# 1.193 22-Sep-2018 kre

Avoid use of test -o for when this is used as part of an INSTALL system
and the SMALL test does not support -o


Revision tags: pgoyette-compat-0906
# 1.192 28-Jul-2018 sevan

Create fw(4) & fwmem(4) device nodes by default so fwctl(8) works out of the
box.


Revision tags: pgoyette-compat-0728
# 1.191 21-Jul-2018 maxv

Create /dev/ksyms as "440 $g_kmem". This prevents unprivileged users from
reading the kernel symbols. Discussed in January 2018 on tech-kern@,
reported by maya@, tested by tih@.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.190 20-May-2018 thorpej

branches: 1.190.2;
Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.189 09-Jan-2018 christos

branches: 1.189.2;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.218 04-Apr-2020 jdolecek

remove nsmb(4)


# 1.217 01-Apr-2020 gson

Create the qemufwcfg device as part of "all". Discussed with jmcneill.
Also, include it in the list of special purpose devices.


# 1.216 02-Mar-2020 riastradh

Create /dev/ipmi0 in `MAKEDEV all'.

Works on my machine with sysutils/ipmitool if the latter is built
with CONFIGURE_ARGS+= --enable-intf-open.


# 1.215 27-Feb-2020 riastradh

Create some more cgd device nodes.


# 1.214 29-Jan-2020 maya

remove urio(4), a driver for the Rio500 MP3 player.

At this point it is highly unlikely this 1999 device still has users,
but it still comes up in the context of maxv's USB-fuzzing (and any device
could pretend to be a urio(4)), so it's best to get rid of it.

Renamed all major entries to obsolete, as was done in previous removals.

This still requires an update to sanitizers, but they're located in
"external", perhaps it should be first committed upstream?

Proposed on tech-kern a month ago.


# 1.213 19-Jan-2020 riastradh

Remove filemon(4).

Discussed on tech-kern:
https://mail-index.NetBSD.org/tech-kern/2020/01/13/msg025938.html

This was never (intentionally) enabled by default, and the design has
some shortcomings. You can get mostly the same results with ktrace,
as in usr.bin/make/filemon/filemon_ktrace.c which is now used instead
of filemon for make's meta mode.

If applications require higher performance than ktrace, or nesting
that ktrace doesn't support, we might consider adding something back
into the vfs system calls themselves, without hijacking the syscall
table. (Might want a more reliable output format too, e.g. one that
can handle newlines in file names.)


# 1.212 23-Dec-2019 maxv

Revert the removal of filemon.


# 1.211 18-Dec-2019 maxv

Retire filemon, discussed on tech-kern@.


Revision tags: phil-wifi-20191119
# 1.210 01-Nov-2019 ozaki-r

MAKEDEV: add entry for vio9p(4)


# 1.209 27-Oct-2019 maxv

Add the "nvmm" group, and make nvmm_init() public. Sent to tech-kern@ a few
days ago.


# 1.208 19-Sep-2019 thorpej

Create the character device for spiflash, in addition to the block device.
This is needed for getdiskrawname() to DTRT (for installboot(8)).

XXX pullup-9


# 1.207 15-Sep-2019 ryoon

Replace major number in MAKEDEV for vhci


# 1.206 14-Sep-2019 maxv

Add vHCI, a driver which allows to send and receive USB packets directly
from userland via /dev/vhci. Using this, it becomes possible to test and
fuzz the USB stack and all the USB drivers without having the associated
hardware.

The vHCI device has four ports independently addressable.

For each xfer on each port, we create two packets: a setup packet (which
indicates mostly the type of request) and a data packet (which contains
the raw data). These packets are processed by read and write operations
on /dev/vhci: userland poll-reads it to fetch usb_device_request_t
structures, and dispatches the requests depending on bRequest and
bmRequestType.

A few ioctls are available:

VHCI_IOC_GET_INFO - Get the current status
VHCI_IOC_SET_PORT - Choose a vHCI port
VHCI_IOC_USB_ATTACH - Attach a USB device on the current port
VHCI_IOC_USB_DETACH - Detach the USB device on the current port

vHCI has already allowed me to automatically find several bugs in the USB
stack and its drivers.


Revision tags: netbsd-9-base
# 1.205 29-Jul-2019 gdt

branches: 1.205.2;
MAKEDEV.tmpl: Create nodes for 16 USB hubs

As proposed on current-users, but with better formatting.


Revision tags: phil-wifi-20190609
# 1.204 31-May-2019 nia

Raise the number of uhid nodes from 4 to 16.

My keyboard and mouse use multiple device nodes each. I can't use
any other devices once they're attached. With my keyboard, mouse,
and two game controllers attached, a total of 9 nodes are required.

Particularly, high-end keyboards with N-key rollover support require
more device nodes, since they pretend to be multiple keyboards to work
around limitations in the uhid compat spec.

My original intention was to raise it from 4 to 12, but martin
suggested increasing it to 16.

"somewhat insane, but so is reality" - mlelstv


# 1.203 18-May-2019 mlelstv

Add experimental userland interface to IPMI driver. Currently, transactions
(like sensor readout) are locked, so that a userland program may interfere with
envsys operation.

To use this you need a program like ipmitool built with OpenIPMI support.


# 1.202 01-Apr-2019 martin

Double the number of wedge device nodes


# 1.201 27-Mar-2019 mlelstv

Actually use unit number for iscsi device.


# 1.200 26-Mar-2019 pgoyette

Add srt(4) to /etc/MAKEDEV and corresponding update to MAKEDEV.8 man page.


# 1.199 23-Feb-2019 mlelstv

Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).


# 1.198 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


# 1.197 27-Jan-2019 maxv

Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.196 07-Nov-2018 maxv

Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

/usr/include/dev/nvmm/nvmm.h
/usr/include/dev/nvmm/nvmm_ioctl.h
/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.


# 1.195 04-Nov-2018 maxv

Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.194 23-Sep-2018 maxv

Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.


# 1.193 22-Sep-2018 kre

Avoid use of test -o for when this is used as part of an INSTALL system
and the SMALL test does not support -o


Revision tags: pgoyette-compat-0906
# 1.192 28-Jul-2018 sevan

Create fw(4) & fwmem(4) device nodes by default so fwctl(8) works out of the
box.


Revision tags: pgoyette-compat-0728
# 1.191 21-Jul-2018 maxv

Create /dev/ksyms as "440 $g_kmem". This prevents unprivileged users from
reading the kernel symbols. Discussed in January 2018 on tech-kern@,
reported by maya@, tested by tih@.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.190 20-May-2018 thorpej

branches: 1.190.2;
Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.189 09-Jan-2018 christos

branches: 1.189.2;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.217 01-Apr-2020 gson

Create the qemufwcfg device as part of "all". Discussed with jmcneill.
Also, include it in the list of special purpose devices.


# 1.216 02-Mar-2020 riastradh

Create /dev/ipmi0 in `MAKEDEV all'.

Works on my machine with sysutils/ipmitool if the latter is built
with CONFIGURE_ARGS+= --enable-intf-open.


# 1.215 27-Feb-2020 riastradh

Create some more cgd device nodes.


# 1.214 29-Jan-2020 maya

remove urio(4), a driver for the Rio500 MP3 player.

At this point it is highly unlikely this 1999 device still has users,
but it still comes up in the context of maxv's USB-fuzzing (and any device
could pretend to be a urio(4)), so it's best to get rid of it.

Renamed all major entries to obsolete, as was done in previous removals.

This still requires an update to sanitizers, but they're located in
"external", perhaps it should be first committed upstream?

Proposed on tech-kern a month ago.


# 1.213 19-Jan-2020 riastradh

Remove filemon(4).

Discussed on tech-kern:
https://mail-index.NetBSD.org/tech-kern/2020/01/13/msg025938.html

This was never (intentionally) enabled by default, and the design has
some shortcomings. You can get mostly the same results with ktrace,
as in usr.bin/make/filemon/filemon_ktrace.c which is now used instead
of filemon for make's meta mode.

If applications require higher performance than ktrace, or nesting
that ktrace doesn't support, we might consider adding something back
into the vfs system calls themselves, without hijacking the syscall
table. (Might want a more reliable output format too, e.g. one that
can handle newlines in file names.)


# 1.212 23-Dec-2019 maxv

Revert the removal of filemon.


# 1.211 18-Dec-2019 maxv

Retire filemon, discussed on tech-kern@.


Revision tags: phil-wifi-20191119
# 1.210 01-Nov-2019 ozaki-r

MAKEDEV: add entry for vio9p(4)


# 1.209 27-Oct-2019 maxv

Add the "nvmm" group, and make nvmm_init() public. Sent to tech-kern@ a few
days ago.


# 1.208 19-Sep-2019 thorpej

Create the character device for spiflash, in addition to the block device.
This is needed for getdiskrawname() to DTRT (for installboot(8)).

XXX pullup-9


# 1.207 15-Sep-2019 ryoon

Replace major number in MAKEDEV for vhci


# 1.206 14-Sep-2019 maxv

Add vHCI, a driver which allows to send and receive USB packets directly
from userland via /dev/vhci. Using this, it becomes possible to test and
fuzz the USB stack and all the USB drivers without having the associated
hardware.

The vHCI device has four ports independently addressable.

For each xfer on each port, we create two packets: a setup packet (which
indicates mostly the type of request) and a data packet (which contains
the raw data). These packets are processed by read and write operations
on /dev/vhci: userland poll-reads it to fetch usb_device_request_t
structures, and dispatches the requests depending on bRequest and
bmRequestType.

A few ioctls are available:

VHCI_IOC_GET_INFO - Get the current status
VHCI_IOC_SET_PORT - Choose a vHCI port
VHCI_IOC_USB_ATTACH - Attach a USB device on the current port
VHCI_IOC_USB_DETACH - Detach the USB device on the current port

vHCI has already allowed me to automatically find several bugs in the USB
stack and its drivers.


Revision tags: netbsd-9-base
# 1.205 29-Jul-2019 gdt

branches: 1.205.2;
MAKEDEV.tmpl: Create nodes for 16 USB hubs

As proposed on current-users, but with better formatting.


Revision tags: phil-wifi-20190609
# 1.204 31-May-2019 nia

Raise the number of uhid nodes from 4 to 16.

My keyboard and mouse use multiple device nodes each. I can't use
any other devices once they're attached. With my keyboard, mouse,
and two game controllers attached, a total of 9 nodes are required.

Particularly, high-end keyboards with N-key rollover support require
more device nodes, since they pretend to be multiple keyboards to work
around limitations in the uhid compat spec.

My original intention was to raise it from 4 to 12, but martin
suggested increasing it to 16.

"somewhat insane, but so is reality" - mlelstv


# 1.203 18-May-2019 mlelstv

Add experimental userland interface to IPMI driver. Currently, transactions
(like sensor readout) are locked, so that a userland program may interfere with
envsys operation.

To use this you need a program like ipmitool built with OpenIPMI support.


# 1.202 01-Apr-2019 martin

Double the number of wedge device nodes


# 1.201 27-Mar-2019 mlelstv

Actually use unit number for iscsi device.


# 1.200 26-Mar-2019 pgoyette

Add srt(4) to /etc/MAKEDEV and corresponding update to MAKEDEV.8 man page.


# 1.199 23-Feb-2019 mlelstv

Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).


# 1.198 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


# 1.197 27-Jan-2019 maxv

Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.196 07-Nov-2018 maxv

Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

/usr/include/dev/nvmm/nvmm.h
/usr/include/dev/nvmm/nvmm_ioctl.h
/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.


# 1.195 04-Nov-2018 maxv

Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.194 23-Sep-2018 maxv

Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.


# 1.193 22-Sep-2018 kre

Avoid use of test -o for when this is used as part of an INSTALL system
and the SMALL test does not support -o


Revision tags: pgoyette-compat-0906
# 1.192 28-Jul-2018 sevan

Create fw(4) & fwmem(4) device nodes by default so fwctl(8) works out of the
box.


Revision tags: pgoyette-compat-0728
# 1.191 21-Jul-2018 maxv

Create /dev/ksyms as "440 $g_kmem". This prevents unprivileged users from
reading the kernel symbols. Discussed in January 2018 on tech-kern@,
reported by maya@, tested by tih@.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.190 20-May-2018 thorpej

branches: 1.190.2;
Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.189 09-Jan-2018 christos

branches: 1.189.2;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.216 02-Mar-2020 riastradh

Create /dev/ipmi0 in `MAKEDEV all'.

Works on my machine with sysutils/ipmitool if the latter is built
with CONFIGURE_ARGS+= --enable-intf-open.


# 1.215 27-Feb-2020 riastradh

Create some more cgd device nodes.


# 1.214 29-Jan-2020 maya

remove urio(4), a driver for the Rio500 MP3 player.

At this point it is highly unlikely this 1999 device still has users,
but it still comes up in the context of maxv's USB-fuzzing (and any device
could pretend to be a urio(4)), so it's best to get rid of it.

Renamed all major entries to obsolete, as was done in previous removals.

This still requires an update to sanitizers, but they're located in
"external", perhaps it should be first committed upstream?

Proposed on tech-kern a month ago.


# 1.213 19-Jan-2020 riastradh

Remove filemon(4).

Discussed on tech-kern:
https://mail-index.NetBSD.org/tech-kern/2020/01/13/msg025938.html

This was never (intentionally) enabled by default, and the design has
some shortcomings. You can get mostly the same results with ktrace,
as in usr.bin/make/filemon/filemon_ktrace.c which is now used instead
of filemon for make's meta mode.

If applications require higher performance than ktrace, or nesting
that ktrace doesn't support, we might consider adding something back
into the vfs system calls themselves, without hijacking the syscall
table. (Might want a more reliable output format too, e.g. one that
can handle newlines in file names.)


# 1.212 23-Dec-2019 maxv

Revert the removal of filemon.


# 1.211 18-Dec-2019 maxv

Retire filemon, discussed on tech-kern@.


Revision tags: phil-wifi-20191119
# 1.210 01-Nov-2019 ozaki-r

MAKEDEV: add entry for vio9p(4)


# 1.209 27-Oct-2019 maxv

Add the "nvmm" group, and make nvmm_init() public. Sent to tech-kern@ a few
days ago.


# 1.208 19-Sep-2019 thorpej

Create the character device for spiflash, in addition to the block device.
This is needed for getdiskrawname() to DTRT (for installboot(8)).

XXX pullup-9


# 1.207 15-Sep-2019 ryoon

Replace major number in MAKEDEV for vhci


# 1.206 14-Sep-2019 maxv

Add vHCI, a driver which allows to send and receive USB packets directly
from userland via /dev/vhci. Using this, it becomes possible to test and
fuzz the USB stack and all the USB drivers without having the associated
hardware.

The vHCI device has four ports independently addressable.

For each xfer on each port, we create two packets: a setup packet (which
indicates mostly the type of request) and a data packet (which contains
the raw data). These packets are processed by read and write operations
on /dev/vhci: userland poll-reads it to fetch usb_device_request_t
structures, and dispatches the requests depending on bRequest and
bmRequestType.

A few ioctls are available:

VHCI_IOC_GET_INFO - Get the current status
VHCI_IOC_SET_PORT - Choose a vHCI port
VHCI_IOC_USB_ATTACH - Attach a USB device on the current port
VHCI_IOC_USB_DETACH - Detach the USB device on the current port

vHCI has already allowed me to automatically find several bugs in the USB
stack and its drivers.


Revision tags: netbsd-9-base
# 1.205 29-Jul-2019 gdt

branches: 1.205.2;
MAKEDEV.tmpl: Create nodes for 16 USB hubs

As proposed on current-users, but with better formatting.


Revision tags: phil-wifi-20190609
# 1.204 31-May-2019 nia

Raise the number of uhid nodes from 4 to 16.

My keyboard and mouse use multiple device nodes each. I can't use
any other devices once they're attached. With my keyboard, mouse,
and two game controllers attached, a total of 9 nodes are required.

Particularly, high-end keyboards with N-key rollover support require
more device nodes, since they pretend to be multiple keyboards to work
around limitations in the uhid compat spec.

My original intention was to raise it from 4 to 12, but martin
suggested increasing it to 16.

"somewhat insane, but so is reality" - mlelstv


# 1.203 18-May-2019 mlelstv

Add experimental userland interface to IPMI driver. Currently, transactions
(like sensor readout) are locked, so that a userland program may interfere with
envsys operation.

To use this you need a program like ipmitool built with OpenIPMI support.


# 1.202 01-Apr-2019 martin

Double the number of wedge device nodes


# 1.201 27-Mar-2019 mlelstv

Actually use unit number for iscsi device.


# 1.200 26-Mar-2019 pgoyette

Add srt(4) to /etc/MAKEDEV and corresponding update to MAKEDEV.8 man page.


# 1.199 23-Feb-2019 mlelstv

Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).


# 1.198 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


# 1.197 27-Jan-2019 maxv

Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.196 07-Nov-2018 maxv

Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

/usr/include/dev/nvmm/nvmm.h
/usr/include/dev/nvmm/nvmm_ioctl.h
/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.


# 1.195 04-Nov-2018 maxv

Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.194 23-Sep-2018 maxv

Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.


# 1.193 22-Sep-2018 kre

Avoid use of test -o for when this is used as part of an INSTALL system
and the SMALL test does not support -o


Revision tags: pgoyette-compat-0906
# 1.192 28-Jul-2018 sevan

Create fw(4) & fwmem(4) device nodes by default so fwctl(8) works out of the
box.


Revision tags: pgoyette-compat-0728
# 1.191 21-Jul-2018 maxv

Create /dev/ksyms as "440 $g_kmem". This prevents unprivileged users from
reading the kernel symbols. Discussed in January 2018 on tech-kern@,
reported by maya@, tested by tih@.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.190 20-May-2018 thorpej

branches: 1.190.2;
Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.189 09-Jan-2018 christos

branches: 1.189.2;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.215 27-Feb-2020 riastradh

Create some more cgd device nodes.


# 1.214 29-Jan-2020 maya

remove urio(4), a driver for the Rio500 MP3 player.

At this point it is highly unlikely this 1999 device still has users,
but it still comes up in the context of maxv's USB-fuzzing (and any device
could pretend to be a urio(4)), so it's best to get rid of it.

Renamed all major entries to obsolete, as was done in previous removals.

This still requires an update to sanitizers, but they're located in
"external", perhaps it should be first committed upstream?

Proposed on tech-kern a month ago.


# 1.213 19-Jan-2020 riastradh

Remove filemon(4).

Discussed on tech-kern:
https://mail-index.NetBSD.org/tech-kern/2020/01/13/msg025938.html

This was never (intentionally) enabled by default, and the design has
some shortcomings. You can get mostly the same results with ktrace,
as in usr.bin/make/filemon/filemon_ktrace.c which is now used instead
of filemon for make's meta mode.

If applications require higher performance than ktrace, or nesting
that ktrace doesn't support, we might consider adding something back
into the vfs system calls themselves, without hijacking the syscall
table. (Might want a more reliable output format too, e.g. one that
can handle newlines in file names.)


# 1.212 23-Dec-2019 maxv

Revert the removal of filemon.


# 1.211 18-Dec-2019 maxv

Retire filemon, discussed on tech-kern@.


Revision tags: phil-wifi-20191119
# 1.210 01-Nov-2019 ozaki-r

MAKEDEV: add entry for vio9p(4)


# 1.209 27-Oct-2019 maxv

Add the "nvmm" group, and make nvmm_init() public. Sent to tech-kern@ a few
days ago.


# 1.208 19-Sep-2019 thorpej

Create the character device for spiflash, in addition to the block device.
This is needed for getdiskrawname() to DTRT (for installboot(8)).

XXX pullup-9


# 1.207 15-Sep-2019 ryoon

Replace major number in MAKEDEV for vhci


# 1.206 14-Sep-2019 maxv

Add vHCI, a driver which allows to send and receive USB packets directly
from userland via /dev/vhci. Using this, it becomes possible to test and
fuzz the USB stack and all the USB drivers without having the associated
hardware.

The vHCI device has four ports independently addressable.

For each xfer on each port, we create two packets: a setup packet (which
indicates mostly the type of request) and a data packet (which contains
the raw data). These packets are processed by read and write operations
on /dev/vhci: userland poll-reads it to fetch usb_device_request_t
structures, and dispatches the requests depending on bRequest and
bmRequestType.

A few ioctls are available:

VHCI_IOC_GET_INFO - Get the current status
VHCI_IOC_SET_PORT - Choose a vHCI port
VHCI_IOC_USB_ATTACH - Attach a USB device on the current port
VHCI_IOC_USB_DETACH - Detach the USB device on the current port

vHCI has already allowed me to automatically find several bugs in the USB
stack and its drivers.


Revision tags: netbsd-9-base
# 1.205 29-Jul-2019 gdt

branches: 1.205.2;
MAKEDEV.tmpl: Create nodes for 16 USB hubs

As proposed on current-users, but with better formatting.


Revision tags: phil-wifi-20190609
# 1.204 31-May-2019 nia

Raise the number of uhid nodes from 4 to 16.

My keyboard and mouse use multiple device nodes each. I can't use
any other devices once they're attached. With my keyboard, mouse,
and two game controllers attached, a total of 9 nodes are required.

Particularly, high-end keyboards with N-key rollover support require
more device nodes, since they pretend to be multiple keyboards to work
around limitations in the uhid compat spec.

My original intention was to raise it from 4 to 12, but martin
suggested increasing it to 16.

"somewhat insane, but so is reality" - mlelstv


# 1.203 18-May-2019 mlelstv

Add experimental userland interface to IPMI driver. Currently, transactions
(like sensor readout) are locked, so that a userland program may interfere with
envsys operation.

To use this you need a program like ipmitool built with OpenIPMI support.


# 1.202 01-Apr-2019 martin

Double the number of wedge device nodes


# 1.201 27-Mar-2019 mlelstv

Actually use unit number for iscsi device.


# 1.200 26-Mar-2019 pgoyette

Add srt(4) to /etc/MAKEDEV and corresponding update to MAKEDEV.8 man page.


# 1.199 23-Feb-2019 mlelstv

Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).


# 1.198 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


# 1.197 27-Jan-2019 maxv

Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.196 07-Nov-2018 maxv

Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

/usr/include/dev/nvmm/nvmm.h
/usr/include/dev/nvmm/nvmm_ioctl.h
/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.


# 1.195 04-Nov-2018 maxv

Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.194 23-Sep-2018 maxv

Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.


# 1.193 22-Sep-2018 kre

Avoid use of test -o for when this is used as part of an INSTALL system
and the SMALL test does not support -o


Revision tags: pgoyette-compat-0906
# 1.192 28-Jul-2018 sevan

Create fw(4) & fwmem(4) device nodes by default so fwctl(8) works out of the
box.


Revision tags: pgoyette-compat-0728
# 1.191 21-Jul-2018 maxv

Create /dev/ksyms as "440 $g_kmem". This prevents unprivileged users from
reading the kernel symbols. Discussed in January 2018 on tech-kern@,
reported by maya@, tested by tih@.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.190 20-May-2018 thorpej

branches: 1.190.2;
Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.189 09-Jan-2018 christos

branches: 1.189.2;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.214 29-Jan-2020 maya

remove urio(4), a driver for the Rio500 MP3 player.

At this point it is highly unlikely this 1999 device still has users,
but it still comes up in the context of maxv's USB-fuzzing (and any device
could pretend to be a urio(4)), so it's best to get rid of it.

Renamed all major entries to obsolete, as was done in previous removals.

This still requires an update to sanitizers, but they're located in
"external", perhaps it should be first committed upstream?

Proposed on tech-kern a month ago.


# 1.213 19-Jan-2020 riastradh

Remove filemon(4).

Discussed on tech-kern:
https://mail-index.NetBSD.org/tech-kern/2020/01/13/msg025938.html

This was never (intentionally) enabled by default, and the design has
some shortcomings. You can get mostly the same results with ktrace,
as in usr.bin/make/filemon/filemon_ktrace.c which is now used instead
of filemon for make's meta mode.

If applications require higher performance than ktrace, or nesting
that ktrace doesn't support, we might consider adding something back
into the vfs system calls themselves, without hijacking the syscall
table. (Might want a more reliable output format too, e.g. one that
can handle newlines in file names.)


# 1.212 23-Dec-2019 maxv

Revert the removal of filemon.


# 1.211 18-Dec-2019 maxv

Retire filemon, discussed on tech-kern@.


Revision tags: phil-wifi-20191119
# 1.210 01-Nov-2019 ozaki-r

MAKEDEV: add entry for vio9p(4)


# 1.209 27-Oct-2019 maxv

Add the "nvmm" group, and make nvmm_init() public. Sent to tech-kern@ a few
days ago.


# 1.208 19-Sep-2019 thorpej

Create the character device for spiflash, in addition to the block device.
This is needed for getdiskrawname() to DTRT (for installboot(8)).

XXX pullup-9


# 1.207 15-Sep-2019 ryoon

Replace major number in MAKEDEV for vhci


# 1.206 14-Sep-2019 maxv

Add vHCI, a driver which allows to send and receive USB packets directly
from userland via /dev/vhci. Using this, it becomes possible to test and
fuzz the USB stack and all the USB drivers without having the associated
hardware.

The vHCI device has four ports independently addressable.

For each xfer on each port, we create two packets: a setup packet (which
indicates mostly the type of request) and a data packet (which contains
the raw data). These packets are processed by read and write operations
on /dev/vhci: userland poll-reads it to fetch usb_device_request_t
structures, and dispatches the requests depending on bRequest and
bmRequestType.

A few ioctls are available:

VHCI_IOC_GET_INFO - Get the current status
VHCI_IOC_SET_PORT - Choose a vHCI port
VHCI_IOC_USB_ATTACH - Attach a USB device on the current port
VHCI_IOC_USB_DETACH - Detach the USB device on the current port

vHCI has already allowed me to automatically find several bugs in the USB
stack and its drivers.


Revision tags: netbsd-9-base
# 1.205 29-Jul-2019 gdt

branches: 1.205.2;
MAKEDEV.tmpl: Create nodes for 16 USB hubs

As proposed on current-users, but with better formatting.


Revision tags: phil-wifi-20190609
# 1.204 31-May-2019 nia

Raise the number of uhid nodes from 4 to 16.

My keyboard and mouse use multiple device nodes each. I can't use
any other devices once they're attached. With my keyboard, mouse,
and two game controllers attached, a total of 9 nodes are required.

Particularly, high-end keyboards with N-key rollover support require
more device nodes, since they pretend to be multiple keyboards to work
around limitations in the uhid compat spec.

My original intention was to raise it from 4 to 12, but martin
suggested increasing it to 16.

"somewhat insane, but so is reality" - mlelstv


# 1.203 18-May-2019 mlelstv

Add experimental userland interface to IPMI driver. Currently, transactions
(like sensor readout) are locked, so that a userland program may interfere with
envsys operation.

To use this you need a program like ipmitool built with OpenIPMI support.


# 1.202 01-Apr-2019 martin

Double the number of wedge device nodes


# 1.201 27-Mar-2019 mlelstv

Actually use unit number for iscsi device.


# 1.200 26-Mar-2019 pgoyette

Add srt(4) to /etc/MAKEDEV and corresponding update to MAKEDEV.8 man page.


# 1.199 23-Feb-2019 mlelstv

Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).


# 1.198 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


# 1.197 27-Jan-2019 maxv

Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.196 07-Nov-2018 maxv

Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

/usr/include/dev/nvmm/nvmm.h
/usr/include/dev/nvmm/nvmm_ioctl.h
/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.


# 1.195 04-Nov-2018 maxv

Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.194 23-Sep-2018 maxv

Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.


# 1.193 22-Sep-2018 kre

Avoid use of test -o for when this is used as part of an INSTALL system
and the SMALL test does not support -o


Revision tags: pgoyette-compat-0906
# 1.192 28-Jul-2018 sevan

Create fw(4) & fwmem(4) device nodes by default so fwctl(8) works out of the
box.


Revision tags: pgoyette-compat-0728
# 1.191 21-Jul-2018 maxv

Create /dev/ksyms as "440 $g_kmem". This prevents unprivileged users from
reading the kernel symbols. Discussed in January 2018 on tech-kern@,
reported by maya@, tested by tih@.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.190 20-May-2018 thorpej

branches: 1.190.2;
Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.189 09-Jan-2018 christos

branches: 1.189.2;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.213 19-Jan-2020 riastradh

Remove filemon(4).

Discussed on tech-kern:
https://mail-index.NetBSD.org/tech-kern/2020/01/13/msg025938.html

This was never (intentionally) enabled by default, and the design has
some shortcomings. You can get mostly the same results with ktrace,
as in usr.bin/make/filemon/filemon_ktrace.c which is now used instead
of filemon for make's meta mode.

If applications require higher performance than ktrace, or nesting
that ktrace doesn't support, we might consider adding something back
into the vfs system calls themselves, without hijacking the syscall
table. (Might want a more reliable output format too, e.g. one that
can handle newlines in file names.)


# 1.212 23-Dec-2019 maxv

Revert the removal of filemon.


# 1.211 18-Dec-2019 maxv

Retire filemon, discussed on tech-kern@.


Revision tags: phil-wifi-20191119
# 1.210 01-Nov-2019 ozaki-r

MAKEDEV: add entry for vio9p(4)


# 1.209 27-Oct-2019 maxv

Add the "nvmm" group, and make nvmm_init() public. Sent to tech-kern@ a few
days ago.


# 1.208 19-Sep-2019 thorpej

Create the character device for spiflash, in addition to the block device.
This is needed for getdiskrawname() to DTRT (for installboot(8)).

XXX pullup-9


# 1.207 15-Sep-2019 ryoon

Replace major number in MAKEDEV for vhci


# 1.206 14-Sep-2019 maxv

Add vHCI, a driver which allows to send and receive USB packets directly
from userland via /dev/vhci. Using this, it becomes possible to test and
fuzz the USB stack and all the USB drivers without having the associated
hardware.

The vHCI device has four ports independently addressable.

For each xfer on each port, we create two packets: a setup packet (which
indicates mostly the type of request) and a data packet (which contains
the raw data). These packets are processed by read and write operations
on /dev/vhci: userland poll-reads it to fetch usb_device_request_t
structures, and dispatches the requests depending on bRequest and
bmRequestType.

A few ioctls are available:

VHCI_IOC_GET_INFO - Get the current status
VHCI_IOC_SET_PORT - Choose a vHCI port
VHCI_IOC_USB_ATTACH - Attach a USB device on the current port
VHCI_IOC_USB_DETACH - Detach the USB device on the current port

vHCI has already allowed me to automatically find several bugs in the USB
stack and its drivers.


Revision tags: netbsd-9-base
# 1.205 29-Jul-2019 gdt

branches: 1.205.2;
MAKEDEV.tmpl: Create nodes for 16 USB hubs

As proposed on current-users, but with better formatting.


Revision tags: phil-wifi-20190609
# 1.204 31-May-2019 nia

Raise the number of uhid nodes from 4 to 16.

My keyboard and mouse use multiple device nodes each. I can't use
any other devices once they're attached. With my keyboard, mouse,
and two game controllers attached, a total of 9 nodes are required.

Particularly, high-end keyboards with N-key rollover support require
more device nodes, since they pretend to be multiple keyboards to work
around limitations in the uhid compat spec.

My original intention was to raise it from 4 to 12, but martin
suggested increasing it to 16.

"somewhat insane, but so is reality" - mlelstv


# 1.203 18-May-2019 mlelstv

Add experimental userland interface to IPMI driver. Currently, transactions
(like sensor readout) are locked, so that a userland program may interfere with
envsys operation.

To use this you need a program like ipmitool built with OpenIPMI support.


# 1.202 01-Apr-2019 martin

Double the number of wedge device nodes


# 1.201 27-Mar-2019 mlelstv

Actually use unit number for iscsi device.


# 1.200 26-Mar-2019 pgoyette

Add srt(4) to /etc/MAKEDEV and corresponding update to MAKEDEV.8 man page.


# 1.199 23-Feb-2019 mlelstv

Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).


# 1.198 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


# 1.197 27-Jan-2019 maxv

Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.196 07-Nov-2018 maxv

Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

/usr/include/dev/nvmm/nvmm.h
/usr/include/dev/nvmm/nvmm_ioctl.h
/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.


# 1.195 04-Nov-2018 maxv

Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.194 23-Sep-2018 maxv

Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.


# 1.193 22-Sep-2018 kre

Avoid use of test -o for when this is used as part of an INSTALL system
and the SMALL test does not support -o


Revision tags: pgoyette-compat-0906
# 1.192 28-Jul-2018 sevan

Create fw(4) & fwmem(4) device nodes by default so fwctl(8) works out of the
box.


Revision tags: pgoyette-compat-0728
# 1.191 21-Jul-2018 maxv

Create /dev/ksyms as "440 $g_kmem". This prevents unprivileged users from
reading the kernel symbols. Discussed in January 2018 on tech-kern@,
reported by maya@, tested by tih@.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.190 20-May-2018 thorpej

branches: 1.190.2;
Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.189 09-Jan-2018 christos

branches: 1.189.2;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.212 23-Dec-2019 maxv

Revert the removal of filemon.


# 1.211 18-Dec-2019 maxv

Retire filemon, discussed on tech-kern@.


Revision tags: phil-wifi-20191119
# 1.210 01-Nov-2019 ozaki-r

MAKEDEV: add entry for vio9p(4)


# 1.209 27-Oct-2019 maxv

Add the "nvmm" group, and make nvmm_init() public. Sent to tech-kern@ a few
days ago.


# 1.208 19-Sep-2019 thorpej

Create the character device for spiflash, in addition to the block device.
This is needed for getdiskrawname() to DTRT (for installboot(8)).

XXX pullup-9


# 1.207 15-Sep-2019 ryoon

Replace major number in MAKEDEV for vhci


# 1.206 14-Sep-2019 maxv

Add vHCI, a driver which allows to send and receive USB packets directly
from userland via /dev/vhci. Using this, it becomes possible to test and
fuzz the USB stack and all the USB drivers without having the associated
hardware.

The vHCI device has four ports independently addressable.

For each xfer on each port, we create two packets: a setup packet (which
indicates mostly the type of request) and a data packet (which contains
the raw data). These packets are processed by read and write operations
on /dev/vhci: userland poll-reads it to fetch usb_device_request_t
structures, and dispatches the requests depending on bRequest and
bmRequestType.

A few ioctls are available:

VHCI_IOC_GET_INFO - Get the current status
VHCI_IOC_SET_PORT - Choose a vHCI port
VHCI_IOC_USB_ATTACH - Attach a USB device on the current port
VHCI_IOC_USB_DETACH - Detach the USB device on the current port

vHCI has already allowed me to automatically find several bugs in the USB
stack and its drivers.


Revision tags: netbsd-9-base
# 1.205 29-Jul-2019 gdt

branches: 1.205.2;
MAKEDEV.tmpl: Create nodes for 16 USB hubs

As proposed on current-users, but with better formatting.


Revision tags: phil-wifi-20190609
# 1.204 31-May-2019 nia

Raise the number of uhid nodes from 4 to 16.

My keyboard and mouse use multiple device nodes each. I can't use
any other devices once they're attached. With my keyboard, mouse,
and two game controllers attached, a total of 9 nodes are required.

Particularly, high-end keyboards with N-key rollover support require
more device nodes, since they pretend to be multiple keyboards to work
around limitations in the uhid compat spec.

My original intention was to raise it from 4 to 12, but martin
suggested increasing it to 16.

"somewhat insane, but so is reality" - mlelstv


# 1.203 18-May-2019 mlelstv

Add experimental userland interface to IPMI driver. Currently, transactions
(like sensor readout) are locked, so that a userland program may interfere with
envsys operation.

To use this you need a program like ipmitool built with OpenIPMI support.


# 1.202 01-Apr-2019 martin

Double the number of wedge device nodes


# 1.201 27-Mar-2019 mlelstv

Actually use unit number for iscsi device.


# 1.200 26-Mar-2019 pgoyette

Add srt(4) to /etc/MAKEDEV and corresponding update to MAKEDEV.8 man page.


# 1.199 23-Feb-2019 mlelstv

Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).


# 1.198 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


# 1.197 27-Jan-2019 maxv

Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.196 07-Nov-2018 maxv

Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

/usr/include/dev/nvmm/nvmm.h
/usr/include/dev/nvmm/nvmm_ioctl.h
/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.


# 1.195 04-Nov-2018 maxv

Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.194 23-Sep-2018 maxv

Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.


# 1.193 22-Sep-2018 kre

Avoid use of test -o for when this is used as part of an INSTALL system
and the SMALL test does not support -o


Revision tags: pgoyette-compat-0906
# 1.192 28-Jul-2018 sevan

Create fw(4) & fwmem(4) device nodes by default so fwctl(8) works out of the
box.


Revision tags: pgoyette-compat-0728
# 1.191 21-Jul-2018 maxv

Create /dev/ksyms as "440 $g_kmem". This prevents unprivileged users from
reading the kernel symbols. Discussed in January 2018 on tech-kern@,
reported by maya@, tested by tih@.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.190 20-May-2018 thorpej

branches: 1.190.2;
Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.189 09-Jan-2018 christos

branches: 1.189.2;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.211 18-Dec-2019 maxv

Retire filemon, discussed on tech-kern@.


Revision tags: phil-wifi-20191119
# 1.210 01-Nov-2019 ozaki-r

MAKEDEV: add entry for vio9p(4)


# 1.209 27-Oct-2019 maxv

Add the "nvmm" group, and make nvmm_init() public. Sent to tech-kern@ a few
days ago.


# 1.208 19-Sep-2019 thorpej

Create the character device for spiflash, in addition to the block device.
This is needed for getdiskrawname() to DTRT (for installboot(8)).

XXX pullup-9


# 1.207 15-Sep-2019 ryoon

Replace major number in MAKEDEV for vhci


# 1.206 14-Sep-2019 maxv

Add vHCI, a driver which allows to send and receive USB packets directly
from userland via /dev/vhci. Using this, it becomes possible to test and
fuzz the USB stack and all the USB drivers without having the associated
hardware.

The vHCI device has four ports independently addressable.

For each xfer on each port, we create two packets: a setup packet (which
indicates mostly the type of request) and a data packet (which contains
the raw data). These packets are processed by read and write operations
on /dev/vhci: userland poll-reads it to fetch usb_device_request_t
structures, and dispatches the requests depending on bRequest and
bmRequestType.

A few ioctls are available:

VHCI_IOC_GET_INFO - Get the current status
VHCI_IOC_SET_PORT - Choose a vHCI port
VHCI_IOC_USB_ATTACH - Attach a USB device on the current port
VHCI_IOC_USB_DETACH - Detach the USB device on the current port

vHCI has already allowed me to automatically find several bugs in the USB
stack and its drivers.


Revision tags: netbsd-9-base
# 1.205 29-Jul-2019 gdt

branches: 1.205.2;
MAKEDEV.tmpl: Create nodes for 16 USB hubs

As proposed on current-users, but with better formatting.


Revision tags: phil-wifi-20190609
# 1.204 31-May-2019 nia

Raise the number of uhid nodes from 4 to 16.

My keyboard and mouse use multiple device nodes each. I can't use
any other devices once they're attached. With my keyboard, mouse,
and two game controllers attached, a total of 9 nodes are required.

Particularly, high-end keyboards with N-key rollover support require
more device nodes, since they pretend to be multiple keyboards to work
around limitations in the uhid compat spec.

My original intention was to raise it from 4 to 12, but martin
suggested increasing it to 16.

"somewhat insane, but so is reality" - mlelstv


# 1.203 18-May-2019 mlelstv

Add experimental userland interface to IPMI driver. Currently, transactions
(like sensor readout) are locked, so that a userland program may interfere with
envsys operation.

To use this you need a program like ipmitool built with OpenIPMI support.


# 1.202 01-Apr-2019 martin

Double the number of wedge device nodes


# 1.201 27-Mar-2019 mlelstv

Actually use unit number for iscsi device.


# 1.200 26-Mar-2019 pgoyette

Add srt(4) to /etc/MAKEDEV and corresponding update to MAKEDEV.8 man page.


# 1.199 23-Feb-2019 mlelstv

Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).


# 1.198 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


# 1.197 27-Jan-2019 maxv

Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.196 07-Nov-2018 maxv

Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

/usr/include/dev/nvmm/nvmm.h
/usr/include/dev/nvmm/nvmm_ioctl.h
/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.


# 1.195 04-Nov-2018 maxv

Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.194 23-Sep-2018 maxv

Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.


# 1.193 22-Sep-2018 kre

Avoid use of test -o for when this is used as part of an INSTALL system
and the SMALL test does not support -o


Revision tags: pgoyette-compat-0906
# 1.192 28-Jul-2018 sevan

Create fw(4) & fwmem(4) device nodes by default so fwctl(8) works out of the
box.


Revision tags: pgoyette-compat-0728
# 1.191 21-Jul-2018 maxv

Create /dev/ksyms as "440 $g_kmem". This prevents unprivileged users from
reading the kernel symbols. Discussed in January 2018 on tech-kern@,
reported by maya@, tested by tih@.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.190 20-May-2018 thorpej

branches: 1.190.2;
Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.189 09-Jan-2018 christos

branches: 1.189.2;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.210 01-Nov-2019 ozaki-r

MAKEDEV: add entry for vio9p(4)


# 1.209 27-Oct-2019 maxv

Add the "nvmm" group, and make nvmm_init() public. Sent to tech-kern@ a few
days ago.


# 1.208 19-Sep-2019 thorpej

Create the character device for spiflash, in addition to the block device.
This is needed for getdiskrawname() to DTRT (for installboot(8)).

XXX pullup-9


# 1.207 15-Sep-2019 ryoon

Replace major number in MAKEDEV for vhci


# 1.206 14-Sep-2019 maxv

Add vHCI, a driver which allows to send and receive USB packets directly
from userland via /dev/vhci. Using this, it becomes possible to test and
fuzz the USB stack and all the USB drivers without having the associated
hardware.

The vHCI device has four ports independently addressable.

For each xfer on each port, we create two packets: a setup packet (which
indicates mostly the type of request) and a data packet (which contains
the raw data). These packets are processed by read and write operations
on /dev/vhci: userland poll-reads it to fetch usb_device_request_t
structures, and dispatches the requests depending on bRequest and
bmRequestType.

A few ioctls are available:

VHCI_IOC_GET_INFO - Get the current status
VHCI_IOC_SET_PORT - Choose a vHCI port
VHCI_IOC_USB_ATTACH - Attach a USB device on the current port
VHCI_IOC_USB_DETACH - Detach the USB device on the current port

vHCI has already allowed me to automatically find several bugs in the USB
stack and its drivers.


Revision tags: netbsd-9-base
# 1.205 29-Jul-2019 gdt

branches: 1.205.2;
MAKEDEV.tmpl: Create nodes for 16 USB hubs

As proposed on current-users, but with better formatting.


Revision tags: phil-wifi-20190609
# 1.204 31-May-2019 nia

Raise the number of uhid nodes from 4 to 16.

My keyboard and mouse use multiple device nodes each. I can't use
any other devices once they're attached. With my keyboard, mouse,
and two game controllers attached, a total of 9 nodes are required.

Particularly, high-end keyboards with N-key rollover support require
more device nodes, since they pretend to be multiple keyboards to work
around limitations in the uhid compat spec.

My original intention was to raise it from 4 to 12, but martin
suggested increasing it to 16.

"somewhat insane, but so is reality" - mlelstv


# 1.203 18-May-2019 mlelstv

Add experimental userland interface to IPMI driver. Currently, transactions
(like sensor readout) are locked, so that a userland program may interfere with
envsys operation.

To use this you need a program like ipmitool built with OpenIPMI support.


# 1.202 01-Apr-2019 martin

Double the number of wedge device nodes


# 1.201 27-Mar-2019 mlelstv

Actually use unit number for iscsi device.


# 1.200 26-Mar-2019 pgoyette

Add srt(4) to /etc/MAKEDEV and corresponding update to MAKEDEV.8 man page.


# 1.199 23-Feb-2019 mlelstv

Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).


# 1.198 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


# 1.197 27-Jan-2019 maxv

Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.196 07-Nov-2018 maxv

Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

/usr/include/dev/nvmm/nvmm.h
/usr/include/dev/nvmm/nvmm_ioctl.h
/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.


# 1.195 04-Nov-2018 maxv

Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.194 23-Sep-2018 maxv

Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.


# 1.193 22-Sep-2018 kre

Avoid use of test -o for when this is used as part of an INSTALL system
and the SMALL test does not support -o


Revision tags: pgoyette-compat-0906
# 1.192 28-Jul-2018 sevan

Create fw(4) & fwmem(4) device nodes by default so fwctl(8) works out of the
box.


Revision tags: pgoyette-compat-0728
# 1.191 21-Jul-2018 maxv

Create /dev/ksyms as "440 $g_kmem". This prevents unprivileged users from
reading the kernel symbols. Discussed in January 2018 on tech-kern@,
reported by maya@, tested by tih@.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.190 20-May-2018 thorpej

branches: 1.190.2;
Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.189 09-Jan-2018 christos

branches: 1.189.2;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.209 27-Oct-2019 maxv

Add the "nvmm" group, and make nvmm_init() public. Sent to tech-kern@ a few
days ago.


# 1.208 19-Sep-2019 thorpej

Create the character device for spiflash, in addition to the block device.
This is needed for getdiskrawname() to DTRT (for installboot(8)).

XXX pullup-9


# 1.207 15-Sep-2019 ryoon

Replace major number in MAKEDEV for vhci


# 1.206 14-Sep-2019 maxv

Add vHCI, a driver which allows to send and receive USB packets directly
from userland via /dev/vhci. Using this, it becomes possible to test and
fuzz the USB stack and all the USB drivers without having the associated
hardware.

The vHCI device has four ports independently addressable.

For each xfer on each port, we create two packets: a setup packet (which
indicates mostly the type of request) and a data packet (which contains
the raw data). These packets are processed by read and write operations
on /dev/vhci: userland poll-reads it to fetch usb_device_request_t
structures, and dispatches the requests depending on bRequest and
bmRequestType.

A few ioctls are available:

VHCI_IOC_GET_INFO - Get the current status
VHCI_IOC_SET_PORT - Choose a vHCI port
VHCI_IOC_USB_ATTACH - Attach a USB device on the current port
VHCI_IOC_USB_DETACH - Detach the USB device on the current port

vHCI has already allowed me to automatically find several bugs in the USB
stack and its drivers.


Revision tags: netbsd-9-base
# 1.205 29-Jul-2019 gdt

branches: 1.205.2;
MAKEDEV.tmpl: Create nodes for 16 USB hubs

As proposed on current-users, but with better formatting.


Revision tags: phil-wifi-20190609
# 1.204 31-May-2019 nia

Raise the number of uhid nodes from 4 to 16.

My keyboard and mouse use multiple device nodes each. I can't use
any other devices once they're attached. With my keyboard, mouse,
and two game controllers attached, a total of 9 nodes are required.

Particularly, high-end keyboards with N-key rollover support require
more device nodes, since they pretend to be multiple keyboards to work
around limitations in the uhid compat spec.

My original intention was to raise it from 4 to 12, but martin
suggested increasing it to 16.

"somewhat insane, but so is reality" - mlelstv


# 1.203 18-May-2019 mlelstv

Add experimental userland interface to IPMI driver. Currently, transactions
(like sensor readout) are locked, so that a userland program may interfere with
envsys operation.

To use this you need a program like ipmitool built with OpenIPMI support.


# 1.202 01-Apr-2019 martin

Double the number of wedge device nodes


# 1.201 27-Mar-2019 mlelstv

Actually use unit number for iscsi device.


# 1.200 26-Mar-2019 pgoyette

Add srt(4) to /etc/MAKEDEV and corresponding update to MAKEDEV.8 man page.


# 1.199 23-Feb-2019 mlelstv

Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).


# 1.198 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


# 1.197 27-Jan-2019 maxv

Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.196 07-Nov-2018 maxv

Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

/usr/include/dev/nvmm/nvmm.h
/usr/include/dev/nvmm/nvmm_ioctl.h
/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.


# 1.195 04-Nov-2018 maxv

Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.194 23-Sep-2018 maxv

Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.


# 1.193 22-Sep-2018 kre

Avoid use of test -o for when this is used as part of an INSTALL system
and the SMALL test does not support -o


Revision tags: pgoyette-compat-0906
# 1.192 28-Jul-2018 sevan

Create fw(4) & fwmem(4) device nodes by default so fwctl(8) works out of the
box.


Revision tags: pgoyette-compat-0728
# 1.191 21-Jul-2018 maxv

Create /dev/ksyms as "440 $g_kmem". This prevents unprivileged users from
reading the kernel symbols. Discussed in January 2018 on tech-kern@,
reported by maya@, tested by tih@.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.190 20-May-2018 thorpej

branches: 1.190.2;
Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.189 09-Jan-2018 christos

branches: 1.189.2;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.208 19-Sep-2019 thorpej

Create the character device for spiflash, in addition to the block device.
This is needed for getdiskrawname() to DTRT (for installboot(8)).

XXX pullup-9


# 1.207 15-Sep-2019 ryoon

Replace major number in MAKEDEV for vhci


# 1.206 14-Sep-2019 maxv

Add vHCI, a driver which allows to send and receive USB packets directly
from userland via /dev/vhci. Using this, it becomes possible to test and
fuzz the USB stack and all the USB drivers without having the associated
hardware.

The vHCI device has four ports independently addressable.

For each xfer on each port, we create two packets: a setup packet (which
indicates mostly the type of request) and a data packet (which contains
the raw data). These packets are processed by read and write operations
on /dev/vhci: userland poll-reads it to fetch usb_device_request_t
structures, and dispatches the requests depending on bRequest and
bmRequestType.

A few ioctls are available:

VHCI_IOC_GET_INFO - Get the current status
VHCI_IOC_SET_PORT - Choose a vHCI port
VHCI_IOC_USB_ATTACH - Attach a USB device on the current port
VHCI_IOC_USB_DETACH - Detach the USB device on the current port

vHCI has already allowed me to automatically find several bugs in the USB
stack and its drivers.


Revision tags: netbsd-9-base
# 1.205 29-Jul-2019 gdt

MAKEDEV.tmpl: Create nodes for 16 USB hubs

As proposed on current-users, but with better formatting.


Revision tags: phil-wifi-20190609
# 1.204 31-May-2019 nia

Raise the number of uhid nodes from 4 to 16.

My keyboard and mouse use multiple device nodes each. I can't use
any other devices once they're attached. With my keyboard, mouse,
and two game controllers attached, a total of 9 nodes are required.

Particularly, high-end keyboards with N-key rollover support require
more device nodes, since they pretend to be multiple keyboards to work
around limitations in the uhid compat spec.

My original intention was to raise it from 4 to 12, but martin
suggested increasing it to 16.

"somewhat insane, but so is reality" - mlelstv


# 1.203 18-May-2019 mlelstv

Add experimental userland interface to IPMI driver. Currently, transactions
(like sensor readout) are locked, so that a userland program may interfere with
envsys operation.

To use this you need a program like ipmitool built with OpenIPMI support.


# 1.202 01-Apr-2019 martin

Double the number of wedge device nodes


# 1.201 27-Mar-2019 mlelstv

Actually use unit number for iscsi device.


# 1.200 26-Mar-2019 pgoyette

Add srt(4) to /etc/MAKEDEV and corresponding update to MAKEDEV.8 man page.


# 1.199 23-Feb-2019 mlelstv

Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).


# 1.198 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


# 1.197 27-Jan-2019 maxv

Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.196 07-Nov-2018 maxv

Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

/usr/include/dev/nvmm/nvmm.h
/usr/include/dev/nvmm/nvmm_ioctl.h
/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.


# 1.195 04-Nov-2018 maxv

Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.194 23-Sep-2018 maxv

Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.


# 1.193 22-Sep-2018 kre

Avoid use of test -o for when this is used as part of an INSTALL system
and the SMALL test does not support -o


Revision tags: pgoyette-compat-0906
# 1.192 28-Jul-2018 sevan

Create fw(4) & fwmem(4) device nodes by default so fwctl(8) works out of the
box.


Revision tags: pgoyette-compat-0728
# 1.191 21-Jul-2018 maxv

Create /dev/ksyms as "440 $g_kmem". This prevents unprivileged users from
reading the kernel symbols. Discussed in January 2018 on tech-kern@,
reported by maya@, tested by tih@.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.190 20-May-2018 thorpej

branches: 1.190.2;
Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.189 09-Jan-2018 christos

branches: 1.189.2;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.207 15-Sep-2019 ryoon

Replace major number in MAKEDEV for vhci


# 1.206 14-Sep-2019 maxv

Add vHCI, a driver which allows to send and receive USB packets directly
from userland via /dev/vhci. Using this, it becomes possible to test and
fuzz the USB stack and all the USB drivers without having the associated
hardware.

The vHCI device has four ports independently addressable.

For each xfer on each port, we create two packets: a setup packet (which
indicates mostly the type of request) and a data packet (which contains
the raw data). These packets are processed by read and write operations
on /dev/vhci: userland poll-reads it to fetch usb_device_request_t
structures, and dispatches the requests depending on bRequest and
bmRequestType.

A few ioctls are available:

VHCI_IOC_GET_INFO - Get the current status
VHCI_IOC_SET_PORT - Choose a vHCI port
VHCI_IOC_USB_ATTACH - Attach a USB device on the current port
VHCI_IOC_USB_DETACH - Detach the USB device on the current port

vHCI has already allowed me to automatically find several bugs in the USB
stack and its drivers.


Revision tags: netbsd-9-base
# 1.205 29-Jul-2019 gdt

MAKEDEV.tmpl: Create nodes for 16 USB hubs

As proposed on current-users, but with better formatting.


Revision tags: phil-wifi-20190609
# 1.204 31-May-2019 nia

Raise the number of uhid nodes from 4 to 16.

My keyboard and mouse use multiple device nodes each. I can't use
any other devices once they're attached. With my keyboard, mouse,
and two game controllers attached, a total of 9 nodes are required.

Particularly, high-end keyboards with N-key rollover support require
more device nodes, since they pretend to be multiple keyboards to work
around limitations in the uhid compat spec.

My original intention was to raise it from 4 to 12, but martin
suggested increasing it to 16.

"somewhat insane, but so is reality" - mlelstv


# 1.203 18-May-2019 mlelstv

Add experimental userland interface to IPMI driver. Currently, transactions
(like sensor readout) are locked, so that a userland program may interfere with
envsys operation.

To use this you need a program like ipmitool built with OpenIPMI support.


# 1.202 01-Apr-2019 martin

Double the number of wedge device nodes


# 1.201 27-Mar-2019 mlelstv

Actually use unit number for iscsi device.


# 1.200 26-Mar-2019 pgoyette

Add srt(4) to /etc/MAKEDEV and corresponding update to MAKEDEV.8 man page.


# 1.199 23-Feb-2019 mlelstv

Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).


# 1.198 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


# 1.197 27-Jan-2019 maxv

Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.196 07-Nov-2018 maxv

Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

/usr/include/dev/nvmm/nvmm.h
/usr/include/dev/nvmm/nvmm_ioctl.h
/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.


# 1.195 04-Nov-2018 maxv

Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.194 23-Sep-2018 maxv

Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.


# 1.193 22-Sep-2018 kre

Avoid use of test -o for when this is used as part of an INSTALL system
and the SMALL test does not support -o


Revision tags: pgoyette-compat-0906
# 1.192 28-Jul-2018 sevan

Create fw(4) & fwmem(4) device nodes by default so fwctl(8) works out of the
box.


Revision tags: pgoyette-compat-0728
# 1.191 21-Jul-2018 maxv

Create /dev/ksyms as "440 $g_kmem". This prevents unprivileged users from
reading the kernel symbols. Discussed in January 2018 on tech-kern@,
reported by maya@, tested by tih@.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.190 20-May-2018 thorpej

branches: 1.190.2;
Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.189 09-Jan-2018 christos

branches: 1.189.2;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.206 14-Sep-2019 maxv

Add vHCI, a driver which allows to send and receive USB packets directly
from userland via /dev/vhci. Using this, it becomes possible to test and
fuzz the USB stack and all the USB drivers without having the associated
hardware.

The vHCI device has four ports independently addressable.

For each xfer on each port, we create two packets: a setup packet (which
indicates mostly the type of request) and a data packet (which contains
the raw data). These packets are processed by read and write operations
on /dev/vhci: userland poll-reads it to fetch usb_device_request_t
structures, and dispatches the requests depending on bRequest and
bmRequestType.

A few ioctls are available:

VHCI_IOC_GET_INFO - Get the current status
VHCI_IOC_SET_PORT - Choose a vHCI port
VHCI_IOC_USB_ATTACH - Attach a USB device on the current port
VHCI_IOC_USB_DETACH - Detach the USB device on the current port

vHCI has already allowed me to automatically find several bugs in the USB
stack and its drivers.


Revision tags: netbsd-9-base
# 1.205 29-Jul-2019 gdt

MAKEDEV.tmpl: Create nodes for 16 USB hubs

As proposed on current-users, but with better formatting.


Revision tags: phil-wifi-20190609
# 1.204 31-May-2019 nia

Raise the number of uhid nodes from 4 to 16.

My keyboard and mouse use multiple device nodes each. I can't use
any other devices once they're attached. With my keyboard, mouse,
and two game controllers attached, a total of 9 nodes are required.

Particularly, high-end keyboards with N-key rollover support require
more device nodes, since they pretend to be multiple keyboards to work
around limitations in the uhid compat spec.

My original intention was to raise it from 4 to 12, but martin
suggested increasing it to 16.

"somewhat insane, but so is reality" - mlelstv


# 1.203 18-May-2019 mlelstv

Add experimental userland interface to IPMI driver. Currently, transactions
(like sensor readout) are locked, so that a userland program may interfere with
envsys operation.

To use this you need a program like ipmitool built with OpenIPMI support.


# 1.202 01-Apr-2019 martin

Double the number of wedge device nodes


# 1.201 27-Mar-2019 mlelstv

Actually use unit number for iscsi device.


# 1.200 26-Mar-2019 pgoyette

Add srt(4) to /etc/MAKEDEV and corresponding update to MAKEDEV.8 man page.


# 1.199 23-Feb-2019 mlelstv

Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).


# 1.198 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


# 1.197 27-Jan-2019 maxv

Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.196 07-Nov-2018 maxv

Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

/usr/include/dev/nvmm/nvmm.h
/usr/include/dev/nvmm/nvmm_ioctl.h
/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.


# 1.195 04-Nov-2018 maxv

Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.194 23-Sep-2018 maxv

Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.


# 1.193 22-Sep-2018 kre

Avoid use of test -o for when this is used as part of an INSTALL system
and the SMALL test does not support -o


Revision tags: pgoyette-compat-0906
# 1.192 28-Jul-2018 sevan

Create fw(4) & fwmem(4) device nodes by default so fwctl(8) works out of the
box.


Revision tags: pgoyette-compat-0728
# 1.191 21-Jul-2018 maxv

Create /dev/ksyms as "440 $g_kmem". This prevents unprivileged users from
reading the kernel symbols. Discussed in January 2018 on tech-kern@,
reported by maya@, tested by tih@.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.190 20-May-2018 thorpej

branches: 1.190.2;
Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.189 09-Jan-2018 christos

branches: 1.189.2;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.205 29-Jul-2019 gdt

MAKEDEV.tmpl: Create nodes for 16 USB hubs

As proposed on current-users, but with better formatting.


Revision tags: phil-wifi-20190609
# 1.204 31-May-2019 nia

Raise the number of uhid nodes from 4 to 16.

My keyboard and mouse use multiple device nodes each. I can't use
any other devices once they're attached. With my keyboard, mouse,
and two game controllers attached, a total of 9 nodes are required.

Particularly, high-end keyboards with N-key rollover support require
more device nodes, since they pretend to be multiple keyboards to work
around limitations in the uhid compat spec.

My original intention was to raise it from 4 to 12, but martin
suggested increasing it to 16.

"somewhat insane, but so is reality" - mlelstv


# 1.203 18-May-2019 mlelstv

Add experimental userland interface to IPMI driver. Currently, transactions
(like sensor readout) are locked, so that a userland program may interfere with
envsys operation.

To use this you need a program like ipmitool built with OpenIPMI support.


# 1.202 01-Apr-2019 martin

Double the number of wedge device nodes


# 1.201 27-Mar-2019 mlelstv

Actually use unit number for iscsi device.


# 1.200 26-Mar-2019 pgoyette

Add srt(4) to /etc/MAKEDEV and corresponding update to MAKEDEV.8 man page.


# 1.199 23-Feb-2019 mlelstv

Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).


# 1.198 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


# 1.197 27-Jan-2019 maxv

Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.196 07-Nov-2018 maxv

Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

/usr/include/dev/nvmm/nvmm.h
/usr/include/dev/nvmm/nvmm_ioctl.h
/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.


# 1.195 04-Nov-2018 maxv

Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.194 23-Sep-2018 maxv

Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.


# 1.193 22-Sep-2018 kre

Avoid use of test -o for when this is used as part of an INSTALL system
and the SMALL test does not support -o


Revision tags: pgoyette-compat-0906
# 1.192 28-Jul-2018 sevan

Create fw(4) & fwmem(4) device nodes by default so fwctl(8) works out of the
box.


Revision tags: pgoyette-compat-0728
# 1.191 21-Jul-2018 maxv

Create /dev/ksyms as "440 $g_kmem". This prevents unprivileged users from
reading the kernel symbols. Discussed in January 2018 on tech-kern@,
reported by maya@, tested by tih@.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.190 20-May-2018 thorpej

branches: 1.190.2;
Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.189 09-Jan-2018 christos

branches: 1.189.2;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.204 31-May-2019 nia

Raise the number of uhid nodes from 4 to 16.

My keyboard and mouse use multiple device nodes each. I can't use
any other devices once they're attached. With my keyboard, mouse,
and two game controllers attached, a total of 9 nodes are required.

Particularly, high-end keyboards with N-key rollover support require
more device nodes, since they pretend to be multiple keyboards to work
around limitations in the uhid compat spec.

My original intention was to raise it from 4 to 12, but martin
suggested increasing it to 16.

"somewhat insane, but so is reality" - mlelstv


# 1.203 18-May-2019 mlelstv

Add experimental userland interface to IPMI driver. Currently, transactions
(like sensor readout) are locked, so that a userland program may interfere with
envsys operation.

To use this you need a program like ipmitool built with OpenIPMI support.


# 1.202 01-Apr-2019 martin

Double the number of wedge device nodes


# 1.201 27-Mar-2019 mlelstv

Actually use unit number for iscsi device.


# 1.200 26-Mar-2019 pgoyette

Add srt(4) to /etc/MAKEDEV and corresponding update to MAKEDEV.8 man page.


# 1.199 23-Feb-2019 mlelstv

Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).


# 1.198 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


# 1.197 27-Jan-2019 maxv

Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.196 07-Nov-2018 maxv

Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

/usr/include/dev/nvmm/nvmm.h
/usr/include/dev/nvmm/nvmm_ioctl.h
/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.


# 1.195 04-Nov-2018 maxv

Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.194 23-Sep-2018 maxv

Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.


# 1.193 22-Sep-2018 kre

Avoid use of test -o for when this is used as part of an INSTALL system
and the SMALL test does not support -o


Revision tags: pgoyette-compat-0906
# 1.192 28-Jul-2018 sevan

Create fw(4) & fwmem(4) device nodes by default so fwctl(8) works out of the
box.


Revision tags: pgoyette-compat-0728
# 1.191 21-Jul-2018 maxv

Create /dev/ksyms as "440 $g_kmem". This prevents unprivileged users from
reading the kernel symbols. Discussed in January 2018 on tech-kern@,
reported by maya@, tested by tih@.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.190 20-May-2018 thorpej

Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.189 09-Jan-2018 christos

branches: 1.189.2;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.203 18-May-2019 mlelstv

Add experimental userland interface to IPMI driver. Currently, transactions
(like sensor readout) are locked, so that a userland program may interfere with
envsys operation.

To use this you need a program like ipmitool built with OpenIPMI support.


# 1.202 01-Apr-2019 martin

Double the number of wedge device nodes


# 1.201 27-Mar-2019 mlelstv

Actually use unit number for iscsi device.


# 1.200 26-Mar-2019 pgoyette

Add srt(4) to /etc/MAKEDEV and corresponding update to MAKEDEV.8 man page.


# 1.199 23-Feb-2019 mlelstv

Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).


# 1.198 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


# 1.197 27-Jan-2019 maxv

Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.196 07-Nov-2018 maxv

Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

/usr/include/dev/nvmm/nvmm.h
/usr/include/dev/nvmm/nvmm_ioctl.h
/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.


# 1.195 04-Nov-2018 maxv

Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.194 23-Sep-2018 maxv

Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.


# 1.193 22-Sep-2018 kre

Avoid use of test -o for when this is used as part of an INSTALL system
and the SMALL test does not support -o


Revision tags: pgoyette-compat-0906
# 1.192 28-Jul-2018 sevan

Create fw(4) & fwmem(4) device nodes by default so fwctl(8) works out of the
box.


Revision tags: pgoyette-compat-0728
# 1.191 21-Jul-2018 maxv

Create /dev/ksyms as "440 $g_kmem". This prevents unprivileged users from
reading the kernel symbols. Discussed in January 2018 on tech-kern@,
reported by maya@, tested by tih@.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.190 20-May-2018 thorpej

Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.189 09-Jan-2018 christos

branches: 1.189.2;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.202 01-Apr-2019 martin

Double the number of wedge device nodes


# 1.201 27-Mar-2019 mlelstv

Actually use unit number for iscsi device.


# 1.200 26-Mar-2019 pgoyette

Add srt(4) to /etc/MAKEDEV and corresponding update to MAKEDEV.8 man page.


# 1.199 23-Feb-2019 mlelstv

Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).


# 1.198 23-Feb-2019 kamil

Add KCOV - kernel code coverage tracing device

The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.


# 1.197 27-Jan-2019 maxv

Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.196 07-Nov-2018 maxv

Add NVMM - for NetBSD Virtual Machine Monitor -, a kernel driver that
provides support for hardware-accelerated virtualization on NetBSD.

It is made of an MI frontend, to which MD backends can be plugged. One
MD backend is implemented, x86-SVM, for x86 AMD CPUs.

We install

/usr/include/dev/nvmm/nvmm.h
/usr/include/dev/nvmm/nvmm_ioctl.h
/usr/include/dev/nvmm/{arch}/nvmm_{arch}.h

And the kernel module. For now, the only architecture where we do that
is amd64 (arch=x86).

NVMM is not enabled by default in amd64-GENERIC, but is instead easily
modloadable.

Sent to tech-kern@ a month ago. Validated with kASan, and optimized
with tprof.


# 1.195 04-Nov-2018 maxv

Add tprof in MAKEDEV.tmpl, and regen MAKEDEV.8.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
# 1.194 23-Sep-2018 maxv

Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.


# 1.193 22-Sep-2018 kre

Avoid use of test -o for when this is used as part of an INSTALL system
and the SMALL test does not support -o


Revision tags: pgoyette-compat-0906
# 1.192 28-Jul-2018 sevan

Create fw(4) & fwmem(4) device nodes by default so fwctl(8) works out of the
box.


Revision tags: pgoyette-compat-0728
# 1.191 21-Jul-2018 maxv

Create /dev/ksyms as "440 $g_kmem". This prevents unprivileged users from
reading the kernel symbols. Discussed in January 2018 on tech-kern@,
reported by maya@, tested by tih@.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.190 20-May-2018 thorpej

Add a 1PPS-over-GPIO driver, originally by Brad Spencer, with changes by
me to adapt to the new GPIO interrupt interface and support a wider variety
of GPIO pin configuations.

PR kern/51676


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.189 09-Jan-2018 christos

branches: 1.189.2;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.189 09-Jan-2018 christos

Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet


# 1.188 05-Dec-2017 jmcneill

make a few more drm nodes


# 1.187 25-Nov-2017 jmcneill

Add driver for QEMU Firmware Configuration device.

This interface allows the host to pass various data items and files to
the guest OS.


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

branches: 1.183.6;
Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4; 1.172.6;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.186 28-Aug-2017 sevan

veriexec is enabled by default in most kernel configs but the lack of device
node results in a non working config, despite following manual to get setup.
Remove a step for the user by creating a device node for veriexec by default.


ok mrg jakllsch


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.185 12-Aug-2017 jmcneill

add dial-out device node for plcom


Revision tags: perseant-stdc-iso10646-base
# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.184 08-Jun-2017 kre

As (briefly) discussed on current-users, change the way that MAKEDEV checks
for more than one of the -m -p -s -t args (and checks whether any were given
to pick one if not) to be more shell friendly.

Note that while the method here is the same as was discussed on the list,
the actual implementation is free of the typos, and just pure lunacy that
was in the code that was shown there.

Also note these changes are intended to be completely internal, there
should be no visible impact upon the way that MAKEDEV works.

ok:christos. Thanks to pgoyette for the code review.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 21-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 28-Feb-2013 christos

missing comment


# 1.163 28-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 26-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 22-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 21-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 19-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 12-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 02-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 05-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 17-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 21-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 03-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 07-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 24-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 07-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 27-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 02-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 29-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 19-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 27-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 14-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 24-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


Revision tags: pgoyette-localcount-20161104 localcount-20160914
# 1.183 08-Sep-2016 nonaka

Fix to cannnot be opened a nvme(4) namespace device file.


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.182 23-Jul-2016 kre

Always define MKNOD, even if we don't think we need it (turns out we do,
sometimes...) Noticed by Michael Plass reported on current-users.


Revision tags: pgoyette-localcount-base
# 1.181 16-Jun-2016 kre

branches: 1.181.2;

As discussed at the biginning of last week (June 6 & 7, 2016) on
tech-kern in messages with a Subject starting [Re:] /dev/sdN -> /dev/sdN[cd]
and in PR port-amd64/51216 :

Create bare (no letter suffix) device names (block & raw) that
refer to the raw device ('c' or 'd' partition as appropriate).

This commit was delayed waiting to see if there was to be any more
discussion - there wasn't a lot.

Caution: this is going to consume 2 more inodes per disc device
configured, everywhere that devices are configured using MAKEDEV


# 1.180 04-Jun-2016 nonaka

Add NVMe command passthrough support.


# 1.179 28-Jan-2016 riz

Create dtrace device as part of "all"


# 1.178 17-Jan-2016 christos

Add /dev/full


# 1.177 20-Nov-2015 pgoyette

Add the filemon(4) device.


# 1.176 08-Nov-2015 joerg

Translate requests for ucom into ttyU.


# 1.175 05-Nov-2015 macallan

create tty* entries for wsdisplay1-3


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.172 28-Oct-2013 mbalmer

branches: 1.172.4;
create a lua device node for lua(4) and luactl(8)


# 1.171 03-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 19-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


Revision tags: agc-symver-base
# 1.165 07-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 27-Feb-2013 christos

missing comment


# 1.163 27-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


Revision tags: yamt-pagecache-base8
# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 25-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


Revision tags: netbsd-6-base
# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 21-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 20-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


Revision tags: yamt-pagecache-base3
# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


Revision tags: yamt-pagecache-base2 yamt-pagecache-base
# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 02-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 05-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


Revision tags: cherry-xenmp-base bouyer-quota2-nbase
# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


Revision tags: bouyer-quota2-base
# 1.137 25-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: matt-mips64-premerge-20101231
# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 18-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


Revision tags: matt-premerge-20091211
# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 11-Mar-2009 jmcneill

/dev/{r,}altmem??


Revision tags: mjf-devfs2-base2
# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 16-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 11-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 mjf-devfs2-base
# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


Revision tags: wrstuden-revivesa-base-2
# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2
# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 01-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


Revision tags: keiichi-mipv6-base matt-armv6-nbase
# 1.102 04-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


Revision tags: mjf-devfs-base matt-armv6-base hpcarm-cleanup-base
# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 16-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 15-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


Revision tags: cube-autoconf-base
# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 08-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 08-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 11-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


Revision tags: matt-mips64-base
# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 20-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 11-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 02-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 06-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


Revision tags: netbsd-4-base
# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 23-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 06-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


Revision tags: abandoned-netbsd-4-base
# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 22-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 25-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 26-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 01-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 30-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


Revision tags: netbsd-3-base
# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 28-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 18-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 26-May-2004 christos

add ptm device.


Revision tags: netbsd-2-0-base
# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 13-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 21-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 23-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 22-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 25-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.174 01-Aug-2015 jmcneill

add hdmicec


# 1.173 19-Sep-2014 matt

add random/urandom to MAKEDEV std


# 1.172 28-Oct-2013 mbalmer

create a lua device node for lua(4) and luactl(8)


# 1.171 02-Aug-2013 soren

Some UMTS/LTE USB modems have as many as five tty instances and the
useful ones that understand AT commands tend to be enumerated last,
so bump up the default number of ttyU device nodes.


# 1.170 20-May-2013 mbalmer

Rename the 'gpio' group to '_gpio' as new group names should start with an
underscore. While here, fix the awk script to properly expand such group
names.


# 1.169 18-May-2013 mbalmer

Add a group 'gpio' and create gpio(4) device nodes under /dev with
mode 664 and group ownership set to 'gpio'. This allows controlled access
to specifically enabled gpio pins to members of the gpio group. See
gpioctl(8), and, gpio(4) for details.


# 1.168 01-May-2013 kiyohara

Support to build for epoc32 userland.


# 1.167 20-Apr-2013 rkujawa

Add spiflash device to MAKEDEV template and MAKEDEV config on evbarm.

Obtained from Marvell, Semihalf.


# 1.166 11-Apr-2013 martin

Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12.


# 1.165 08-Mar-2013 jmcneill

create /dev/vchiq


# 1.164 27-Feb-2013 christos

missing comment


# 1.163 27-Feb-2013 christos

node for dtrace


# 1.162 10-Feb-2013 christos

always use ${MKNOD} for consistency


# 1.161 26-Jan-2013 apb

The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.

This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


# 1.160 10-Jan-2013 skrll

Create a plcom0 device node for RaspberryPI


# 1.159 19-Sep-2012 bouyer

Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.158 05-Sep-2012 martin

branches: 1.158.2;
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.157 13-Aug-2012 christos

Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node.


# 1.156 05-Jun-2012 tsutsui

Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


# 1.155 25-May-2012 riz

Create /dev/iscsi0 as part of 'all'.


# 1.154 07-Apr-2012 christos

give wedges to everyone


# 1.153 25-Feb-2012 shattered

Quoting sys/dev/vme/files.vme commit log: "vmegeneric never saw the
light of the source tree. After 7 years, I guess nobody missed it."

OK by wiz@


# 1.152 25-Feb-2012 tron

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


# 1.151 10-Feb-2012 nakayama

branches: 1.151.2;
Remove "spif[0-9]*" case from ports other than sparc{,64} by using
%stty_chr% and %sbpp_chr%.

Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
observed in PR toolchain/45620 but not the fix.

Approved by releng.


# 1.150 21-Jan-2012 christos

add a tpm driver from bsssd.sourceforge.net


# 1.149 20-Jan-2012 isaki

Clean up pow(4) (which I had removed in Nov 2011).


# 1.148 19-Nov-2011 agc

grab major 203 for the iSCSI communications device (between kernel
driver and /sbin/iscsid)


# 1.147 08-Nov-2011 apb

The previous change made "nooutput -2" discard both stdout and
stderr, whereas it should discard only stderr. This commit
should fix that problem.


# 1.146 08-Nov-2011 apb

In the nooutput function, don't mess with file descritor 4
at the outer level; do it inside a subshell context so as not
to interfere with a different use of fd 4 by the caller.

This should fix PR 45590.


# 1.145 26-Oct-2011 apb

branches: 1.145.2;
Change the pattern for matching ttys to allow any number of digits,
(tty[0-9]*). This should fix PR 45514.


# 1.144 12-Oct-2011 apb

Exit with non-zero status when asked to create an unrecognised device.


# 1.143 01-Oct-2011 jmcneill

Install dev/i2c/i2c_io.h and implement the API in the iic(4) driver.
Obsolete the I2C_SCAN option as this can now be done from userland.


# 1.142 06-Sep-2011 apb

MAKEDEV dk<n> should create only the dk<n> device, but it previously
looped creating everything from dk0 to dk<n>.
Reported by M. Levinson.

Also add comments to cases where MAKEDEV loops creating multiple
devices.


# 1.141 06-Sep-2011 apb

In most case patterns, change foo*) to foo[0-9]*). There are also
a few where foo*) changes to foo|foo[0-9]*) or some other slightly
more complex pattern.

This should prevent "MAKEDEV foobar0" from accidentally matching
the foo* pattern when it should really give an error, and it
should make the order of the patterns less critical.


# 1.140 06-Aug-2011 jmcneill

add -u flag that causes the MAKEDEV script to only create a device node if it
doesn't exist


# 1.139 09-Jul-2011 jmcneill

create /dev/dvb/adapterN/* devices for dtv


# 1.138 26-Feb-2011 ahoka

Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards


# 1.137 25-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


# 1.136 19-Sep-2010 jakllsch

branches: 1.136.2;
Make pci(4) device nodes root:wheel 0640 by default.
Mortals do not need to be able to generate PCI Configuration Space
read transactions, which are not entirely without side effect, as
reported in PR#16300.


# 1.135 22-Aug-2010 rmind

Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@


# 1.134 18-Apr-2010 pooka

Also create ugen[123] by default -- my laptop attaches 2 ugens
already with just the builtin devices.


# 1.133 23-Mar-2010 jakllsch

Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.132 06-Mar-2010 plunky

include ttyHS0 in usbs target [for uhso(4)]


# 1.131 06-Mar-2010 plunky

Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


# 1.130 25-Sep-2009 mrg

add drm to the big comment at the top


# 1.129 24-Sep-2009 christos

fix dri/drm confusiog


# 1.128 06-Sep-2009 sborrill

hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio


# 1.127 05-Jul-2009 mrg

fix previous to actually pay attention to the unit number.
noted by drochner.


# 1.126 03-Jul-2009 mrg

create a /dev/dri/card0. fixes PR#40952.


# 1.125 14-Jun-2009 christos

makedir for real this time.


# 1.124 14-Jun-2009 christos

Use makedir, from M. Levinson.


# 1.123 14-Jun-2009 christos

absolute paths are not allowed here. from Anon Ymous


# 1.122 23-May-2009 ad

Create /dev/zfs and /dev/zpool/.


# 1.121 10-May-2009 elad

verified executable -> Veriexec.


# 1.120 11-Mar-2009 jmcneill

/dev/{r,}altmem??


# 1.119 03-Jan-2009 apb

branches: 1.119.2;
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted. This should fix PR 40316 from
David Ross.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.118 28-Nov-2008 joerg

Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.117 21-Nov-2008 ad

Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.116 17-Nov-2008 uch

add dialout device for scif, sci


# 1.115 12-Nov-2008 jmcneill

My previous change should have read 'makedev video', not audio.


# 1.114 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


# 1.113 14-Sep-2008 jmcneill

branches: 1.113.2;
Create /dev/videoN with all target


# 1.112 14-Sep-2008 jmcneill

Don't bother with /dev/video -> /dev/video0 symlink, nobody uses it


# 1.111 13-Sep-2008 tsutsui

Move "makedev cfs" for the vcoda device from MI MAKEDEV.tmpl to
MD MAKEDEV.conf. Not all ports have vcoda in their majors.foo files
and we shouldn't (re)assign major numbers on all ports before 5.0.

Should close PR port-sgimips/38962.


# 1.110 06-Sep-2008 jmcneill

Add /dev/video*


# 1.109 13-Jul-2008 apb

Let "MAKEDEV ptm" create the /dev/pts directory. Requested
in pkgsrc-users by Christian Biere.


# 1.108 22-May-2008 hauke

Added driver for the Creative Systems Inc. Hurdler CPI parallel printer card.
Timecounter support for the Z8536 counters A + B is not complete, yet.

Reviewed by Martin Husemann.


# 1.107 30-Apr-2008 martin

branches: 1.107.2;
Convert TNF licenses to new 2 clause variant


# 1.106 15-Apr-2008 apb

branches: 1.106.2;
Remove an extraneous "%" from the end of a line.


# 1.105 15-Apr-2008 apb

In the nooutput function, use {...} to ensure that shell messages
like "cmd: not found" are also redirected.

This should fix a problem reported by Chavdar Ivanov in which
the message "mtree: not found" appears during installation.


# 1.104 09-Apr-2008 apb

* Fix the problem with pax complaining "file would overwrite itself" for
already-existing device nodes. This is done by invoking pax with its
current working directory set to an empty temporary directory.

* Add "-t mtree" command line option, to force MAKEDEV to use "mtree
-e -U" to create device nodes. Here are some timings from "MAKEDEV
${method} all" on an i386 system; each method was executed three
times, first in an empty directory, then twice in an already-populated
directory:

-m mknod
4.56 real 1.58 user 1.68 sys
2.96 real 1.37 user 1.48 sys
2.95 real 1.43 user 1.44 sys
-p pax
1.80 real 0.18 user 0.62 sys
2.35 real 0.25 user 0.80 sys
2.38 real 0.24 user 0.82 sys
-t mtree
1.62 real 0.22 user 0.44 sys
0.23 real 0.29 user 0.04 sys
0.24 real 0.28 user 0.05 sys

* If no command line options force a choice, then prefer mtree, pax, or
mknod, in that order of preference.

No objections in tech-userlevel to an earlier version of this change.


# 1.103 01-Apr-2008 dyoung

Certain misguided people have complained, NetBSD only runs rare or
"retro" computers, but NetBSD also runs a growing number of rare
and retro add-on cards. With this patch, NetBSD supports the IDEC
Supervision/16, a black&white image capture board for the 16-bit
ISA bus. Approximate date of manufacture: 1991. Total instances
known to be in use throughout the world: one.

Coming soon; isvctl(8), the utility program for capturing 8-bit,
512x480 images at speeds of up to 6 frames per second.


# 1.102 04-Mar-2008 christos

Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.


# 1.101 31-Dec-2007 ad

branches: 1.101.2; 1.101.4; 1.101.6;
Remove systrace. Ok core@.


# 1.100 16-Dec-2007 riz

Create drvctl as part of 'all'.


# 1.99 16-Dec-2007 apb

s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.


# 1.98 15-Dec-2007 apb

When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8). Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.


# 1.97 14-Dec-2007 apb

In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
because /dev/null might not exist early in the boot sequence. This
should fix a bug in which the pax autodetection failed when used from
init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV. This allows
MAKEDEV.local to support all the options understood by MAKEDEV, instead
of only a subset. This should fix a bug in which the setup() function
could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
by MAKEDEV.local.


# 1.96 11-Dec-2007 apb

* Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.


# 1.95 11-Dec-2007 apb

Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.


# 1.94 09-Dec-2007 apb

* MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
always have been mutually exclusive. Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
"pax -w -M" appears to be usable.
* Add missing options to a usage message.


# 1.93 07-Dec-2007 apb

Update some comments and remove an unnecessary eval. No functional change.


# 1.92 07-Dec-2007 apb

Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight. The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.


# 1.91 20-Nov-2007 pooka

add /dev/pud


# 1.90 13-Nov-2007 pooka

Create /dev/putter and symlink /dev/puffs to it.


# 1.89 10-Nov-2007 jmcneill

Add support for /dev/padN devices


# 1.88 03-Nov-2007 gdt

Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".


# 1.87 04-Aug-2007 ad

branches: 1.87.2; 1.87.4;
Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.86 16-May-2007 martti

Create /dev/bio


# 1.85 21-Mar-2007 dyoung

Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.


# 1.84 20-Mar-2007 dyoung

Remove whitespace from ends of lines.


# 1.83 10-Mar-2007 apb

Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.


# 1.82 11-Mar-2007 apb

* Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod. This is much faster (speed
increases of up to 20 times have been observed, but 3 to 5 times is
more common).
* One "-M" flag will create the mfs file system but not redirect output
to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.


# 1.81 09-Mar-2007 dsl

Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.


# 1.80 09-Mar-2007 dsl

Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.


# 1.79 02-Mar-2007 apb

Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".


# 1.78 02-Mar-2007 dsl

Use the correct major number for the temporary console node


# 1.77 02-Mar-2007 dsl

Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.


# 1.76 01-Mar-2007 apb

If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'. That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.


# 1.75 28-Feb-2007 apb

Avoid using dirname(1), which is not available in installation
ramdisk images.


# 1.74 26-Feb-2007 apb

Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local. This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc


# 1.73 06-Feb-2007 riz

Fix off-by-one error in the creation of dk(4) device nodes.


# 1.72 06-Feb-2007 dyoung

Create /dev/cmos.


# 1.71 15-Jan-2007 hubertf

Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@


# 1.70 09-Jan-2007 pooka

create /dev/puffs in 'all'


# 1.69 29-Dec-2006 ad

Enable /dev/io for COMPAT_FREEBSD.


# 1.68 10-Dec-2006 dyoung

Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.


# 1.67 22-Oct-2006 pooka

branches: 1.67.2;
add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental


# 1.66 24-Sep-2006 manu

Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.


# 1.65 23-Sep-2006 manu

Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
hardcodes the major


# 1.64 23-Sep-2006 manu

Add twa device


# 1.63 23-Sep-2006 elad

PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!


# 1.62 10-Sep-2006 plunky

update to bluetooth device attachment:

remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf


# 1.61 06-Sep-2006 ad

Add /dev/lockstat.


# 1.60 13-Aug-2006 martin

Typo


# 1.59 12-Aug-2006 christos

- add creation of wedges /dev/{r,}dkN
- use $() instead of ``


# 1.58 27-Jul-2006 martti

branches: 1.58.2;
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.57 26-Jul-2006 tron

Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.


# 1.56 23-Jul-2006 bouyer

Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.


# 1.55 07-Jul-2006 yamt

fix xsd_kva.


# 1.54 04-Jul-2006 bouyer

Add new xen device xsd_kva (for Xen3 dom0 operations)


# 1.53 19-Jun-2006 gdamore

Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.


# 1.52 03-Apr-2006 scw

Add a kernel driver and userland program for the Topfield TF5000PVR range
of digital video recorders popular in Europe and Australia.

These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.


# 1.51 24-Mar-2006 christos

Add parentheses.


# 1.50 15-Feb-2006 dsl

Add some more .MAKE so that we don't run multiple parallel makes.


# 1.49 06-Feb-2006 hamajima

EP93xx has 8 GPIOs. I increased /dev/gpio*.


# 1.48 26-Sep-2005 jmcneill

Add gpio devices to template.


# 1.47 30-Jul-2005 skrll

Add a driver for Cypress microcontroller based USB serial adapters.

XXX hw flow control is not supported.


# 1.46 11-Jul-2005 kiyohara

ieee1394 import from FreeBSD.


# 1.45 16-Jun-2005 elad

Don't allow unprivileged users to access the veriexec device.


# 1.44 28-May-2005 blymn

Fix naming of the verified exec character device placeholder.


# 1.43 01-May-2005 lukem

Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.42 29-Apr-2005 augustss

Make /dev/usb readable to all; it is only used to report USB events.


# 1.41 01-Apr-2005 peter

Add pf to the all target. Pointed out by Steve Rumble.


# 1.40 12-Mar-2005 jdolecek

branches: 1.40.2;
separate tun(4) and joy(4) entries, those two are totally independant
PR: kern/29673 by FUKAUMI Naoki


# 1.39 11-Mar-2005 bouyer

Integrate Xen to the i386 build process:
- Add xen devices to MAKEDEV
- Add Xen kernels to list of kernel to build
- Add INSTALL_XENU to the install kernels
- introduce the xbd disk devices to sysinst.

This will add 3 kernels to the i386 release:
XEN0 for use as a Xen domain0 kernel
XENU for use on a non-privileged domain
INSTALL_XENU to install NetBSD on a non-privileged domain virtual disk.


# 1.38 08-Jan-2005 cube

Create tap (cloning), tap0 .. tap3 in /dev by default.


# 1.37 08-Jan-2005 joff

Add tslcd


# 1.36 04-Jan-2005 manu

Fix bpf/bpf0 swap


# 1.35 03-Jan-2005 manu

Link /dev/bpf to /dev/bpf0. dhclient looks for /dev/bpf now...


# 1.34 28-Dec-2004 joff

Add epcom serial UART char device found on Cirrus Logic EP93xx ARM9 SoC's


# 1.33 01-Dec-2004 christos

Marry tun and joy.


# 1.32 01-Dec-2004 christos

Create /dev/bpf not /dev/bpfN


# 1.31 22-Oct-2004 peter

Remove the "(not in tree)" part in the comment for PF.


# 1.30 12-Oct-2004 christos

PR/27235: Jukka Salmi: MAKEDEV regression because of printf -> zeropad change


# 1.29 27-Aug-2004 drochner

add "drvctl" template


# 1.28 01-Aug-2004 bouyer

Add atabus devices.


# 1.27 01-Aug-2004 mrg

add an entry for spif(4).

this uses a different name for the parallel ports than the openbsd
port otherwise they conflict with the magma parallel ports and you
would be unable to have both a spif and magma installed at the
same time.


# 1.26 18-Jun-2004 christos

Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.25 08-Jun-2004 christos

don't depend on printf.


# 1.24 26-May-2004 christos

add ptm device.


# 1.23 10-Mar-2004 jdolecek

branches: 1.23.2;
the device name is 'verifiedexec', not 'veriexec' (the filename is 'veriexec',
tho)


# 1.22 08-Mar-2004 lukem

Use "mknod -R" for "MAKEDEV -f".
Fixes problem noted by Bernd Ernesti on current-users,
with solution suggested by David Laight.


# 1.21 03-Feb-2004 jdolecek

create the lpt?ctl device when making lpt? or lpa?; this device has
no meaning for 'old' lpt(4) (lpt?ctl is equal to lpt? there), but
has some special meaning for 'new', ppbus-based lpt(4)


# 1.20 25-Jan-2004 bjh21

Remove references to /dev/beep.


# 1.19 14-Jan-2004 jdolecek

add 'wscons' to list of special arguments


# 1.18 14-Jan-2004 jdolecek

remove incorrect veriexec entry - there is correct one here already


# 1.17 13-Jan-2004 blymn

Add veriexec device


# 1.16 22-Dec-2003 lukem

Add warn() to display message to stderr prefixed by the script name,
and use appropriately.


# 1.15 20-Dec-2003 lukem

Rework MAKEDEV:

* Use "mknod -F netbsd -r" to create nodes, instead of
"rm ; mknod; chmod; chown".
This means permissions & ownership of existing nodes will
not be changed.
This is up to 30% faster when populating an empty /dev,
and nearly 2x faster when re-running on an existing /dev.

* New options:
-f force change of permission & ownership of existing
devices
-m mknod override name/path of mknod program
(which defaults to $TOOL_MKNOD, then "mknod").
-s generate mtree(8) specfile instead of creating devices

* Remove /usr/etc from $PATH; not needed anymore.

* Provide functions to create devices & directories:
mkdev name [b|c] major minor [mode{=600} [gid{=0} [uid{=0}]]]
create device node `name' with the appropriate permissions
lndev src target
create a symlink from src to target
makedir dir mode
create directory with appropriate mode

* UIDs and GIDs are hardcoded in at MAKEDEV generation time.
(Unfortunately there's not a simple way of determining a GID
a la "id -n user" for determining a UID).

This was tested by generating MAKEDEV for each MACHINE,MACHINE_ARCH
combination and comparing the results of "MAKEDEV all" from the
previous version to the new one.
(This testing actually highlighted mistakes in the previous configuration!)


Simplify distrib/common/Makefile.makedev to use "MAKEDEV -s"


# 1.14 21-Dec-2003 lukem

fix mms\*


# 1.13 21-Dec-2003 lukem

be consistent in fss*


# 1.12 15-Dec-2003 jdolecek

add /rescue to the PATH to find chown if /usr is not available yet
XXX chown should either be moved or we should not depend on it here

fixes PR kern/23614 by Christian Biere


# 1.11 10-Dec-2003 hannken

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

Approved by: Frank van der Linden <fvdl@netbsd.org>


# 1.10 23-Nov-2003 isaki

Correct typo in comment (s/x86k/x68k/)


# 1.9 21-Nov-2003 tsutsui

Update device description for hp300 MI com(4) changes.


# 1.8 26-Oct-2003 jdolecek

g/c the 'see foo(X)' xrefs; this info is automatically generated
into MAKEDEV(8)


# 1.7 26-Oct-2003 he

As a temporary workaround, use "ln -sf" to be compatible with the
checks in distrib/common/makedev2spec.awk, which insists on "-sf"
usage (which is arbuably a bug, and should be looked at more closely).


# 1.6 24-Oct-2003 jdolecek

adjust the device descriptions for better MAKEDEV(8) manpage output
note PF is not in tree (for the manpage)


# 1.5 24-Oct-2003 jdolecek

make 'sd' optional


# 1.4 24-Oct-2003 jdolecek

fix various mistakes, such as using hardcoded majors or typos/pastos
add some more necessary device entries
introduce makedisk_minimal() and use it to create the CD-ROM & md entries;
this procedure only creates 'a' and RAW_PART device entries
remove pf from 'all' target - it's not part of tree, so shouldn't be
created by default


# 1.3 17-Oct-2003 jdolecek

allow also tty[0-9] for serial ports, they are convenient synonyms
for tty0[0-9]
as pointed out by David Laight

remove spaces between makedisk_p*() functions, so the output script looks
neater once some of them are filtered out


# 1.2 15-Oct-2003 jdolecek

add MI 'all' target - this calls MD 'all_md' and then creates miscellaneous
devices supported on all plaforms

and MI 'init' target, which just calls 'all'; this is used if platform
doesn't define it's own 'init' target


# 1.1 13-Oct-2003 jdolecek

the main parts of new unified MAKEDEV framework - MAKEDEV template
and script for generating the MD MAKEDEV
this is work in progress, some parts are still missing


# 1.23.2.3 11-Nov-2004 jmc

branches: 1.23.2.3.2;
Pullup rev 1.30 (requested by christos in ticket #919)

MAKEDEV regression because of printf -> zeropad change. PR#27235


# 1.23.2.2 29-Aug-2004 tron

Pull up revision 1.26 via patch (requested by christos in ticket #776):
Rework the sequence that ptys get allocated so that we don't end up with
gaps in the sequence of minor numbers as we allocate ptys. Having gaps
has 2 bad side effects:
- ptm does not like it
- we allocate a lot of storage that we'll never use in the pty array
(the current scheme allocated 62 ptys 0-15,256-301, so we needed
302 entries to get 64).
Now we allocate ptys in groups of 16 or 14 instead of 64, and we follow
the minor number order.
We default to 64 pty's by building pty0-3, which is all using the old
traditional pty names. Of course to do this, the shell code is a bit
convoluted.


# 1.23.2.1 29-Aug-2004 tron

Pull up revision 1.25 (requested by christos in ticket #776):
don't depend on printf.


# 1.23.2.3.2.1 01-Aug-2006 ghen

Pull up following revision(s) (requested by martti in ticket #10665):
etc/MAKEDEV.tmpl: revision 1.58
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.40.2.9 14-Oct-2007 riz

Pull up following revisions via patch (requested by bouyer in ticket #1838):
distrib/sets/lists/man/mi: revision 1.997
sbin/bioctl/strtonum.c: revision 1.1
sys/dev/Makefile: revision 1.25
sys/arch/amd64/conf/GENERIC: revision 1.139
sbin/bioctl/strtonum.h: revision 1.1
sys/dev/bio.c: revision 1.1
sbin/bioctl/bioctl.c: revision 1.1
share/man/man4/bio.4: revision 1.1
sbin/bioctl/bioctl.8: revision 1.1
sys/sys/envsys.h: revision 1.11
sbin/bioctl/bioctl.8: revision 1.3
sbin/bioctl/bioctl.8: revision 1.4
sys/arch/i386/conf/XEN2_DOM0: revision 1.25
distrib/sets/lists/base/mi: revision 1.704
sys/conf/majors: revision 1.34
share/man/man4/Makefile: revision 1.426
etc/MAKEDEV.tmpl: revision 1.86
sys/arch/i386/conf/GENERIC: revision 1.825
distrib/sets/lists/comp/mi: revision 1.1022
sys/conf/files: revision 1.839
usr.sbin/envstat/envstat.c: revision 1.24
sbin/Makefile: revision 1.105
sys/dev/ic/mfi.c: revision 1.4
sys/dev/biovar.h: revision 1.1
sys/dev/ic/mfivar.h: revision 1.4
sbin/bioctl/Makefile: revision 1.1
Fix typo.
Add bio(4) and associated bioctl(8) from OpenBSD, a driver control block
device controllers, and more specifically raid controllers.
Add a new sensor type, ENVSYS_DRIVE, to report drive status. From OpenBSD.
Add bio and sysmon support to mfi(4). This allow userland to query
status for drives and logical volumes attached to a mfi(4) controller. While
there fix some debug printfs in mfi so they compile.
Add bio(4) to amd64 and i386 GENERIC.
Add bio(4) and associated bioctl(8) from OpenBSD, a driver control block
device controllers, and more specifically raid controllers.
Add a new sensor type, ENVSYS_DRIVE, to report drive status. From OpenBSD.
Add bio and sysmon support to mfi(4). This allow userland to query
status for drives and logical volumes attached to a mfi(4) controller. While
there fix some debug printfs in mfi so they compile.
Add bio(4) to amd64 and i386 GENERIC.
Fix Dd argument (use full month names).
Use more markup.
Comment out references to safte(4) and softraid(4), which don't exist in
NetBSD.
Remove trailing whitespace.
Use macros instead of characters for HTML output (replace ">", "<"
with \*[Gt], \*[Lt]).
Sort sections.
Create /dev/bio


# 1.40.2.8 11-Nov-2006 bouyer

Pull up following revision(s) (requested by manu in ticket #1528):
etc/MAKEDEV.tmpl: revision 1.66 via patch
sys/conf/majors: revision 1.30 via patch
sys/dev/pci/twareg.h: revision 1.6 via patch
sys/dev/pci/twa.c: revision 1.13 via patch
sys/dev/pci/twaio.h: revision 1.4 via patch
sys/compat/freebsd/freebsd_sysctl.c: revision 1.5 via patch
Tweak the twa(4) driver so that 3ware command line utility works with
it.
This includes:
- fixing various structure definitions so that the ioctl parameter match
- adding a hw.twa*.driver_version sysctl
- do not refuse multiple device openings, as the management tool will do
it.
I'm not sure we are safe. FreeBSD allows multiple openings, and use
the
open flag only when an attempt to detach the device is done.
Fix a bug in FreeBSD sysctl emulation: use copyin for
moving data to the kernel


# 1.40.2.7 30-Jul-2006 tron

Pull up following revision(s) (requested by martti in ticket #1434):
etc/MAKEDEV.tmpl: revision 1.58
Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504).


# 1.40.2.6 29-Jul-2006 tron

Apply patch (requested by bouyer in ticket #1431):
- Add a /dev/amr* control file for amr(4) devices, which allows sending
raw commands to the controller.
- Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and
individual drives).


# 1.40.2.5 04-Apr-2006 tron

Pull up following revision(s) (requested by christos in ticket #1237):
etc/MAKEDEV.tmpl: revision 1.51
Add parentheses.


# 1.40.2.4 02-Jul-2005 tron

Pull up revision 1.45 (requested by elad in ticket #487):
Don't allow unprivileged users to access the veriexec device.


# 1.40.2.3 10-Jun-2005 tron

Pull up revision 1.44 (requested by elad in ticket #389):
Fix naming of the verified exec character device placeholder.


# 1.40.2.2 07-May-2005 tron

Pull up revision 1.43 (requested by lukem in ticket #256):
Add hexprint(); display the given number as hex.
Add a comment to document zeropad()'s purpose.


# 1.40.2.1 03-Apr-2005 tron

Pull up revision 1.41 (requested by peter in ticket #86):
Add pf to the all target. Pointed out by Steve Rumble.


# 1.58.2.1 14-Sep-2006 riz

Pull up following revision(s) (requested by plunky in ticket #161):
sys/dev/bluetooth/btdev.h: revision 1.4
distrib/sets/lists/comp/mi: revision 1.922
usr.sbin/postinstall/postinstall: revision 1.25
sys/netbt/hci_unit.c: revision 1.3
sys/netbt/hci_ioctl.c: revision 1.4
usr.sbin/sdpd/profile.c: revision 1.2
usr.sbin/btdevctl/btdevctl.c: revision 1.2
share/man/man4/Makefile: revision 1.405
distrib/sets/lists/man/mi: revision 1.930
distrib/sets/lists/etc/mi: revision 1.176
usr.sbin/sdpd/profile.c: revision 1.3
usr.sbin/btdevctl/btdevctl.c: revision 1.3
etc/MAKEDEV.tmpl: revision 1.62
distrib/sets/lists/base/mi: revision 1.650
usr.sbin/btdevctl/btdevctl.h: revision 1.2
usr.bin/sdpquery/sdpquery.1: revision 1.4
sys/netbt/rfcomm_session.c: revision 1.2
usr.sbin/btdevctl/btdevctl.8: revision 1.3
usr.bin/sdpquery/search.c: revision 1.2
usr.sbin/sdpd/Makefile: revision 1.2
sys/dev/bluetooth/Makefile: revision 1.3
usr.sbin/btdevctl/cfg.c: file removal
sys/netbt/files.netbt: revision 1.4
usr.sbin/btdevctl/sdp.c: revision 1.1
sys/dev/bluetooth/bthidev.c: revision 1.3
etc/bluetooth/Makefile: revision 1.3
sys/dev/pcmcia/files.pcmcia: revision 1.51
sys/dev/bluetooth/bthidev.c: revision 1.4
sys/dev/bluetooth/bthidev.h: revision 1.3
usr.sbin/btdevctl/dev.c: file removal
sys/dev/bluetooth/files.bluetooth: revision 1.10
sys/arch/i386/conf/GENERIC: revision 1.777
share/man/man4/ubt.4: revision 1.6
share/man/man4/bthub.4: revision 1.3
sys/netbt/hci.h: revision 1.5
sys/arch/i386/conf/GENERIC_LAPTOP: revision 1.202
lib/libsdp/sdp.h: revision 1.2
usr.sbin/btdevctl/print.c: revision 1.1
share/man/man4/bthidev.4: revision 1.5
share/man/man4/btdev.4: file removal
usr.sbin/btdevctl/print.c: revision 1.2
sys/arch/i386/conf/GENERIC_LAPTOP: revision 1.205
usr.sbin/btdevctl/Makefile: revision 1.2
sys/dev/usb/files.usb: revision 1.70
sys/netbt/l2cap_signal.c: revision 1.2
sys/netbt/hci_link.c: revision 1.4
sys/dev/bluetooth/bthub.c: revision 1.3
share/man/man4/btsco.4: revision 1.5
sys/netbt/hci_link.c: revision 1.5
share/man/man4/btdev.4: revision 1.4
sys/dev/bluetooth/btkbd.c: revision 1.3
sys/dev/bluetooth/btdev.c: file removal
sys/netbt/hci_event.c: revision 1.2
sys/dev/bluetooth/btsco.h: revision 1.2
etc/mtree/special: revision 1.101
sys/dev/bluetooth/btsco.c: revision 1.3
sys/conf/majors: revision 1.27
usr.sbin/sdpd/hf.c: revision 1.1
sys/dev/bluetooth/btsco.c: revision 1.4
share/man/man5/rc.conf.5: revision 1.107
sys/dev/bluetooth/btdev.c: revision 1.2
etc/rc.d/btdevctl: revision 1.2
usr.sbin/btdevctl/db.c: revision 1.1
etc/rc.d/btdevctl: revision 1.3
etc/bluetooth/btdevctl.conf: revision 1.1
usr.sbin/btdevctl/hid.c: file removal
sys/arch/i386/conf/GENERIC: revision 1.781
sys/dev/bluetooth/btdev.h: revision 1.3
Make btdev default count explicit
Fix typo in variable name
update to bluetooth device attachment:
remove pseudo-device btdev(4) and inherent limitations
add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.
btdevctl(8) and its cache is updated to handle new semantics
etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf
also include service name in dictionary being sent to kernel.
(this is not used just yet, but it might be in the future and it will
be easier if we dont have to provide code to handle its absence)
clarify the CAVEAT section somewhat
Add service discovery support for the Handsfree profile
Replace static 'FreeBSD' string with operating system name gleaned
from uname(3)
Halt the callout on detach
btsco.c:
- sco_getopt(..., SO_SCO_MTU, ...) expects the address of a uint16_t,
not an int. So change sc_mtu's type to uint16_t.
- Try a little harder to ensure btsco_round_blocksize() does not
return zero. Prevents a subsequent panic in audio_init_ringbuffer().
from scw@
Endian issues:
hci_event.c:
- Convert memo->response.clock_offset to host-endian.
hci_ioctl.c:
- printf format tweak (size_t)
hci_link.c:
- Convert memo->response.clock_offset from host-endian.
- Tweak a DIAGNOSTIC message.
l2cap_signal.c:
- In l2cap_recv_config_req(), rp->scid is little-endian so make sure
we convert from host-endian.
from scw@
hci_link.c:
- In hci_link_free(), do not unlink items from a LIST queue within
a LIST_FOREACH() iterator.
rfcomm_session.c:
- In rfcomm_session_recv_mcc_nsc(), do not unlink items from a LIST
queue within a LIST_FOREACH() iterator.
from scw@
guard against a possible situation where the list of l2cap channels is changed
when the bluetooth code is not expecting it to be. During a disconnect, we can
detach the channel that is being disconnected, but its not really safe to detach
any others.
Print explicit 64-bit types using the format macros from int_fmtio.h.
Unbreaks the build for our LP64 ports, where "long long" typically is
not 64 bits.


# 1.67.2.4 08-Apr-2008 jdc

Pull up revision 1.100 (requested by riz in ticket #1118).

Create drvctl as part of 'all'.


# 1.67.2.3 23-May-2007 pavel

Pull up following revision(s) (requested by martti in ticket #657):
etc/MAKEDEV.tmpl: revision 1.86
etc/etc.amd64/MAKEDEV.conf: revision 1.10
etc/etc.i386/MAKEDEV.conf: patch
Create /dev/bio


# 1.67.2.2 18-Feb-2007 tron

branches: 1.67.2.2.2;
Pull up following revision(s) (requested by hubertf in ticket #429):
etc/etc.bebox/MAKEDEV.conf: revision 1.5
etc/etc.x68k/MAKEDEV.conf: revision 1.8
etc/etc.next68k/MAKEDEV.conf: revision 1.3
etc/etc.ofppc/MAKEDEV.conf: revision 1.5
etc/etc.hpcmips/MAKEDEV.conf: revision 1.4
etc/etc.amd64/MAKEDEV.conf: revision 1.8
etc/etc.algor/MAKEDEV.conf: revision 1.4
etc/etc.sparc64/MAKEDEV.conf: revision 1.12
etc/etc.hp300/MAKEDEV.conf: revision 1.11
etc/etc.sgimips/MAKEDEV.conf: revision 1.8
etc/etc.pc532/MAKEDEV.conf: revision 1.5
etc/etc.mvmeppc/MAKEDEV.conf: revision 1.6
etc/etc.mvme68k/MAKEDEV.conf: revision 1.6
etc/etc.pmppc/MAKEDEV.conf: revision 1.6
etc/etc.cobalt/MAKEDEV.conf: revision 1.4
etc/etc.evbmips/MAKEDEV.conf: revision 1.4
etc/etc.sparc/MAKEDEV.conf: revision 1.11
etc/etc.hpcarm/MAKEDEV.conf: revision 1.7
etc/etc.i386/MAKEDEV.conf: revision 1.12
etc/etc.acorn32/MAKEDEV.conf: revision 1.8
etc/etc.evbppc/MAKEDEV.conf: revision 1.5
etc/etc.amiga/MAKEDEV.conf: revision 1.10
etc/etc.prep/MAKEDEV.conf: revision 1.4
etc/etc.sandpoint/MAKEDEV.conf: revision 1.4
etc/MAKEDEV.tmpl: revision 1.71
etc/etc.alpha/MAKEDEV.conf: revision 1.7
etc/etc.ibmnws/MAKEDEV.conf: revision 1.6
etc/etc.macppc/MAKEDEV.conf: revision 1.7
etc/etc.mmeye/MAKEDEV.conf: revision 1.5
etc/etc.mac68k/MAKEDEV.conf: revision 1.7
etc/etc.vax/MAKEDEV.conf: revision 1.10
etc/etc.arc/MAKEDEV.conf: revision 1.6
etc/etc.hp700/MAKEDEV.conf: revision 1.4
etc/etc.mipsco/MAKEDEV.conf: revision 1.3
etc/etc.atari/MAKEDEV.conf: revision 1.7
Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.
See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html
Fixes PR 26511 properly.
OK'd by wrstuden@


# 1.67.2.1 16-Feb-2007 tron

Pull up following revision(s) (requested by riz in ticket #443):
etc/MAKEDEV.tmpl: revision 1.73
Fix off-by-one error in the creation of dk(4) device nodes.


# 1.67.2.2.2.2 03-Jun-2008 skrll

Sync with netbsd-4.


# 1.67.2.2.2.1 03-Jun-2007 wrstuden

Update to today's netbsd-4.


# 1.87.4.2 04-Aug-2007 ad

Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.


# 1.87.4.1 04-Aug-2007 ad

file MAKEDEV.tmpl was added on branch matt-mips64 on 2007-08-04 11:03:05 +0000


# 1.87.2.3 22-Mar-2008 matt

sync with HEAD


# 1.87.2.2 08-Jan-2008 matt

sync with HEAD


# 1.87.2.1 06-Nov-2007 matt

sync with HEAD


# 1.101.6.4 17-Jan-2009 mjf

Sync with HEAD.


# 1.101.6.3 05-Oct-2008 mjf

Sync with HEAD.


# 1.101.6.2 02-Jun-2008 mjf

Sync with HEAD.


# 1.101.6.1 03-Apr-2008 mjf

Sync with HEAD.


# 1.101.4.1 24-Mar-2008 keiichi

sync with head.


# 1.101.2.2 31-Dec-2007 ad

Remove systrace. Ok core@.


# 1.101.2.1 31-Dec-2007 ad

file MAKEDEV.tmpl was added on branch mjf-devfs on 2007-12-31 15:31:41 +0000


# 1.106.2.2 03-Jun-2008 yamt

sync with head


# 1.106.2.1 18-May-2008 yamt

sync with head.


# 1.107.2.3 23-Sep-2008 wrstuden

Merge in changes between wrstuden-revivesa-base-2 and
wrstuden-revivesa-base-3.


# 1.107.2.2 17-Sep-2008 wrstuden

Sync with wrstuden-revivesa-base-2.


# 1.107.2.1 22-Jun-2008 wrstuden

Sync w/ -current. 34 merge conflicts to follow.


# 1.113.2.9 09-Jun-2013 msaitoh

Pull up following revision(s) (requested by apb in ticket #1848):
etc/MAKEDEV.tmpl: revision 1.161
The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.
This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


# 1.113.2.8 20-May-2011 bouyer

branches: 1.113.2.8.2;
Pull up following revision(s) (requested by dholland in ticket #1613):
etc/MAKEDEV.tmpl: revision 1.133
share/man/man8/MAKEDEV.8: revision 1.38
Make device node for altq JoBS.
Should fix palindromic PR/43034.


# 1.113.2.7 26-Sep-2009 snj

branches: 1.113.2.7.2; 1.113.2.7.4;
Pull up following revision(s) (requested by jmcneill in ticket #946):
distrib/sets/lists/man/mi: revision 1.1155
doc/CHANGES: revision 1.1285
etc/MAKEDEV.tmpl: revision 1.128
share/man/man4/Makefile: revision 1.498 via patch
share/man/man4/hdaudio.4: revision 1.1-1.3
share/man/man8/MAKEDEV.8: revision 1.36
sys/arch/amd64/conf/GENERIC: revision 1.250-1.251
sys/arch/amd64/conf/XEN3_DOM0: revision 1.44-1.45
sys/arch/i386/conf/ALL: revision 1.206-1.207
sys/arch/i386/conf/GENERIC: revision 1.942-1.943
sys/arch/i386/conf/XEN3_DOM0: patch
sys/conf/majors: revision 1.47 via patch
sys/dev/pci/hdaudio/files.hdaudio: revision 1.1-1.2
sys/dev/pci/hdaudio/hdaudio.c: revision 1.1-1.4
sys/dev/pci/hdaudio/hdaudio_afg.c: revisions 1.1-1.14
sys/dev/pci/hdaudio/hdaudio_mixer.h: revisions 1.1-1.3
sys/dev/pci/hdaudio/hdaudio_pci.c: revisions 1.1-1.2
sys/dev/pci/hdaudio/hdaudioio.h: revisions 1.1-1.2
sys/dev/pci/hdaudio/hdaudioreg.h: revisions 1.1-1.3
sys/dev/pci/hdaudio/hdaudiovar.h: revisions 1.1-1.4
sys/dev/pci/files.pci: revisions 1.319 and 1.322 via patch
hdaudio(4) is a standards-compliant driver for High Definition Audio.
It will replace azalia(4) after testing.
To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:
hdaudio* at pci? dev ? function ?
hdafg* at hdaudiobus?
You should also:
cd /dev
sh MAKEDEV audio


# 1.113.2.6 16-Jan-2009 bouyer

branches: 1.113.2.6.4;
Pull up following revision(s) (requested by apb in ticket #276):
etc/MAKEDEV.tmpl: revision 1.119
* When testing whether the fdesc file system is mounted, parse the
output from mount(8) rather than df(1), because mount is more likely
to be available on install media. mount is invoked in a way that
always prints an error message, and the content of the error message
tells us whether fdesc is mounted.
* Don't use negative variable names. Instead of nofdesc=false, use
fdesc_mounted=true.
* Add a comment explaining that MAKEDEV may be executed in an environment
that is missing some common commands.


# 1.113.2.5 29-Nov-2008 bouyer

Pull up following revision(s) (requested by joerg in ticket #137):
etc/MAKEDEV.tmpl: revision 1.118
Change the formula for tmpfs size. The per-inode memory usage is
higher than old estimate on 64bit platforms and the resulting tmpfs
wouldn't be able to hold the required number of devices.


# 1.113.2.4 23-Nov-2008 riz

Pull up following revision(s) (requested by tsutsui in ticket #110):
etc/MAKEDEV.tmpl: revision 1.117
Don't warn about missing MAKEDEV.local. It doesn't exist in some
environments.


# 1.113.2.3 13-Nov-2008 snj

Pull up following revision(s) (requested by jmcneill in ticket #53):
etc/MAKEDEV.tmpl: revision 1.115
My previous change should have read 'makedev video', not audio.


# 1.113.2.2 11-Nov-2008 jmcneill

Revert previous; checked in to the wrong branch.


# 1.113.2.1 11-Nov-2008 jmcneill

Last commit should have added 'makedev video', not 'makedev audio', pointed
out by Izumi Tsutsui.


# 1.113.2.8.2.1 08-Jun-2013 msaitoh

Pull up following revision(s) (requested by apb in ticket #1848):
etc/MAKEDEV.tmpl: revision 1.161
The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.
This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


# 1.113.2.7.4.1 26-Jul-2011 matt

Add flash


# 1.113.2.7.2.1 08-Jun-2013 msaitoh

Pull up following revision(s) (requested by apb in ticket #1848):
etc/MAKEDEV.tmpl: revision 1.161
The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.
This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


# 1.113.2.6.4.2 26-Dec-2011 matt

Merge flash/nand/nor infrastruct from matt-nb5-pq3.


# 1.113.2.6.4.1 20-Apr-2010 matt

sync to netbsd-5


# 1.119.2.1 13-May-2009 jym

Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html


# 1.136.2.2 05-Mar-2011 bouyer

Sync with HEAD


# 1.136.2.1 08-Feb-2011 bouyer

Sync with HEAD


# 1.145.2.5 22-May-2014 yamt

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")


# 1.145.2.4 22-Jan-2013 yamt

sync with head


# 1.145.2.3 30-Oct-2012 yamt

sync with head


# 1.145.2.2 16-Apr-2012 yamt

sync with head


# 1.145.2.1 10-Nov-2011 yamt

sync with head


# 1.151.2.10 29-Jul-2013 msaitoh

Pull up following revision(s) (requested by martin in ticket #919):
etc/MAKEDEV.tmpl: revision 1.166
Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12. This fixes install issues on new setups.


# 1.151.2.9 12-Feb-2013 riz

branches: 1.151.2.9.2;
Pull up following revision(s) (requested by skrll in ticket #813):

etc/MAKEDEV.tmpl 1.160
etc/etc.evbarm/MAKEDEV.conf 1.9
external/broadcom/rpi-firmware/dist/LICENCE.broadcom 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.1
external/broadcom/rpi-firmware/dist/bootcode.bin 1.2
external/broadcom/rpi-firmware/dist/fixup.dat 1.1
external/broadcom/rpi-firmware/dist/fixup.dat 1.2
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.1
external/broadcom/rpi-firmware/dist/fixup_cd.dat 1.2
external/broadcom/rpi-firmware/dist/start.elf 1.1
external/broadcom/rpi-firmware/dist/start.elf 1.2
external/broadcom/rpi-firmware/dist/start_cd.elf 1.1
external/broadcom/rpi-firmware/dist/start_cd.elf 1.2
sys/arch/arm/broadcom/bcm2835_bsc.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_bscreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_dotg.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_emmc.c 1.7 via patch
sys/arch/arm/broadcom/bcm2835_genfb.c 1.4 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_gpio_subr.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_gpioreg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_intr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_mbox.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_mbox.h 1.4 via patch
sys/arch/arm/broadcom/bcm2835_obio.c 1.17 via patch
sys/arch/arm/broadcom/bcm2835_pm.c 1.2 via patch
sys/arch/arm/broadcom/bcm2835_rng.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835_space.c 1.5 via patch
sys/arch/arm/broadcom/bcm2835_spi.c 1.1 via patch
sys/arch/arm/broadcom/bcm2835_spireg.h 1.1 via patch
sys/arch/arm/broadcom/bcm2835_tmr.c 1.3 via patch
sys/arch/arm/broadcom/bcm2835reg.h 1.10 via patch
sys/arch/arm/broadcom/files.bcm2835 1.14 via patch
sys/arch/evbarm/conf/RPI 1.23 via patch
sys/arch/evbarm/conf/files.rpi 1.3 via patch
sys/arch/evbarm/conf/mk.rpi 1.2 via patch
sys/arch/evbarm/conf/std.rpi 1.4 via patch
sys/arch/evbarm/rpi/rpi_machdep.c 1.34 via patch
sys/arch/evbarm/rpi/rpi_start.S 1.7 via patch
sys/arch/evbarm/rpi/rpi_vcmbox.c 1.2 via patch
sys/arch/evbarm/rpi/vcio.h 1.1 via patch
sys/arch/evbarm/rpi/vcprop.h 1.7 via patch
sys/conf/files patch
sys/dev/sdmmc/sdhc.c 1.43
sys/dev/sdmmc/sdhcvar.h 1.13
sys/dev/usb/dwc_otg.c 1.45 via patch
sys/dev/usb/dwc_otgreg.h 1.5 via patch
sys/dev/usb/dwc_otgvar.h 1.11 via patch
sys/dev/usb/files.usb 1.126 via patch
sys/dev/usb/if_smsc.c 1.7 via patch
sys/dev/usb/if_smscreg.h 1.1 via patch
sys/dev/usb/if_smscvar.h 1.1 via patch
sys/dev/usb/usbdevices.config patch
sys/dev/usb/usbdevs 1.633 via patch
sys/dev/usb/usbdevs.h regen
sys/dev/usb/usbdevs_data.h regen
sys/dev/wscons/wsconsio.h 1.105,1.107 via patch
sys/dev/wscons/wsdisplayvar.h 1.50
sys/dev/wscons/wsdisplay_util.c 1.2
sys/dev/videomode/edid.c 1.12 via patch

Greatly improved Raspberry Pi support. USB and onboard
Ethernet should work.
[skrll, ticket #813]


# 1.151.2.8 08-Feb-2013 riz

Pull up following revision(s) (requested by apb in ticket #801):
etc/MAKEDEV.tmpl: revision 1.161
The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.
This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


# 1.151.2.7 23-Oct-2012 riz

Pull up following revision(s) (requested by bouyer in ticket #629):
sys/compat/linux/common/linux_ioctl.c: revision 1.57
sys/dev/ic/mfi.c: revision 1.47
sys/conf/majors: revision 1.62
etc/etc.i386/MAKEDEV.conf: revision 1.24
sys/dev/ic/mfivar.h: revision 1.20
etc/MAKEDEV.tmpl: revision 1.159
sys/dev/ic/mfiio.h: revision 1.1
etc/etc.amd64/MAKEDEV.conf: revision 1.19
sys/dev/ic/mfireg.h: revision 1.8
Add a pass-through ioctl for mfi(4), allowing userland to send raw commands
to the controller. This is compatible with the linux and FreeBSD
implementations.
Add the needed conversion for mfi ioctls in COMPAT_LINUX
Allocate a character major number, and create /dev/mfi0 by default
on amd64 and i386.
This allows (along with a hand-created /emul/linux/proc/devices file)
to run the MegaCLI linux binary provided by LSI.


# 1.151.2.6 13-Sep-2012 riz

branches: 1.151.2.6.2;
Pull up following revision(s) (requested by martin in ticket #543):
etc/MAKEDEV.tmpl: revision 1.158
Make the "init" target create optys as well - those were removed from "all",
but we still need them in emergency setups and some install media.
Should fix PR install/46902.


# 1.151.2.5 13-Aug-2012 riz

branches: 1.151.2.5.2;
Missed part of rev 1.154 from ticket #490.


# 1.151.2.4 13-Aug-2012 riz

Pull up following revision(s) (requested by christos in ticket #490):
etc/MAKEDEV.tmpl: revision 1.157
Don't create BSD style pty nodes by default anymore since ptyfs is mounted
by default. Mention that this is a security issue, since it allows pty access
through the old style node. While here, pull up revision 1.54 (wedges) to reduces diffs to -current


# 1.151.2.3 27-Jun-2012 riz

Pull up following revision(s) (requested by tsutsui in ticket #358):
etc/MAKEDEV.tmpl: revision 1.156
Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.
Should fix PR toolchain/46537, ok apb@


# 1.151.2.2 30-May-2012 sborrill

Pull up the following revisions(s) (requested by riz in ticket #291):
etc/MAKEDEV.tmpl: revision 1.155
sbin/iscsictl/iscsictl.8: revision 1.2-1.4
sbin/iscsid/iscsid_driverif.c: revision 1.4-1.5
sbin/iscsid/iscsid_lists.c: revision 1.4-1.7
sbin/iscsid/iscsid_targets.c: revision 1.4
sbin/iscsid/iscsid_globals.h: revision 1.5-1.7
sbin/iscsid/iscsid_main.c: revision 1.4-1.7
sbin/iscsid/Makefile: revision 1.2-1.4
sbin/iscsid/iscsid.8: revision 1.3-1.8
sbin/iscsid/iscsid.h: revision 1.3
sys/dev/iscsi/iscsi_main.c: revision 1.2-1.3

Fix bugs in iscsid target list handling, and improve documentation
somewhat for the in-kernel iSCSI initiator.


# 1.151.2.1 25-Feb-2012 sborrill

Pull up the following revisions(s) (requested by tron in ticket #50):
etc/MAKEDEV.tmpl: revision 1.152

Four instances of atabus(4) are not enough for modern systems as the
system will report one instance for each SATA port. Create eight
device nodes by default.


# 1.151.2.9.2.1 29-Jul-2013 msaitoh

Pull up following revision(s) (requested by martin in ticket #919):
etc/MAKEDEV.tmpl: revision 1.166
Add a makedisk_p12high, used by VAX now after unbumping MAXPARTITIONS from
16 down to 12. This fixes install issues on new setups.


# 1.151.2.6.2.1 08-Feb-2013 riz

Pull up following revision(s) (requested by apb in ticket #801):
etc/MAKEDEV.tmpl: revision 1.161
The console major number is not always 0; when creating a temporary
console while populating a memory disk, use %CONSOLE_CMAJOR% instead
of 0, and let MAKEDEV.awk substitute the appropriate machine-dependent
major number.
This fixes a bug that I introduced in revision 1.82 dated 2007-03-11.


# 1.151.2.5.2.1 31-Oct-2012 matt

sync with netbsd-6-0-RELEASE.


# 1.158.2.4 19-Aug-2014 tls

Rebase to HEAD as of a few days ago.


# 1.158.2.3 23-Jun-2013 tls

resync from head


# 1.158.2.2 24-Feb-2013 tls

resync with head


# 1.158.2.1 19-Nov-2012 tls

Resync to 2012-11-19 00:00:00 UTC