與時並進者遭遇『困難』,面對『未知』是再自然不過的事。如之何『求解』正砥礪著學者的『百折不撓』之精神。『九天九地』的探尋,難到不會有『一陽來復』之時?深體自由軟體者之心??
假使仔細閱讀《 Device Tree on ARCH_BCM2708 》,留心一下『那個人』── notro ── 與『那個時間』── on Jul 30, 2014 ──,也許我們不只對樹莓派『裝置樹』有更多的了解,更能明白許多的貢獻其來有自,正所謂『德不孤,必有鄰』乎!!
此處將僅簡單說說幾個工具程式,以及簡介它們的用法。
常用縮寫︰
【 DT 】︰ Device Tree
【 FDT 】︰ Flattended Device Tree: a DT representation used in the dtb blob.
【 .dtb 】︰ Device Tree Binary
【 .dts 】︰ Device Tree Source
【 .dtsi 】︰ Device Tree Source Include
【 dtc 】︰ Device Tree Compiler
# dtc 的用法說明 pi@raspberrypi ~ fdtdump -h Usage: fdtdump [options] Options: -[dshV] -d, --debug Dump debug information while decoding the file -s, --scan Scan for an embedded fdt in file -h, --help Print this help and exit -V, --version Print version and exit # 範例︰顯示 dtb 內容 fdtdump /boot/overlays/lirc-rpi-overlay.dtb # fdtget 的用法說明 pi@raspberrypi ~ fdtput -h Usage: write a property value to a device tree fdtput [...] fdtput -c [...] The command line arguments are joined together into a single value. s=string, i=int, u=unsigned, x=hex Optional modifier prefix: hh or b=byte, h=2 byte, l=4 byte (default) Options: -[cpt:vhV] -c, --create Create nodes if they don't already exist -p, --auto-path Automatically create nodes as needed for the node path -t, --type Type of data -v, --verbose Display each value decoded from command line -h, --help Print this help and exit -V, --version Print version and exit # 範例︰ cp /boot/bcm2709-rpi-2-b.dtb . fdtput --type s bcm2709-rpi-2-b.dtb /soc/spi@7e204000 status "okay" fdtget bcm2709-rpi-2-b.dtb /soc/spi@7e204000 status