Device Tree Hacking/Adding CPU

From OLPC
< Device Tree Hacking
Revision as of 04:40, 15 September 2014 by Quozl (talk | contribs) (Created page with 'Adding a CPU node to the /cpus node. XO-4 only. There is one node already present. To add another node, temporarily, interactively, ok dev /cpus ok new-device ok " cpu" de…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Adding a CPU node to the /cpus node.

XO-4 only.

There is one node already present.

To add another node, temporarily, interactively,

ok dev /cpus
ok new-device
ok " cpu" device-name
ok " cpu" device-type
ok 1 " reg" integer-property
ok : open true ;
ok : close ;
ok finish-device
ok dend
ok boot

To add under script control, place these lines before the final boot:

dev /cpus
new-device
   " cpu" device-name
   " cpu" device-type
   1 " reg" integer-property
   : open true ;
   : close ;
finish-device
dend

Verify using shell commands:

# ls -l /proc/device-tree/cpus
total 0
-r--r--r-- 1 root root 4 Sep 15 08:40 #address-cells
-r--r--r-- 1 root root 4 Sep 15 08:40 #size-cells
dr-xr-xr-x 2 root root 0 Sep 15 08:40 cpu@0
dr-xr-xr-x 2 root root 0 Sep 15 08:40 cpu@1
-r--r--r-- 1 root root 5 Sep 15 08:40 name
-r--r--r-- 1 root root 4 Sep 15 08:40 phandle
bash-4.2#