Search code examples
linuxlinux-kernelarmembedded-linuxdevice-tree

Tool to visualize the device tree file (dtb) used by the Linux kernel?


I am looking for a tool which can graphically represent the hardware device tree used in linux kernel. I am trying to understand linux kernel for particular arm chipset. It would be a really useful tool to have.


Solution

  • You can try the Component inspector tool.

    enter image description here

    It is part of QorIQ Configuration Suite which is a plugin for Eclipse.

    Download here. (Requires registration. Free to download.)


    Personally as i am on the cmd-line most of the time, and quite addicted to vi, i find its built-in code folding capabilities are somewhat sufficient as long as the dts is properly indented.

    Setup hot-keys commands to fold/expand blocks of code in vi
    by adding the following lines to .vimrc :

    nnoremap <silent> <F5> zfa}<CR>
    nnoremap <silent> <F6> zo<CR>
    

    With the above setup, to fold a block/node, simply move the cursor onto any of its lines(except the title) and hit F5. To expand a folded block/node, move to the line with the folded title and hit F6.

    Here is what a partially folded dts looks like in vi. enter image description here