Device Tree/en: различия между версиями
(Новая страница: «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 versi…») |
|||
(не показано 13 промежуточных версий 2 участников) | |||
Строка 1: | Строка 1: | ||
<languages/> | <languages/> | ||
Device Tree | Device Tree are files describing the hardware configuration. They are used in Linux and therefore in the Wiren Board controllers firmware. Modification of Device Tree-files may be required when re-assigning ports, connecting some UEXT-devices, when connecting 1-Wire sensors, etc. | ||
Modification of Device Tree files may be required when | |||
Read more about Device Tree: https://en.wikipedia.org/wiki/Device_tree , http://elinux.org/Device_Tree | Read more about Device Tree: https://en.wikipedia.org/wiki/Device_tree , http://elinux.org/Device_Tree | ||
Строка 9: | Строка 8: | ||
Device Tree files are written in .dts text format, which is compiled into dtb binary format | Device Tree files are written in .dts text format, which is compiled into dtb binary format | ||
== Loading == | == Loading == | ||
Строка 20: | Строка 20: | ||
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) | 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 == | == Reassembly == | ||
Строка 26: | Строка 27: | ||
Another way is to build the kernel:[[Special:MyLanguage/Сборка ядра|Сборка ядра]] | Another way is to build the kernel:[[Special:MyLanguage/Сборка ядра|Сборка ядра]] | ||
===Download=== | ===Download=== | ||
Строка 31: | Строка 33: | ||
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. | 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. | ||
Основной DTS-файл: | |||
imx23-wirenboard32.dts для Wiren Board Smart Home rev. 3.5 | |||
imx23- | imx23-wirenboard28.dts для Wiren Board rev. 2.8 | ||
: | : | ||
Строка 43: | Строка 46: | ||
$ cd dts | $ cd dts | ||
$ #export WB_BRANCH=v3.12-rc3-imxv5-x0.3 # | $ #export WB_BRANCH=v3.12-rc3-imxv5-x0.3 # для ядра 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 | ||
Строка 50: | Строка 54: | ||
$ 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» сохранён [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» сохранён [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 | ||
Строка 63: | Строка 67: | ||
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> | ||
===Компилятор=== | |||
Компилятор Device Tree в Ubuntu и Debian находится в пакете device-tree-compiler. Установим его: | |||
<pre> | <pre> | ||
Строка 74: | Строка 81: | ||
</pre> | </pre> | ||
gcc | |||
Также требуется gcc | |||
<pre> | <pre> | ||
Строка 80: | Строка 88: | ||
</pre> | </pre> | ||
=== | |||
===Компиляция=== | |||
<pre> | <pre> | ||
Строка 89: | Строка 98: | ||
</pre> | </pre> | ||
===Установка=== | |||
Скомпилированный файл необходимо записать в /boot/dtsb. | |||
<b> Обязательно сделайте резервную копию существущего в /boot/dtsb файла!</b> |
Версия 18:43, 24 апреля 2019
Device Tree are files describing the hardware configuration. They are used in Linux and therefore in the Wiren Board controllers firmware. Modification of Device Tree-files may be required when re-assigning 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 for Wiren Board is located in the imx23-wirenboard28.dts
file. It also uses the processor description file 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 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/boot/uEnv.txt :
#These are the default settings for some useful u-boot variables: fdt_file=/boot/dtbs/imx23-wirenboard28.dtb
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:Сборка ядра
Download
Here[1] you must download imx23-wirenboardXX.dts file, corresponding the device version, and dependencies. The dependencies on this file are imx23.dtsi, skeleton.dtsi.
Основной DTS-файл:
imx23-wirenboard32.dts для Wiren Board Smart Home rev. 3.5
imx23-wirenboard28.dts для Wiren Board rev. 2.8
$ mkdir dts $ cd dts $ #export WB_BRANCH=v3.12-rc3-imxv5-x0.3 # для ядра 3.12 $ 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/imx23-wirenboard28.dts 2013-11-17 04:24:28 (37.9 MB/s) - «imx23-wirenboard28.dts» сохранён [5255/5255] $ 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» сохранён [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/imx23-pinfunc.h $ ls imx23.dtsi imx23-wirenboard28.dts skeleton.dtsi imx23-pinfunc.h mxs-pinfunc.h
Компилятор
Компилятор Device Tree в Ubuntu и Debian находится в пакете device-tree-compiler. Установим его:
$ sudo apt-get install device-tree-compiler
Также требуется gcc
$ sudo apt-get install gcc
Компиляция
$ gcc -E -Wp,-MD,imx23-wirenboard28.dtb.d.pre.tmp -nostdinc -I. -undef -D__DTS__ -x assembler-with-cpp -o .imx23-wirenboard28.dtb.dts.tmp imx23-wirenboard28.dts $ cat .imx23-wirenboard28.dtb.dts.tmp | grep -v "^#" | dtc -I dts -O dtb -o imx23-wirenboard28.dtb DTC: dts->dtb on file "-"
Установка
Скомпилированный файл необходимо записать в /boot/dtsb. Обязательно сделайте резервную копию существущего в /boot/dtsb файла!