]>
Commit | Line | Data |
---|---|---|
83d3827d PA |
1 | Howto use the configfs overlay interface. |
2 | ||
3 | A device-tree configfs entry is created in /config/device-tree/overlays | |
4 | and and it is manipulated using standard file system I/O. | |
5 | Note that this is a debug level interface, for use by developers and | |
6 | not necessarily something accessed by normal users due to the | |
7 | security implications of having direct access to the kernel's device tree. | |
8 | ||
9 | * To create an overlay you mkdir the directory: | |
10 | ||
11 | # mkdir /config/device-tree/overlays/foo | |
12 | ||
13 | * Either you echo the overlay firmware file to the path property file. | |
14 | ||
15 | # echo foo.dtbo >/config/device-tree/overlays/foo/path | |
16 | ||
17 | * Or you cat the contents of the overlay to the dtbo file | |
18 | ||
19 | # cat foo.dtbo >/config/device-tree/overlays/foo/dtbo | |
20 | ||
21 | The overlay file will be applied, and devices will be created/destroyed | |
22 | as required. | |
23 | ||
24 | To remove it simply rmdir the directory. | |
25 | ||
26 | # rmdir /config/device-tree/overlays/foo | |
27 | ||
28 | The rationalle of the dual interface (firmware & direct copy) is that each is | |
29 | better suited to different use patterns. The firmware interface is what's | |
30 | intended to be used by hardware managers in the kernel, while the copy interface | |
31 | make sense for developers (since it avoids problems with namespaces). |