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