Commit Graph

41 Commits

Author SHA1 Message Date
imp
d4c9767f0a Remove 'All Rights Reserved' from the collection copyright and templates.
The original Berkeley Software Distributions were made in the 1980's
and 1990's. At that time, the Buenos Ares Convention of 1910 was in
force in most of the countries in the Americas. It required an
affirmative statement of rights reservation, typically using 'All
Rights Reserved.' The Regents included this phrase in their copyright
notices to invoke this treaty to ensure maximal copyright protection.

In the 1990's, Latin America coutries ratifeid the Berne Convention on
copyrights which prohibited them from requiring an affirmative
statement to reserve the rights. When Nicaragua ratified in 2000, the
Buenos Ares Convention of 1910 was effectively repealed. This made all
the 'All Rights Reserved' phrases obsolete and legal deadweight most
of the time, and certainly in the cases removed here.

Since it's no longer required, and is in fact meaningless, core has
decided to dropped it from the project's collection copyright and
sample templates. It encourages other rights holders to do the same
after consultation with their legal department.

More see https://en.wikipedia.org/wiki/Buenos_Aires_Convention for
more information.

Approved by: core@ (emaste@, jhb@)
Differential Review:  https://reviews.freebsd.org/D15264
2018-05-09 02:02:49 +00:00
imp
55c2f9636a Remove EISA reference here 2017-02-16 23:38:30 +00:00
marius
b5276a5d44 Update to use DEVMETHOD_END. 2011-11-22 21:49:29 +00:00
uqs
061dbf8161 Fix more typos to be a good example.
Found by:	codespell
2011-05-22 14:23:48 +00:00
ed
b13cd39d11 Also use dev2unit() in the pseudo-driver example script.
Because I'm planning on MFC'ing my last change to this file, make sure
we use dev2unit() here as well.
2008-09-27 16:52:57 +00:00
ed
6c1702dda9 Make the make_pseudo_driver.sh shellscript work again.
It seems this script was broken because of the SYSINIT changes and a
rather awkward variable initialisation. For some reason the
make_device_driver.sh script is also broken, related to BUS_SETUP_INTR.
I have no experience with FreeBSD's interrupt handling, so I hope
someone else is willing to take a look at that shell script.

PR:		misc/126435
MFC after:	1 month
2008-09-22 16:10:12 +00:00
rik
96cc09dde6 Fix path for source file in files.FOO. 2006-08-23 23:51:29 +00:00
rik
af3c9f2dc2 - Added ability to provide (optional) path to the kernel sources
- Added check of dirs used by example generator
- Fixed path for ${s}/conf/files.FOO and include it via files
  directive from config file
- Changed kernel configuration example with the driver: it is
  not produced by copying Generic but by including it
- KDB is added to config (for DDB)
- Added module building instead and fixed kernel building

Reviewed by:	julian@
2006-08-09 21:23:42 +00:00
rik
7d2b35a635 Added copyright templete
Fixed compilation

Reviewed by:	julian@
2006-08-09 20:57:24 +00:00
rik
e4e9eb23de - Added 'files "files.FOO"' to config for inclusion of user specific files.
- Added KDB option to config file (for DDB).
- Added ability to compile custom kernel.

Discussed with:	julian@
2006-08-09 10:53:26 +00:00
rik
83dd0fc853 - Added ability to provide (optional) path to the kernel sources
- Fixed path for ${s}/conf/files.FOO and a note that it should be merged into
corresponding file to be able to compile the kernel
- Changed kernel configuration example with the driver: it is not produced by
copying Generic but by including it
- Changed from automatic module building to asking an user if it whants to

Reviewed by:    julian@
2006-08-06 11:06:35 +00:00
rik
8f0d634936 Fix compilation.
Reviewed by:	julian@
2006-08-06 11:04:22 +00:00
stefanf
f7bcb7fdc8 Device counts are gone. 2005-03-09 12:29:07 +00:00
stefanf
b8a6e62fcc __FUNCTION__ -> __func__ 2005-03-09 11:28:46 +00:00
dds
b954c1afc8 Style fixes: shell script indentation, if/then style, plus a lot
of comments in C code (capitalized, end with full stop).

Submitted by:	schweikh
2003-10-03 19:31:55 +00:00
dds
fdcf60fd8d Create a driver that will compile without warnings on -CURRENT
More changes are probably needed to create a correct driver.

Reviewed by:	markm
Approved by:	schweikh (mentor)
2003-10-03 19:15:07 +00:00
markm
45c154579a Modernise and tidy up. 2002-08-02 10:37:22 +00:00
arr
32b75878ad - Modify to make the generated device driver code work with current.
- Use M_ZERO instead of another call to bzero().

Inspired by: misc/31905
2001-11-13 17:58:14 +00:00
schweikh
c91401db41 pseudo-device -> device in kernel config lines. Removed whitespace at EOL.
Reviewed by:	joerg, dd
2001-05-01 09:15:30 +00:00
brian
ca2a697abb Suggest that kernels are built with ``cd /usr/src; make buildkernel''
Add a comment saying that our softc is automatically allocated by the
parent bus.
Fix lots of spellings
2001-04-14 18:51:39 +00:00
billf
7093344718 fix spelling errors, clarify comment, add $FreeBSD$ 2001-03-10 05:28:46 +00:00
imp
11d91a4b9e o Add cardbus support (use pci attachment for now)
<bde>
o Add comments in some places to clarify some points.
o Don't typedef sc_p.  This isn't usually done in the drivers and may
  cause problems in teh future if C goes the C++ route of requiring
  one and only one definition for each and every type.  Instead use
  the current convetion of expanding struct ${1}_softc * inline needed.
o change some comments to be more style(9)-like.
o Define and use DEV2SOFTC to encapsulate storing/getting softc from a
  dev_t.  This also takes care of the missing cast from the examples.
o Define and use DEVICE2SOFTC, similar to DEV2SOFTC for getting the
  softc from a device_t.
</bde>

We still should have this generate foo_{isa,pci,pccard,cardbus,eisa}.c
and foovar.h from templates of some sort, but I was too lazy to do
that in this commit.  I did document it in the comments, however.

Note: bde-like corrections made with the help of my my portable
plastic bde icon.  Results with the real bde may vary with use.
2000-12-18 21:08:53 +00:00
julian
1d057a35b4 Slight cleanups after comments from John Hay (Thanks!)
Also add more comments.
2000-11-15 12:05:21 +00:00
julian
3f9f11197b Share one devclass between ISA and PCI sections
This will ensure unit numbers will co-ordinate between them
2000-11-12 10:46:38 +00:00
julian
b1e3e6e70f Add basic PCI capability
Not sure how unit numbers are carried across between
PCI and ISA though.. maybe there should be only one devclass between the two?
2000-11-11 09:49:49 +00:00
julian
86f1c406e3 Add more sample code having read the daemnnews article (August 2000) 2000-11-09 18:55:44 +00:00
julian
3da55b7c31 Having figured out a bit more of the new-bus puzzle
I have added support for finding non-PNP devices to this
sample loadable ISA driver.
PCI support will come later.

If someone with a clue about newbus were to look it over it would be
really cool.
2000-11-08 21:54:28 +00:00
julian
2a7bdddac5 Add copyright to skeleton. 2000-10-26 21:53:37 +00:00
julian
1a83630cbd some more cleanups
still need to handle non-PNP devices properly.
2000-10-26 21:37:38 +00:00
julian
0cc723c476 Slowly add more functionality as I learn more about newbus etc. 2000-10-25 15:08:11 +00:00
julian
91414848a3 First effort at bringing these up-to-date.
This creates a skeleton ISA device driver.
I don't pretend that it's fully correct or even opitimal
but it at least creates (and compiles) a 'clean' ISA driver.

Hopefully PCI/PCCARD/etc. support will be added when I understand it.
Unlike the old version this just creates a module. The old one tried to
create a new kernel with the driver to be tested.
2000-10-24 16:45:58 +00:00
peter
76f0c923fe $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
msmith
11f83f2953 more $d -> %d fixes 1999-03-19 00:35:07 +00:00
msmith
1f060a3664 Fix some $d -> %d mistakes.
Submitted by:	crb@crbowman.erols.com
1999-03-19 00:33:31 +00:00
bde
d1627c26a8 FIxed a bogus comment. 1998-10-22 16:12:16 +00:00
bde
b05ba08653 Removed all `vector xxxintr' specifications. Interrupt handlers are now
configured in drivers.

Attempted to update the generated interrupt handler attachment to the
current "temporary" method.  Not tested.  To test it, someone would first
have to fix the bitrot in the ioctl command arg type.
1998-10-22 16:10:29 +00:00
cracauer
cb201a4a42 Fix typo 1998-01-15 13:42:28 +00:00
julian
f8e5dea182 Add code to the example 'driver-o-matic' to support being an LKM
This may not quite work yet but should head the user in the right
direction.
1998-01-12 07:47:03 +00:00
julian
475bb0a6c5 The example drivers should use 'poll' now that it has replaced select. 1997-12-30 03:23:13 +00:00
julian
e6b42ddfe1 Description of what the files in this directory do..
(create sample device drivers on request)
1997-02-02 07:35:59 +00:00
julian
bd62efe166 These two shell scripts will
create a skeleton device driver.
one for a real device and the other for a pseudo device.
they each take one argument which is the name (prefix) for the driver.

they add the new file to the /sys tree and add appropriate config files
etc for a build.

hopefully others will build on this so that we get
1/ these drivers improved and the shell scripts
improved in how/where that hook the new code in.
2/ similar tools for providing skeletons for other
modules (I'm tempted to do a VFS filesystem skeleton :)

please take a look and fix anything that maybe should be added.
they compile and link fine,
but I think I wouldn't trust them, as faar as RUNNING yet :)
(well they really wouldn't do very much being skeletons..

we need to add PCI  and EISA skeletons as well
followed by a SCSI driver skeleton.
1997-02-02 07:19:30 +00:00