-
Notifications
You must be signed in to change notification settings - Fork 14
/
androidbootimage.grammar
74 lines (74 loc) · 5.15 KB
/
androidbootimage.grammar
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?xml version="1.0" encoding="UTF-8"?>
<ufwb version="1.14">
<grammar name="Android Bootimage" start="id:178" author="Jens Hoffmann" email="jehoffma@gmail.com" complete="yes">
<description>Android Bootimage grammer</description>
<structure name="Bootimage" id="178" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Header" id="180" structure="id:179"/>
<structref name="Kernel" id="182" structure="id:181"/>
<structref name="Ramdisk" id="184" structure="id:183"/>
<structref name="Secondary Kernel" id="186" structure="id:185"/>
<structref name="DeviceTree" id="188" structure="id:187"/>
</structure>
<structure name="Header" id="179" length="page_size" encoding="ISO_8859-1:1987" endian="little" signed="no">
<string name="magic" mustmatch="yes" id="190" strokecolor="FEFFFF" type="fixed-length" length="8">
<fixedvalues>
<fixedvalue name="android" value="ANDROID!"/>
</fixedvalues>
</string>
<number name="kernel_size" id="191" strokecolor="FF9200" fillcolor="FF9200" type="integer" length="4">
<description>Kernel size in bytes</description>
</number>
<number name="kernel_addr" id="192" strokecolor="FEFB00" fillcolor="FEFB00" type="integer" length="4" display="hex">
<description>Kernel physical load address</description>
</number>
<number name="ramdisk_size" id="193" strokecolor="FF9200" fillcolor="FF9200" type="integer" length="4"/>
<number name="ramdisk_addr" id="194" strokecolor="FEFB00" fillcolor="FEFB00" type="integer" length="4" display="hex">
<description>Ramdisk physical load address</description>
</number>
<number name="second_size" id="195" strokecolor="FF9200" fillcolor="FF9200" type="integer" length="4">
<description>Secondary kernel size in bytes</description>
</number>
<number name="second_addr" id="196" strokecolor="FEFB00" fillcolor="FEFB00" type="integer" length="4" display="hex">
<description>Secondary kernel physical load address</description>
</number>
<number name="tags_addr" id="197" strokecolor="FEFB00" fillcolor="FEFB00" type="integer" length="4" display="hex">
<description>ATAG or DeviceTree physical load address</description>
</number>
<number name="page_size" id="198" strokecolor="FF9200" fillcolor="FF9200" type="integer" length="4" display="hex">
<description>Boot image page size in bytes</description>
</number>
<number name="dt_size" id="199" strokecolor="FF9200" fillcolor="FF9200" type="integer" length="4">
<description>DeviceTree size in bytes</description>
</number>
<number name="unused" id="200" fillcolor="000000" type="integer" length="4">
<description>future expansion: should be 0</description>
</number>
<string name="name" id="201" strokecolor="B8EFE3" fillcolor="B8EFE3" type="fixed-length" length="16">
<description>asciiz product name</description>
</string>
<string name="cmdline" id="202" strokecolor="FF40FF" fillcolor="FF40FF" type="fixed-length" length="512">
<description>Kernel commandline</description>
</string>
<binary name="id" id="203" strokecolor="00FCFF" fillcolor="00FCFF" repeatmin="8" repeatmax="8" length="4">
<description>timestamp / checksum / sha1 / etc </description>
</binary>
<binary name="padding" id="204" fillcolor="000000" length="remaining"/>
</structure>
<structure name="Kernel" id="181" length="ceil(kernel_size/page_size)*page_size" encoding="ISO_8859-1:1987" endian="little" signed="no" fillcolor="00F900">
<binary name="Kernel Image" id="206" fillcolor="00F900" length="kernel_size"/>
<binary name="padding" id="207" fillcolor="000000" length="remaining"/>
</structure>
<structure name="Ramdisk" id="183" length="ceil(ramdisk_size/page_size)*page_size" encoding="ISO_8859-1:1987" endian="little" signed="no">
<binary name="Ramdisk Image" id="209" fillcolor="AA7941" length="ramdisk_size"/>
<binary name="padding" id="210" fillcolor="000000" length="remaining"/>
</structure>
<structure name="Secondary Kernel" id="185" length="ceil(second_size/page_size)*page_size" encoding="ISO_8859-1:1987" endian="little" signed="no">
<binary name="Secondary Image" id="212" length="second_size"/>
<binary name="padding" id="213" fillcolor="000000" length="remaining"/>
</structure>
<structure name="DeviceTree" id="187" length="ceil(dt_size/page_size)*page_size" encoding="ISO_8859-1:1987" endian="little" signed="no">
<binary name="DeviceTree Image" id="215" fillcolor="00FCFF" length="dt_size"/>
<binary name="padding" id="216" fillcolor="000000" length="remaining"/>
</structure>
</grammar>
</ufwb>