Device Tree Cleaner (Delnode)
The delnode.sh tool removes disabled device tree nodes from DTB files that are used by the system. Removing disabled device tree node reduces the file sizes of the DTB files, which in turn speeds up the boot process. The speed up happens because optimized DTB files are faster to decompress and load.
Calling delnode
To call delnode
• From the Foundation or Linux/QNX build paths, enter:
delnode.sh <dtb file> <build_dir> < dtc compiler to use>
Where the arguments specify:
• dtb file name that needs device tree nodes with status=disabled removed
• build directory for intermediate files
• dtc compiler to be used
Example
The following example shows DTBs before and after delnode processes them
Before
usb3 {
lanes {
usb3-0 {
status = "okay";
#phy-cells = <0x0>;
nvidia,function = "xusb";
linux,phandle = <0x94>;
phandle = <0x94>;
};
usb3-1 {
status = "disabled";
#phy-cells = <0x0>;
};
usb3-2 {
status = "disabled";
#phy-cells = <0x0>;
nvidia,function = "xusb";
};
usb3-3 {
status = "disabled";
#phy-cells = <0x0>;
};
};
}
After
usb3 {
lanes {
usb3-0 {
};
usb3-1 {
};
/delete-node/ usb3-1;
usb3-2 {
};
/delete-node/ usb3-2;
usb3-3 {
};
/delete-node/ usb3-3;
};
};