[prev in list] [next in list] [prev in thread] [next in thread] 

List:       netbsd-users
Subject:    Re: Machinfo struct?
From:       Don NetBSD <netbsd-embedded () gmx ! com>
Date:       2018-12-21 11:06:21
Message-ID: bb52d4a9-714e-5011-cdf7-70f8a9584547 () gmx ! com
[Download RAW message or body]

On 12/19/2018 10:58 AM, Rocky Hotas wrote:

>> Is there a struct/XML somewhere that describes the hardware
>> in the machine much like parsing dmesg might?  I.e., to
>> ensure the "current" state hasn't changed from a "desired"
>> state?  (boards removed/added, memory complement altered,
>> etc.)
> 
> You almost surely already know it, but anyway, from a root
> shell:
> 
> drvctl -lt mainbus0
> 
> will produce a tree based on the configuration shown in dmesg.
> It is a very elementary information, plain/text and not XML.
> However, maybe you could do some scripting to compare this
> tree with a previously stored one, and then detect the
> possible changes between them.

Yes, but I'm looking to do this before init(8) is even invoked...
sometime just after the kernel has finished probing everything
but before it passes control to init(8) -- so the boot will be
unconditionally (and unavoidably) *aborted* if the hardware isn't
"as it should be".
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic