[rescue] Determining framebuffer driver major/minor device numbers?
Andrew M Hoerter
amh at pobox.com
Sun Feb 7 09:06:20 CST 2016
On 2/7/16 1:39, Josh Dersch wrote:
> I have rebuilt the kernel to include the cgRDI driver and the sbus board
> is recognized at boot (as cgRDI0). So far so good.
> Unfortunately, I have no idea what the device major/minor numbers are
> for this driver so I haven't yet been able to create the appropriate
> /dev/fb entry so that xnews is happy. Since I have no source or
> documentation for the driver, I'm at an impasse, unless there's a clever
> way to deduce this information.
I guess it goes without saying that /dev/MAKEDEV doesn't know about that
thing, but it might be worth checking first.
Assuming that doesn't work, it should be possible to figure out at least
the major number by looking at kernel tables. SunOS 4.x is old enough
that it still uses the traditional cdevsw method, and I believe that
table should be visible in a source file called 'conf.c' (or is it
'ioconf.c'?) in the kernel tree somewhere. The array index of that
driver in cdevsw ought to be the major number.
It's possible that file could be autogenerated by config, if you haven't
already read through the manpage it does mention major/minor device
numbers so that information could be a good lead too:
(despite the domain that's not a FreeBSD manpage, heh)
The minor number is interpreted by the driver itself, so if you don't
have source or it's not listed in some file that came with the driver,
that will be a tougher problem. 0 is always a good guess to start with.
I haven't touched SunOS 4 in a very long time so the above is somewhat
speculative, but hopefully it will lead you in the right general direction.
More information about the rescue