How-to
Load / Change / Save the Device Tree under U-Boot
Devicetree can be edit with the fdt commands under U-Boot.
For testing purpose only. For bigger changes, please compile the Devicetree.
Therefore you can have a look at the following tutorial.
Tested with TQMa7x BSP Rev.0101
1) At first the fdt file has to be loaded from the current boot medium (mmc) into RAM.
=> run loadfdt
2) Next step is to set the predefined U-Boot environment variable fdt_addr through the fdt addr command.
=> fdt addr $fdt_addr
3) Afterwards the size of the fdt has to be increased (to the next 4K divider) in order to have some space for modifications. This is simply done by entering:
=> fdt resize
4) List device in the tree you want to change to have a look at the default settings.
5) To modify a value of a propertie use the fdt set command.
=> fdt set <path> <property> <value>
6) Optional: If you want to save your modified Devicetree back to mmc you'll have to run the following command:
=> fatwrite mmc $mmcdev:$firmwarepart $fdt_addr $fdt_file <totalsize>
You can find out <totalsize> of the modified fdt by entering the command fdt header
Otherwise you can boot your module with the changed Devicetree right after the modification.
TQ-Systems GmbH provides the Board Support Packages (BSP) free of charge. The software included in the shipment has been configured individually for the starter kits. The software is only intended to evaluate the module. The use of the Board Support Packages (BSP) is only allowed within the scope of functionality described by TQ-Systems GmbH. TQ-Systems GmbH does not accept any liability for all further changes of the Board Support Package and for any damage resulting from its use.