From: Steven McDonald Date: Sat, 8 Nov 2014 10:17:18 +0000 (+1100) Subject: Add some info on devtree X-Git-Url: http://git.steven-mcdonald.id.au/?a=commitdiff_plain;h=0622441e7f3b9a44ac2b15d5f3319335ce99c339;p=www.git Add some info on devtree --- diff --git a/projects/index.shtml b/projects/index.shtml index 2c0a942..f8b6751 100644 --- a/projects/index.shtml +++ b/projects/index.shtml @@ -13,6 +13,10 @@

Projects

+

+Printing device trees on OpenBSD (like lshw on Linux) +

+

I have Gitweb set up to track various projects I'm working on in git. You can also access my git diff --git a/projects/openbsd_devtree.shtml b/projects/openbsd_devtree.shtml new file mode 100644 index 0000000..1f6aa8b --- /dev/null +++ b/projects/openbsd_devtree.shtml @@ -0,0 +1,90 @@ + + + + + + + + + + + +

+ +

Printing device trees on OpenBSD

+ +

+I've written a small Perl utility that takes dmesg output on +standard input and produces a human-friendly tree of devices on +standard output. Since it accepts any dmesg output, you can +use it to produce a tree of hardware on someone else's system as well +as examine your own. +

+ +

As an example, this is what it looks like on my Lemote Yeeloong:

+ + +$ dmesg | devtree +root + |-mainbus0 (Lemote Yeeloong) + | |-apm0 + | |-bonito0 (memory and PCI-X controller, rev 1) + | | |-pci0 (bus 0) + | | |-auglx0 (AMD CS5536 Audio) + | | | |-audio0 + | | |-ehci0 (NEC USB) + | | | |-usb0 (USB revision 2.0) + | | | |-uhub0 (NEC EHCI root hub) + | | |-ehci1 (AMD CS5536 USB) + | | | |-usb1 (USB revision 2.0) + | | | |-uhub1 (AMD EHCI root hub) + | | | |-umass0 (Generic USB2.0-CRW) + | | | | |-scsibus0 (2 targets, initiator 0) + | | | | |-sd0 (Generic-, Multi-Card, 1.00) + | | | |-urtw0 (Realtek RTL8187B) + | | |-glxpcib0 (AMD CS5536 ISA) + | | | |-glxclk0 (clock, prof) + | | | |-gpio1 (32 pins) + | | | |-iic (not configured) + | | | |-isa0 + | | | |-mcclock0 (port 0x70/2: mc146818 or compatible) + | | | |-pckbc0 (port 0x60/5) + | | | | |-pckbd0 (kbd slot) + | | | | | |-wskbd0 (console keyboard, using wsdisplay0) + | | | | |-pms0 (aux slot) + | | | | |-wsmouse0 (mux 0) + | | | |-ykbec0 (port 0x381/3) + | | |-ohci0 (NEC USB) + | | | |-usb2 (USB revision 1.0) + | | | |-uhub2 (NEC OHCI root hub) + | | |-ohci1 (AMD CS5536 USB) + | | | |-usb3 (USB revision 1.0) + | | | |-uhub3 (AMD OHCI root hub) + | | |-pciide0 (AMD CS5536 IDE) + | | | |-wd0 (Corsair Force 3 SSD) + | | |-rl0 (Realtek 8139) + | | | |-rlphy0 (phy 0: RTL internal PHY) + | | |-smfb0 (Silicon Motion LynxEM+) + | | |-wsdisplay0 (std, vt100 emulation) + | |-cpu0 (STC Loongson2F CPU 796 MHz, STC Loongson2F FPU) + |-softraid0 + | |-scsibus2 (256 targets) + |-vscsi0 + |-scsibus1 (256 targets) + + +

Source and a man page are available under the +WTFPL +from +git://git.sjm.so/openbsd-goodies.git +(or view it on GitWeb) +. +

+ +
+ + + + + +