-
Notifications
You must be signed in to change notification settings - Fork 2
Device Tree
- Git repository cloned with
--recursive
To create a link to the device tree compiler, execute the following commands inside 'kernel/linux_xlnx/':
make ARCH=arm scripts
sudo ln -s scripts/dtc/dtc /usr/bin/dtc
This is very helpful if you want to play with device tree overlays. To create a link to the device tree compiler, execute the following commands inside '/usr/src/linux/':
make scripts
ln -s /usr/src/linux/scripts/dtc/dtc /usr/bin/dtc
Execute the following command inside 'device-tree':
dtc -@ -I dts -O dtb -o zynq-zynqberry.dtb zynq-zynqberry.dts
The flag '-@' is needed, that all symbols (e.g. intc) are also exported. The device tree blob will be about 30% larger but you can use these symbols inside your device tree overlays. That makes your life much easier.
Device tree overlays get a slightly different extension, but that's it:
dtc -@ -I dts -O dtb -o <dto>.dtbo <dto>.dts
To be able to apply the device tree overlay, you need to create a folder in the device tree configuration:
mkdir /config/device-tree/overlays/<name>
Copy your overlay inside the new created folder
cp <dto>.dts /config/device-tree/overlays/<name>/dtbo
After that check its status
cat /config/device-tree/overlays/<name>/status
It should return 'applied'. Otherwise you can check the kernel log file for more information:
tail -n 20 /var/log/kern.log
Attention: Overlays work like a stack! Remove them in the reverse order. To remove an overlay delete the folder:
rmdir /config/device-tree/overlays/<name>
dtc -I fs /proc/device-tree