<s>
In	O
computing	O
,	O
a	O
devicetree	B-Operating_System
(	O
also	O
written	O
device	B-Operating_System
tree	I-Operating_System
)	O
is	O
a	O
data	B-General_Concept
structure	I-General_Concept
describing	O
the	O
hardware	O
components	O
of	O
a	O
particular	O
computer	O
so	O
that	O
the	O
operating	B-General_Concept
system	I-General_Concept
's	O
kernel	B-Operating_System
can	O
use	O
and	O
manage	O
those	O
components	O
,	O
including	O
the	O
CPU	B-General_Concept
or	O
CPUs	O
,	O
the	O
memory	B-General_Concept
,	O
the	O
buses	B-General_Concept
and	O
the	O
integrated	O
peripherals	O
.	O
</s>
<s>
The	O
device	B-Operating_System
tree	I-Operating_System
was	O
derived	O
from	O
SPARC-based	O
computers	O
via	O
the	O
Open	B-Architecture
Firmware	I-Architecture
project	O
.	O
</s>
<s>
is	O
targeted	O
at	O
smaller	O
systems	O
,	O
but	O
is	O
still	O
used	O
with	O
some	O
server-class	O
systems	O
(	O
for	O
instance	O
,	O
those	O
described	O
by	O
the	O
Power	B-Device
Architecture	I-Device
Platform	I-Device
Reference	I-Device
)	O
.	O
</s>
<s>
Personal	B-Device
computers	I-Device
with	O
the	O
x86	B-Operating_System
architecture	I-Operating_System
generally	O
do	O
not	O
use	O
device	B-Operating_System
trees	I-Operating_System
,	O
relying	O
instead	O
on	O
various	O
auto	O
configuration	O
protocols	O
(	O
e.g.	O
</s>
<s>
ACPI	B-Device
)	O
to	O
discover	O
hardware	O
.	O
</s>
<s>
Systems	O
which	O
use	O
device	B-Operating_System
trees	I-Operating_System
usually	O
pass	O
a	O
static	O
device	B-Operating_System
tree	I-Operating_System
(	O
perhaps	O
stored	O
in	O
EEPROM	B-General_Concept
,	O
or	O
stored	O
in	O
NAND	O
device	O
like	O
eUFS	B-Device
)	O
to	O
the	O
operating	B-General_Concept
system	I-General_Concept
,	O
but	O
can	O
also	O
generate	O
a	O
device	B-Operating_System
tree	I-Operating_System
in	O
the	O
early	O
stages	O
of	O
booting	B-Operating_System
.	O
</s>
<s>
As	O
an	O
example	O
,	O
Das	B-Language
U-Boot	I-Language
and	O
kexec	B-Application
can	O
pass	O
a	O
device	B-Operating_System
tree	I-Operating_System
when	O
launching	O
a	O
new	O
operating	B-General_Concept
system	I-General_Concept
.	O
</s>
<s>
On	O
systems	O
with	O
a	O
boot	B-Application
loader	I-Application
that	O
does	O
not	O
support	O
device	B-Operating_System
trees	I-Operating_System
,	O
a	O
static	O
device	B-Operating_System
tree	I-Operating_System
may	O
be	O
installed	O
along	O
with	O
the	O
operating	B-General_Concept
system	I-General_Concept
;	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
supports	O
this	O
approach	O
.	O
</s>
<s>
The	O
Devicetree	B-Operating_System
specification	O
is	O
currently	O
managed	O
by	O
a	O
community	O
named	O
devicetree.org,	O
which	O
is	O
associated	O
with	O
,	O
among	O
others	O
,	O
Linaro	O
and	O
Arm	B-Architecture
.	O
</s>
<s>
A	O
device	B-Operating_System
tree	I-Operating_System
can	O
hold	O
any	O
kind	O
of	O
data	O
as	O
internally	O
it	O
is	O
a	O
tree	B-Data_Structure
of	O
named	O
nodes	O
and	O
properties	B-Language
.	O
</s>
<s>
Nodes	O
contain	O
properties	B-Language
and	O
child	B-Data_Structure
nodes	I-Data_Structure
,	O
while	O
properties	B-Language
are	O
name	B-Application
–	I-Application
value	I-Application
pairs	I-Application
.	O
</s>
<s>
Device	B-Operating_System
trees	I-Operating_System
have	O
both	O
a	O
binary	O
format	O
for	O
operating	B-General_Concept
systems	I-General_Concept
to	O
use	O
and	O
a	O
textual	O
format	O
for	O
convenient	O
editing	O
and	O
management	O
.	O
</s>
<s>
Given	O
the	O
correct	O
device	B-Operating_System
tree	I-Operating_System
,	O
the	O
same	O
compiled	O
kernel	B-Operating_System
can	O
support	O
different	O
hardware	O
configurations	O
within	O
a	O
wider	O
architecture	O
family	O
.	O
</s>
<s>
The	O
Linux	B-Operating_System
kernel	I-Operating_System
for	O
the	O
ARC	B-Application
,	O
ARM	B-Architecture
,	O
C6x	O
,	O
H8/300	B-Device
,	O
MicroBlaze	B-Device
,	O
MIPS	B-Device
,	O
NDS32	O
,	O
Nios	B-Device
II	I-Device
,	O
OpenRISC	B-Device
,	O
PowerPC	B-Architecture
,	O
RISC-V	B-Device
,	O
SuperH	O
,	O
and	O
Xtensa	O
architectures	O
reads	O
device	B-Operating_System
tree	I-Operating_System
information	O
;	O
on	O
ARM	B-Architecture
,	O
device	B-Operating_System
trees	I-Operating_System
have	O
been	O
mandatory	O
for	O
all	O
new	O
SoCs	B-Architecture
since	O
2012	O
.	O
</s>
<s>
This	O
can	O
be	O
seen	O
as	O
a	O
remedy	O
to	O
the	O
vast	O
number	O
of	O
forks	O
(	O
of	O
Linux	B-Operating_System
and	O
Das	B-Language
U-Boot	I-Language
)	O
that	O
have	O
historically	O
been	O
created	O
to	O
support	O
(	O
marginally	O
)	O
different	O
ARM	B-Architecture
boards	O
.	O
</s>
<s>
The	O
purpose	O
is	O
to	O
move	O
a	O
significant	O
part	O
of	O
the	O
hardware	O
description	O
out	O
of	O
the	O
kernel	B-Operating_System
binary	O
,	O
and	O
into	O
the	O
compiled	O
device	B-Operating_System
tree	I-Operating_System
blob	O
,	O
which	O
is	O
handed	O
to	O
the	O
kernel	B-Operating_System
by	O
the	O
boot	B-Application
loader	I-Application
,	O
replacing	O
a	O
range	O
of	O
board-specific	O
C	B-Language
source	O
files	O
and	O
compile-time	O
options	O
in	O
the	O
kernel	B-Operating_System
.	O
</s>
<s>
It	O
is	O
specified	O
in	O
a	O
Devicetree	B-Operating_System
Source	O
file	O
(	O
.dts	O
)	O
and	O
is	O
compiled	O
into	O
a	O
Devicetree	B-Operating_System
Blob	O
or	O
device	B-Operating_System
tree	I-Operating_System
binary	O
(	O
.dtb	O
)	O
file	O
through	O
the	O
Devicetree	B-Operating_System
compiler	O
(	O
DTC	O
)	O
.	O
</s>
<s>
Device	B-Operating_System
tree	I-Operating_System
source	O
files	O
can	O
include	B-Language
other	O
files	O
,	O
referred	O
to	O
as	O
device	B-Operating_System
tree	I-Operating_System
source	O
includes	O
.	O
</s>
<s>
It	O
has	O
been	O
customary	O
for	O
ARM-based	O
Linux	B-Application
distributions	I-Application
to	O
include	B-Language
a	O
boot	B-Application
loader	I-Application
,	O
that	O
necessarily	O
was	O
customized	O
for	O
specific	O
boards	O
,	O
for	O
example	O
Raspberry	B-Operating_System
Pi	I-Operating_System
or	O
Hackberry	O
A10	O
.	O
</s>
<s>
This	O
has	O
created	O
problems	O
for	O
the	O
creators	O
of	O
Linux	B-Application
distributions	I-Application
as	O
some	O
part	O
of	O
the	O
operating	B-General_Concept
system	I-General_Concept
must	O
be	O
compiled	O
specifically	O
for	O
every	O
board	O
variant	O
,	O
or	O
updated	O
to	O
support	O
new	O
boards	O
.	O
</s>
<s>
However	O
,	O
some	O
modern	O
SoCs	B-Architecture
(	O
for	O
example	O
,	O
Freescale	O
i.MX6	O
)	O
have	O
a	O
vendor-provided	O
boot	B-Application
loader	I-Application
with	O
device	B-Operating_System
tree	I-Operating_System
on	O
a	O
separate	O
chip	O
from	O
the	O
operating	B-General_Concept
system	I-General_Concept
.	O
</s>
<s>
A	O
proprietary	O
configuration	O
file	O
format	O
used	O
for	O
similar	O
purposes	O
,	O
the	O
FEX	O
file	O
format	O
,	O
is	O
a	O
de	O
facto	O
standard	O
among	O
Allwinner	B-Architecture
SoCs	B-Architecture
.	O
</s>
<s>
Windows	O
does	O
not	O
use	O
DeviceTree	B-Operating_System
(	O
DTB	O
file	O
)	O
as	O
described	O
here	O
.	O
</s>
<s>
Instead	O
,	O
it	O
uses	O
ACPI	B-Device
to	O
discover	O
and	O
manage	O
devices	O
.	O
</s>
<s>
The	O
coreboot	B-Device
project	O
makes	O
use	O
of	O
device	B-Operating_System
trees	I-Operating_System
,	O
but	O
they	O
are	O
different	O
from	O
the	O
flattened	O
device	B-Operating_System
trees	I-Operating_System
used	O
in	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
.	O
</s>
<s>
Example	O
of	O
Devicetree	B-Operating_System
Source	O
(	O
DTS	O
)	O
format	O
:	O
</s>
<s>
The	O
tree	B-Data_Structure
has	O
four	O
nodes	O
:	O
/	O
(	O
root	O
node	O
)	O
,	O
soc	O
(	O
stands	O
for	O
"	O
system	B-Architecture
on	I-Architecture
a	I-Architecture
chip	I-Architecture
"	O
)	O
,	O
flash-controller	O
@4001e000	O
and	O
flash	O
@0	O
(	O
instance	O
of	O
flash	O
which	O
uses	O
the	O
flash	O
controller	O
)	O
.	O
</s>
<s>
The	O
latter	O
two	O
nodes	O
have	O
properties	B-Language
,	O
which	O
represent	O
name/value	B-Application
pairs	I-Application
.	O
</s>
<s>
Property	O
values	O
can	O
refer	O
to	O
other	O
nodes	O
in	O
the	O
devicetree	B-Operating_System
by	O
their	O
phandles	O
.	O
</s>
<s>
The	O
above	O
tree	B-Data_Structure
could	O
be	O
compiled	O
by	O
the	O
standard	O
DTC	O
compiler	O
to	O
binary	O
DTB	O
format	O
or	O
assembly	B-Language
.	O
</s>
<s>
In	O
Zephyr	B-Application
RTOS	I-Application
,	O
however	O
,	O
DTS	O
files	O
are	O
compiled	O
into	O
C	B-Language
header	I-Language
files	I-Language
(	O
.h	B-Language
)	O
,	O
which	O
are	O
then	O
used	O
by	O
the	O
build	O
system	O
to	O
compile	O
code	O
for	O
a	O
specific	O
board	O
.	O
</s>
