Once and for all – Loading Device tree overlays at runtime

Time for another Once-And-For-All – tasks I do periodically (but not weekly) and keep forgetting the command syntax.
Loading Device tree overlays at runtime.


# Mount kernel configfs
mount -t configfs none /sys/kernel/config/

# Create the device tree node (name doesn't really matter)
mkdir /sys/kernel/config/device-tree/overlays/rotary-enc

# cat the device tree overlay to a special file
cat /boot/overlays/rotary-encoder.dtbo > /sys/kernel/config/device-tree/overlays/rotary-enc/dtbo