16 578
правок
(Новая страница: «Device Tree are files describing the hardware configuration. They are used in Linux and therefore in the Wiren Board controllers firmware. Modification of Device…») |
|||
(не показано 25 промежуточных версий 2 участников) | |||
Строка 1: | Строка 1: | ||
<languages/> | <languages/> | ||
Device Tree | Device Tree - hardware configuration description files. They are used by Linux and hence the Wiren Board. | ||
Modification of Device Tree files may be required when reassigning ports, connecting some UEXT devices, when connecting 1-wire sensors, etc. | |||
Read more about Device Tree: https://en.wikipedia.org/wiki/Device_tree , http://elinux.org/Device_Tree | |||
Device Tree | Device Tree for Wiren Board is located in the [https://github.com/contactless/linux/blob/v3.12-rc3-imxv5-x0.3/arch/arm/boot/dts/imx23-wirenboard28.dts imx23-wirenboard28.dts] | ||
file. It also uses the processor description file [https://github.com/contactless/linux/blob/v3.12-rc3-imxv5-x0.3/arch/arm/boot/dts/imx23.dtsi imx23.dtsi] | |||
Device Tree files are written in .dts text format, which is compiled into dtb binary format | |||
== Loading == | |||
n the standard image of the Wiren Board, the [[Special:MyLanguage/U-Boot|U-Boot]] loader reads the dtb file of the Device Tree description and passes it to the kernel. The dtb file name is specified in the[https://github.com/contactless/wirenboard/blob/master/rootfs/configs/boot/uEnv.txt /boot/uEnv.txt] : | |||
<pre> | <pre> | ||
Строка 19: | Строка 19: | ||
</pre> | </pre> | ||
The dtb file is located in /boot/dtbs/imx23-wirenboard28.dtb (for Wiren Board rev. 2.8), at /boot/dtbs/imx23-wirenboard32.dtb (for Wiren Board Smart Home rev. 3.5) | |||
== Reassembly == | |||
To make changes to Device Tree, you need to download Device Tree in text format, compile the imx23-wirenboard28 file.dts and record the result (imx23-wirenboard28.dtb) to /boot/dtbs/ | |||
Another way is to build the kernel:[[Special:MyLanguage/Сборка ядра|Сборка ядра]] | |||
===Download=== | |||
Here[https://github.com/contactless/linux/tree/v3.13-imxv5-x0.1/arch/arm/boot/dts] you must download imx23-wirenboardXX.dts file, corresponding the device version, and dependencies. The dependencies on this file are imx23.dtsi, skeleton.dtsi. | |||
Main DTS file: | |||
imx23- | imx23-wirenboard32.dts for Wiren Board Smart Home rev. 3.5 | ||
imx23-wirenboard28.dts for Wiren Board rev. 2.8 | |||
: | : | ||
Строка 46: | Строка 43: | ||
$ cd dts | $ cd dts | ||
$ #export WB_BRANCH=v3.12-rc3-imxv5-x0.3 # | $ #export WB_BRANCH=v3.12-rc3-imxv5-x0.3 # for kernel 3.12 | ||
$ export WB_BRANCH=v3.13-imxv5-x0.1 | $ export WB_BRANCH=v3.13-imxv5-x0.1 | ||
$ wget https://raw.github.com/contactless/linux/$WB_BRANCH/arch/arm/boot/dts/mxs-pinfunc.h | $ wget https://raw.github.com/contactless/linux/$WB_BRANCH/arch/arm/boot/dts/mxs-pinfunc.h | ||
Строка 54: | Строка 50: | ||
$ wget https://raw.github.com/contactless/linux/$WB_BRANCH/arch/arm/boot/dts/imx23-wirenboard28.dts | $ wget https://raw.github.com/contactless/linux/$WB_BRANCH/arch/arm/boot/dts/imx23-wirenboard28.dts | ||
2013-11-17 04:24:28 (37.9 MB/s) - «imx23-wirenboard28.dts» | 2013-11-17 04:24:28 (37.9 MB/s) - «imx23-wirenboard28.dts» is saved [5255/5255] | ||
$ wget https://raw.github.com/contactless/linux/$WB_BRANCH/arch/arm/boot/dts/imx23.dtsi | $ wget https://raw.github.com/contactless/linux/$WB_BRANCH/arch/arm/boot/dts/imx23.dtsi | ||
2013-11-17 04:24:33 (272 KB/s) - «imx23.dtsi» | 2013-11-17 04:24:33 (272 KB/s) - «imx23.dtsi» is saved [13052/13052] | ||
$ wget https://raw.github.com/contactless/linux/$WB_BRANCH/arch/arm/boot/dts/skeleton.dtsi | $ wget https://raw.github.com/contactless/linux/$WB_BRANCH/arch/arm/boot/dts/skeleton.dtsi | ||
Строка 67: | Строка 63: | ||
imx23.dtsi imx23-wirenboard28.dts skeleton.dtsi | imx23.dtsi imx23-wirenboard28.dts skeleton.dtsi | ||
imx23-pinfunc.h mxs-pinfunc.h | imx23-pinfunc.h mxs-pinfunc.h | ||
</pre> | </pre> | ||
===Compiler=== | |||
The Device Tree compiler in Ubuntu and Debian is in the device-tree-compiler package. Install it: | |||
<pre> | <pre> | ||
Строка 81: | Строка 74: | ||
</pre> | </pre> | ||
gcc is also required | |||
<pre> | <pre> | ||
Строка 88: | Строка 80: | ||
</pre> | </pre> | ||
===Compilation=== | |||
=== | |||
<pre> | <pre> | ||
Строка 98: | Строка 89: | ||
</pre> | </pre> | ||
===Installation=== | |||
The compiled file must be written to /boot/dtsb. <b>Be sure to make a backup of the existing / boot/dtsb file!</b> | |||
<b> |