README 11 KB

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