]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - tools/elftosb/bdfiles/basic_test_cmd.e
Unified codebase for TX28, TX48, TX51, TX53
[karo-tx-uboot.git] / tools / elftosb / bdfiles / basic_test_cmd.e
1
2 # ooh! test input command file for elftosb 2!
3
4 options {
5         coalesce = yes;
6
7         # most elf files are GHS produced
8         toolset = "GHS";
9
10         # set versions
11         productVersion = "111.222.333";
12         componentVersion = "999.888.777";
13
14         # set file flags
15         flags = (1 << 0) | (1 << 1);
16 }
17
18 constants {
19         ocram_start = 0;
20         ocram_size = 256K;
21         ocram_end = ocram_start + ocram_size - 1;
22
23 #       ocram = ocram_start .. ocram_end;
24 #
25 #       ocram = ocram_start +.. ocram_size;
26
27         string_addr = 0x4500;
28
29         # boot modes
30         USB_BM = 0;
31         JTAG_BM = 7;
32         newBootMode = USB_BM;
33 }
34
35 sources {
36         hello = extern(0);  # elf
37         redboot = extern(1);  # srec
38         hostlink = extern(2); # elf
39         sd_player = extern(3) ( toolset="GCC" ); # elf
40         datasrc = "test0.key"; # binary
41 }
42
43 section (0) {
44         # load dcd
45         load dcd {{ 00 11 22 33 }} > 0;
46
47         # same load without dcd
48         load {{ 00 11 22 33 }} > 0;
49
50         call 0xf000;
51
52     hab call 0xf0000000 (128);
53         hab jump 0;
54
55 /*
56         # load a simple IVT to an absolute address
57         # this fills in the IVT self address field from the target address
58         load ivt (entry=hello:_start) > 0x1000;
59
60         # load simple IVT. the IVT self address is set explicitly in the IVT declaration,
61         # giving the IVT a natural address so you don't have to tell where to load it.
62         load ivt (entry=hello:_start, self=0x1000);
63
64         load ivt (entry=hello:_start, self=0x1000, csf=0x2000, dcd=0);
65
66         # Setting IVT entry point to the default entry point of a source file.
67         load ivt (entry=hostlink) > 0;
68
69         load ivt (entry=hello:_start, self=0x1000);
70         hab call 0x1000;
71
72         # Special syntax that combines the load and call into one statement.
73         hab call ivt(entry=hello:_start, self=0x1000);
74
75
76
77         load ivt (
78             entry = hello:_start,
79             csf = 0x2000
80         ) > 0x1000;
81
82         # All supported IVT fields.
83         load ivt (
84             entry = hello:,
85             dcd = 0,
86             boot_data = 0,
87             self = 0,
88             csf = 0
89         );
90
91         hab call ivt; # Call the last loaded IVT. */
92 }
93
94 section (32) {
95         # load a string to some address
96         load "some string" > string_addr;
97
98         # byte fill a region
99         load 0x55.b > ocram_start..ocram_end;
100
101         from hostlink {
102                 load $*;
103         }
104
105         # jump to a symbol
106         jump hostlink:_start (100);
107 }
108
109 section (100)
110 {
111         load redboot;
112         call redboot;
113 }
114
115 section(0x5a)
116 {
117         load datasrc > 0..8;
118
119         from hostlink
120         {
121 #               load $* ( $.ocram.*, ~$.sdram.* );
122
123 #               load $.sdram.*;
124 #               load $.ocram.*;
125
126                 call :main;
127                 call :_start;
128         }
129
130 #       goto 0x5b;
131 }
132
133 section (0x5b)
134 {
135 #       load $* from sd_player;
136
137 #       load hello$.text @ 64K;
138 #       load hello$*
139
140         load $.text from hello > 0x10000;
141         call sd_player (0xdeadbeef);
142 }
143
144 section (0x5c)
145 {
146         # these loads should produce fill commands with a
147         # length equal to the pattern word size
148         load 0x55.b > 0x200;
149         load 0x55aa.h > 0x400;
150         load 0x55aa66bb.w > 0x800;
151
152 #       load 0x55.b to 0x200;
153 #       load 0x55aa.h to 0x400;
154 #       load 0x55aa66bb.w to 0x800;
155
156 #       load 0x55.b @ 0x200;
157 #       load 0x55aa.h @ 0x400;
158 #       load 0x55aa66bb.w @ 0x800;
159
160 #       load $.text from hello @ .;
161 #       load hello$.text @ .;
162 #       load hello$* @ .
163
164         # this should produce a fill command with a length
165         # of 0x100
166         load 0x4c8e.h > 0x100..0x200;
167
168 #       load [ 0a 9b 77 66 55 44 33 22 11 00 ] @ 0x100;
169 }
170
171 # non-bootable section
172 section (0x100) <= datasrc;
173
174 #section (1K)
175 #{
176 #       load 0xff.b > hostlink:g_wUsbVID + 4;
177 #
178 #       load "Fred's Auto Service\x00" > hostlink:g_wUsbVendorName;
179 #
180 #       from sd_player
181 #       {
182 #               load [ 00 11 22 33 44 55 66 77 ] > :g_data + 16;
183 #       }
184 #
185 ##      (0x10 .. 0x20) + 5  ==  0x15 .. 0x25
186 #}
187
188 # section that switches modes
189 section (2K)
190 {
191         mode newBootMode;
192 }