:: Re: [DNG] What is an init system?
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: karl
Fecha:  
A: dng
Asunto: Re: [DNG] What is an init system?
Didier Kryn:
> Le 28/05/2024 à 20:51, karl@??? a écrit :

...
> > But how do I figure out what module to use (yes, I know it is
> > usb-storage) ?


So, no one knows ?

>     A static /dev is like in the old days before the advent of
> hotpluggers and before the kernel DEVTMPFS option. This option was
> created to create/delete device files /in place ot the hotplugger,/
> because kernel people found udev buggy. But a hotplugger is still needed
> for proper assignment of owner/group/permission.

...

DEVTMPFS is only needed for dynamic minors, otherwise the admin can
just set the permissions on disk and be done with it. And with theese
newish 32bit (I guess) majors:minors, is dynamic numbers really needed?

From what I know the kernel uses dynamic minors for HDMI and MD with
newer superblocks. If you don't have such devices, you could as well
dispence with DEVTMPFS.


>     There is a chain of drivers for practically everything, not only
> for USB, but also for disks and network.


Isn't modprobe there to solve the dependancies between modules
(drivers)?

>     I would personnally recommend to rely on the kernel to
> create/delete device files, since this is the most difficult.


If you are missing something, just scan /sys, what's the problem ?
Either use mdev -s or something like:

find /sys/ -type f -name dev |
while read a
do
echo
echo "$a "
b=`dirname $a`
cat $b/uevent
done

/sys/devices/pnp0/00:04/tty/ttyS0/dev
MAJOR=4
MINOR=64
DEVNAME=ttyS0

/sys/devices/pnp0/00:02/rtc/rtc0/dev
MAJOR=252
MINOR=0
DEVNAME=rtc0
...

> Then, if
> you don't want to use any existing hotplugger, write, in some sense,
> your own, not as general as the existing ones, but just fitting your
> needs. mdev seems to me the simplest way: it is just made for customization.


I don't really want to use a hotplugger, I just want to know, this new
device, what /dev file has it, what module does it need, so I can
either ignore the device or load the module etc. at a time which suits
me.

Regards,
/Karl Hammar