blob: a2e0831f33bfcc3823fa4bf2d69fa2e1ad024f4e [file] [log] [blame]
wdenkcc1c8a12002-11-02 22:58:18 +00001This port of U-Boot will run on a Motorola Sandpoint 3 development
2system equipped with a Unity X4 PPMC card (MPC8240 CPU) only. It is a
3snapshot of work in progress and far from being completed. In order
4to run it on the target system, it has to be downloaded using the
5DINK32 monitor program that came with your Sandpoint system. Please
6note that DINK32 does not accept the S-Record file created by the
7U-Boot build process unmodified, because it contains CR/LF line
8terminators. You have to strip the CR characters first. There is a
9tiny script named 'dinkdl' I created for this purpose.
10
11The Sandpoint port is based on the work of Rob Taylor, who does not
12seem to maintain it any more. I can be reached by mail as
13tkoeller@gmx.net.
14
15Thomas Koeller
Wolfgang Denk702e6012012-04-29 23:57:39 +000016
17
18
19
20The port was tested on a Sandpoint 8240 X3 board, with U-Boot
21installed in the flash memory of the CPU card. Please use the
22following DIP switch settings:
23
24Motherboard:
25
26SW1.1: on SW1.2: on SW1.3: on SW1.4: on
27SW1.5: on SW1.6: on SW1.7: on SW1.8: on
28
29SW2.1: on SW2.2: on SW2.3: on SW2.4: on
30SW2.5: on SW2.6: on SW2.7: on SW2.8: on
31
32
33CPU Card:
34
35SW2.1: OFF SW2.2: OFF SW2.3: on SW2.4: on
36SW2.5: OFF SW2.6: OFF SW2.7: OFF SW2.8: OFF
37
38SW3.1: OFF SW3.2: on SW3.3: OFF SW3.4: OFF
39SW3.5: on SW3.6: OFF SW3.7: OFF SW3.8: on
40
41
42The followind detailed description of installation and initial steps
43with U-Boot and QNX was provided by Jim Sandoz <sandoz@lucent.com>:
44
45
46Directions for installing U-Boot on Sandpoint+Unity8240
47using the Abatron BDI2000 BDM/JTAG debugger ...
48
49Background and Reference info:
50http://u-boot.sourceforge.net/
51http://www.abatron.ch/
52http://www.abatron.ch/BDI/bdihw.html
53http://www.abatron.ch/DataSheets/BDI2000.pdf
54http://www.abatron.ch/Manuals/ManGdbCOP-2000C.pdf
55http://e-www.motorola.com/collateral/SPX3UM.pdf
56http://e-www.motorola.com/collateral/UNITYX4CONFIG.pdf
57
58
59Connection Diagram:
60 ===========
61 === ===== |----- |
62| | <---------------> | | | | |
63|PC | rs232 | BDI |=============[] | |
64| | |2000 | BDM probe | | |
65| | <---------------> | | |----- |
66 === ethernet ===== | |
67 | |
68 ===========
69 Sandpoint X3 with
70 Unity 8240 proc
71
72
73PART 1)
74 DIP Switch Settings:
75
76Sandpoint X3 8240 processor board DIP switch settings, with
77U-Boot to be installed in the flash memory of the CPU card:
78
79Motorola Sandpoint X3 Motherboard:
80SW1.1: on SW1.2: on SW1.3: on SW1.4: on
81SW1.5: on SW1.6: on SW1.7: on SW1.8: on
82SW2.1: on SW2.2: on SW2.3: on SW2.4: on
83SW2.5: on SW2.6: on SW2.7: on SW2.8: on
84
85Motorola Unity 8240 CPU Card:
86SW2.1: OFF SW2.2: OFF SW2.3: on SW2.4: on
87SW2.5: OFF SW2.6: OFF SW2.7: OFF SW2.8: OFF
88SW3.1: OFF SW3.2: on SW3.3: OFF SW3.4: OFF
89SW3.5: on SW3.6: OFF SW3.7: OFF SW3.8: on
90
91
92PART 2)
93 Connect the BDI2000 Cable to the Sandpoint/Unity 8240:
94
95BDM Pin 1 on the Unity 8240 processor board is towards the
96PCI PMC connectors, or away from the socketed SDRAM, i.e.:
97
98 ====================
99 | ---------------- |
100 | | SDRAM | |
101 | | | |
102 | ---------------- |
103 | |~| |
104 | |B| ++++++ |
105 | |D| + uP + |
106 | |M| +8240+ |
107 | ~ 1 ++++++ |
108 | |
109 | |
110 | |
111 | PMC conn ====== |
112 | ===== ====== |
113 | |
114 ====================
115
116
117PART 3)
118 Setting up the BDI2000, and preparing for TCP/IP network comms:
119
120Connect the BDI2000 to the PC using the supplied serial cable.
121Download the BDI2000 software and install it using setup.exe.
122
123[Note: of course you can also use the Linux command line tool
124"bdisetup" to configure your BDI2000 - the sources are included on
125the floppy disk that comes with your BDI2000. Just in case you don't
126have any Windows PC's - like me :-) -- wd ]
127
128Power up the BDI2000; then follow directions to assign the IP
129address and related network information. Note that U-Boot
130will be loaded to the Sandpoint via tftp. You need to either
131use the Abatron-provided tftp application or provide a tftp
132server (e.g. Linux/Solaris/*BSD) somewhere on your network.
133Once the IP address etc are assigned via the RS232 port,
134further communication with the BDI2000 will happen via the
135ethernet connection.
136
137PART 4)
138 Making a TCP/IP network connection to the Abatron BDI2000:
139
140Telnet to the Abatron BDI2000. Assuming that all of the
141networking info was loaded via RS232 correctly, you will see
142the following (scrolling):
143
144- TARGET: waiting for target Vcc
145- TARGET: waiting for target Vcc
146
147
148PART 5)
149 Power up the target Sandpoint:
150If the BDM connections are correct, the following will now appear:
151
152- TARGET: waiting for target Vcc
153- TARGET: waiting for target Vcc
154- TARGET: processing power-up delay
155- TARGET: processing user reset request
156- BDI asserts HRESET
157- Reset JTAG controller passed
158- Bypass check: 0x55 => 0xAA
159- Bypass check: 0x55 => 0xAA
160- JTAG exists check passed
161- Target PVR is 0x00810101
162- COP status is 0x01
163- Check running state passed
164- BDI scans COP freeze command
165- BDI removes HRESET
166- COP status is 0x05
167- Check stopped state passed
168- Check LSRL length passed
169- BDI sets breakpoint at 0xFFF00100
170- BDI resumes program execution
171- Waiting for target stop passed
172- TARGET: Target PVR is 0x00810101
173- TARGET: reseting target passed
174- TARGET: processing target startup ....
175- TARGET: processing target startup passed
176BDI>
177
178
179PART 6)
180 Erase the current contents of the flash memory:
181
182BDI>era 0xFFF00000
183 Erasing flash at 0xfff00000
184 Erasing flash passed
185BDI>era 0xFFF04000
186 Erasing flash at 0xfff04000
187 Erasing flash passed
188BDI>era 0xFFF06000
189 Erasing flash at 0xfff06000
190 Erasing flash passed
191BDI>era 0xFFF08000
192 Erasing flash at 0xfff08000
193 Erasing flash passed
194BDI>era 0xFFF10000
195 Erasing flash at 0xfff10000
196 Erasing flash passed
197BDI>era 0xFFF20000
198 Erasing flash at 0xfff20000
199 Erasing flash passed
200
201
202PART 7)
203 Program the flash memory with the U-Boot image:
204
205BDI>prog 0xFFF00000 u-boot.bin bin
206 Programming u-boot.bin , please wait ....
207 Programming flash passed
208
209
210PART 8)
211 Connect PC to Sandpoint:
212Using a crossover serial cable, attach the PC serial port to the
213Sandpoint's COM1. Set communications parameters to 8N1 / 9600 baud.
214
215
216PART 9)
217 Reset the Unity and begin U-Boot execution:
218
219BDI>reset
220- TARGET: processing user reset request
221- TARGET: Target PVR is 0x00810101
222- TARGET: reseting target passed
223- TARGET: processing target init list ....
224- TARGET: processing target init list passed
225
226BDI>go
227
228Now see output from U-Boot running, sent via serial port:
229
230U-Boot 1.1.4 (Jan 23 2002 - 18:29:19)
231
232CPU: MPC8240 Revision 1.1 at 264 MHz: 16 kB I-Cache 16 kB D-Cache
233Board: Sandpoint 8240 Unity
234DRAM: 64 MB
235FLASH: 2 MB
236PCI: scanning bus0 ...
237 bus dev fn venID devID class rev MBAR0 MBAR1 IPIN ILINE
238 00 00 00 1057 0003 060000 13 00000008 00000000 01 00
239 00 0b 00 10ad 0565 060100 10 00000000 00000000 00 00
240 00 0f 00 8086 1229 020000 08 80000000 80000001 01 00
241In: serial
242Out: serial
243Err: serial
244=>
245
246
247PART 10)
248 Set and save any required environmental variables, examples of some:
249
250=> setenv ethaddr 00:03:47:97:D0:79
251=> setenv bootfile your_qnx_image_here
252=> setenv hostname sandpointX
253=> setenv netmask 255.255.255.0
254=> setenv ipaddr 192.168.0.11
255=> setenv serverip 192.168.0.10
256=> setenv gatewayip=192.168.0.1
257=> saveenv
258Saving Environment to Flash...
259Un-Protected 1 sectors
260Erasing Flash...
261 done
262Erased 1 sectors
263Writing to Flash... done
264Protected 1 sectors
265=>
266
267**** Example environment: ****
268
269=> printenv
270baudrate=9600
271bootfile=telemetry
272hostname=sp1
273ethaddr=00:03:47:97:E4:6B
274load=tftp 100000 u-boot.bin
275update=protect off all;era FFF00000 FFF3FFFF;cp.b 100000 FFF00000 ${filesize};saveenv
276filesize=1f304
277gatewayip=145.17.228.1
278netmask=255.255.255.0
279ipaddr=145.17.228.42
280serverip=145.17.242.46
281stdin=serial
282stdout=serial
283stderr=serial
284
285Environment size: 332/8188 bytes
286=>
287
288here's some text useful stuff for cut-n-paste:
289setenv hostname sandpoint1
290setenv netmask 255.255.255.0
291setenv ipaddr 145.17.228.81
292setenv serverip 145.17.242.46
293setenv gatewayip 145.17.228.1
294saveenv
295
296PART 11)
297 Test U-Boot by tftp'ing new U-Boot, overwriting current:
298
299=> protect off all
300Un-Protect Flash Bank # 1
301=> tftp 100000 u-boot.bin
302eth: Intel i82559 PCI EtherExpressPro @0x80000000(bus=0, device=15, func=0)
303ARP broadcast 1
304TFTP from server 145.17.242.46; our IP address is 145.17.228.42; sending through
305 gateway 145.17.228.1
306Filename 'u-boot.bin'.
307Load address: 0x100000
308Loading: #########################
309done
310Bytes transferred = 127628 (1f28c hex)
311=> era all
312Erase Flash Bank # 1
313 done
314Erase Flash Bank # 2 - missing
315=> cp.b 0x100000 FFF00000 1f28c
316Copy to Flash... done
317=> saveenv
318Saving Environment to Flash...
319Un-Protected 1 sectors
320Erasing Flash...
321 done
322Erased 1 sectors
323Writing to Flash... done
324Protected 1 sectors
325=> reset
326
327You can put these commands into some environment variables;
328
329=> setenv load tftp 100000 u-boot.bin
330=> setenv update protect off all\;era FFF00000 FFF3FFFF\;cp.b 100000 FFF00000 \${filesize}\;saveenv
331=> saveenv
332
333Then you just have to type "run load" then "run update"
334
335=> run load
336eth: Intel i82559 PCI EtherExpressPro @0x80000000(bus=0, device=15, func=0)
337ARP broadcast 1
338TFTP from server 145.17.242.46; our IP address is 145.17.228.42; sending through
339 gateway 145.17.228.1
340Filename 'u-boot.bin'.
341Load address: 0x100000
342Loading: #########################
343done
344Bytes transferred = 127748 (1f304 hex)
345=> run update
346Un-Protect Flash Bank # 1
347Un-Protect Flash Bank # 2
348Erase Flash from 0xfff00000 to 0xfff3ffff
349 done
350Erased 7 sectors
351Copy to Flash... done
352Saving Environment to Flash...
353Un-Protected 1 sectors
354Erasing Flash...
355 done
356Erased 1 sectors
357Writing to Flash... done
358Protected 1 sectors
359=>
360
361
362PART 12)
363 Load OS image (ELF format) via U-Boot using tftp
364
365
366=> tftp 800000 sandpoint-simple.elf
367eth: Intel i82559 PCI EtherExpressPro @0x80000000(bus=0, device=15, func=0)
368ARP broadcast 1
369TFTP from server 145.17.242.46; our IP address is 145.17.228.42; sending through
370 gateway 145.17.228.1
371Filename 'sandpoint-simple.elf'.
372Load address: 0x800000
373Loading: #################################################################
374 #################################################################
375 #################################################################
376 ########################
377done
378Bytes transferred = 1120284 (11181c hex)
379==>
380
381PART 13)
382 Begin OS image execution: (note that unless you have the
383serial parameters of your OS image set to 9600 (i.e. same as
384the U-Boot binary) you will get garbage here until you change
385the serial communications speed.
386
387=> bootelf 800000
388Loading @ 0x001f0100 (1120028 bytes)
389## Starting application at 0x001f1d28 ...
390Replace init_hwinfo() with a board specific version
391
392Loading QNX6....
393
394Header size=0x0000009c, Total Size=0x000005c0, #Cpu=1, Type=1
395<...loader and kernel messages snipped...>
396
397Welcome to Neutrino on the Sandpoint
398#
399
400
401other information:
402
403CVS Retrieval Notes:
404
405U-Boot's SourceForge CVS repository can be checked out
406through anonymous (pserver) CVS with the following
407instruction set. The module you wish to check out must
408be specified as the modulename. When prompted for a
409password for anonymous, simply press the Enter key.
410
411cvs -d:pserver:anonymous@cvs.u-boot.sourceforge.net:/cvsroot/u-boot login
412
413cvs -z6 -d:pserver:anonymous@cvs.u-boot.sourceforge.net:/cvsroot/u-boot co -P u-boot