Port-arm archive

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

Re: UART question



On Tue, Jul 08, 2025 at 11:28:35AM +0000, Vincent DEFERT wrote:
> Just tried it and no luck, it recreates the same zoo as before.
> 

I haven't look at the code but I imagine that the nodes are created
early, from what is declared in the kernel, before attempting to
attach some device to it => in this case, reducing the kernel to what
exists will reduce the nodes.

What I will be happy to learn too, is the articulation between the
config and the DTB: there may be nodes created because some device is
declared in the config, while being, also, described in the DTB; but
some devices only declared in the DTB will escape the detection.

Has the DTB to be mirrored in some way in the config? This is the
question for which I didn't search an answer in the sources...


> Anyway, I would really like to learn the rules of the device game.
> And if possible, the reasons behind them.
> 
> On 08/07/2025 11:25, tlaronde%kergis.com@localhost wrote:
> > On Tue, Jul 08, 2025 at 07:46:25AM +0000, Vincent DEFERT wrote:
> > > Ok, so NetBSD:
> > > 
> > > - creates tons of nodes for devices that are NOT physically present in the
> > > machine (i.e. most of /dev)
> > > - does NOT create nodes for devices that are physically present (e.g. UART)
> > > - though sometimes, it does, for some reason (e.g. I2C)
> > > 
> > > I'm lost. I can't find any rationale behind those behaviours. :(
> > > Could someone explain, please?
> > Normally, if you copy /dev/MAKEDEV in /etc, remove all the leaves in
> > /dev (but keeping /dev that will be used as a mount point), when
> > booting, /dev is dynamically populated with the nodes corresponding to
> > the devices found (according to your compiled kernel i.e. to the
> > devices declared in the kernel config).

-- 
        Thierry Laronde <tlaronde +AT+ kergis +dot+ com>
                     http://www.kergis.com/
                    http://kertex.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C


Home | Main Index | Thread Index | Old Index