tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Finding the slot in the ioconf table a module attaches to?



Usually your user program would attempt to open xyz0 which would find
the major/minor in th devsw tables.  You're relying on a hard coded
major.  That's the difference.

If you take the first approach and your module uses the
config_init_component() method to install the driver, it will do what
you want.

On the other hand, hard-coding the major requires rebuilding the kernel
to get the major-->name mapping.

Is there a reaason your user program needs to open-by-major?


On Wed, 1 Feb 2023, Brian Buhrow wrote:

	hello Brad.  I thought the idea behind modules was that you didn't need to rebuild a
kernel to add devices to the ioconf table?  And, in fact, under the old module framework, that
is, NetBSD-5 and earlier, you could add devices and major numbers to the table without having
to rebuild the kernel.  If, in fact, I need to rebuild the kernel to add device drivers to the
kernel, then I submit our module framework is fatally broken.  So, I'll hope that isn't the
case and proceed.  If I figure out how to do it, I'll post here so others won't have to climb
that learning curve using the same path.
-thanks
-Brian


!DSPAM:63da9667288221001310414!



+--------------------+--------------------------+----------------------+
| Paul Goyette       | PGP Key fingerprint:     | E-mail addresses:    |
| (Retired)          | FA29 0E3B 35AF E8AE 6651 | paul%whooppee.com@localhost    |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoyette%netbsd.org@localhost  |
| & Network Engineer |                          | pgoyette99%gmail.com@localhost |
+--------------------+--------------------------+----------------------+


Home | Main Index | Thread Index | Old Index