Difference between revisions of "Building and using Openwince's JTAG Tools"
m (→JTAG tools command sequence to flash the bootloader) |
m (→Flash Files) |
||
(25 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
− | + | {{Brickable|'''There is also the possibility that you could unbrick your Kurobox with these instructions.'''}} | |
− | + | ||
+ | __TOC__ | ||
== Building JTAG tools == | == Building JTAG tools == | ||
+ | |||
+ | Download the tarball from [http://www.genbako.com/jtag/jtagdir.tgz here]. It has been patched to work with the Kuro and Linkstation MPC8241 based devices. Building the JTAG tools varies depending on the platform you use. Refer to [http://f30.aaa.livedoor.jp/~umino/pukiwiki.php?Linkstation%2FJTAG Umino's installation page] (in Japanese) or [http://translate.google.com/translate?u=http%3A%2F%2Ff30.aaa.livedoor.jp%2F%7Eumino%2Fpukiwiki.php%3FLinkstation%252FJTAG&langpair=ja%7Cen&hl=en&ie=UTF-8&oe=UTF-8&prev=%2Flanguage_tools The Google translation of the page] for building and installation instructions for several popular flavors of Linux. | ||
+ | |||
+ | |||
+ | In general, you need to move into the include directory and do a ./configure and make install and then move into the jtag directory and do a ./configure, make, and make install as root. You will also need to copy the data/motorola/mpc8241 directory to /usr/local/share/jtag/. | ||
+ | |||
+ | |||
+ | You can start JTAG tools with the command "jtag". | ||
+ | |||
+ | == Attach your JTAG cable and start your Kuro == | ||
+ | |||
+ | The cable attaches to the component side of the board. That means you will need to remove the four screws that hold the board in place to attach the cable. Make sure you align pin one on the header with pin one on your cable (usually indicated by a red wire or mark). | ||
+ | |||
+ | |||
+ | Once the cable is attached, reattach the board, snake the cable out of your Kuro and close the case. You can also just leave the case open, but if you get shocked it is your own fault. Plug in your kuro and press the red button on the back and hold it in. Press and release the power button and then release the red button (no, this does not get you into EM mode). The power, disk full, and diag lights will blink all on and then all off indicating (no, not EM mode) that the watchdog timer has been deactivated. | ||
== JTAG tools command sequence to flash the bootloader == | == JTAG tools command sequence to flash the bootloader == | ||
− | + | The following are the commands to prepare the Kuro for data transfer. This sequence assumes you are using one of the JTAG cables described [[Building_a_JTAG_Interface|here]] and it is attached to the primary parallel port. | |
− | + | Start jtag and execute the following commands at the jtag prompt: | |
jtag> cable parallel 0x378 DLC5 | jtag> cable parallel 0x378 DLC5 | ||
+ | jtag> detect | ||
jtag> include motorola/mpc8241/1.2 | jtag> include motorola/mpc8241/1.2 | ||
jtag> endian big | jtag> endian big | ||
Line 24: | Line 40: | ||
jtag> detectflash 0xFFC00000 | jtag> detectflash 0xFFC00000 | ||
+ | According to the [[Flash ROM]] page, the flash map is as follows: | ||
− | + | {| border="1" cellpadding="3" | |
+ | ! start !! Size (HEX) !! size !! contents | ||
+ | |- | ||
+ | |0xFFC00000 || 0x300000 || 3 MB || Linux/initrd | ||
+ | |- | ||
+ | |0xFFF00000 || 0x070000 || 448 K || bootcode.bin | ||
+ | |- | ||
+ | |0xFFF70000 || 0x010000 || 64K || HDD status (OKOKOK) | ||
+ | |- | ||
+ | |0xFFF80000 || 0x080000 || 512 K || Empty | ||
+ | |} | ||
− | |||
− | |||
− | + | To read the bootloader which is stored in the area described as bootcode.bin and save it to the file bootloader, type: | |
+ | jtag> readmem 0xFFF00000 0x0070000 bootloader | ||
+ | To write the bootloader with file u-boot.bin type: | ||
+ | jtag> flashmem 0xFFF00000 u-boot.bin | ||
+ | == Flash Files == | ||
+ | Flash files are available at http://downloads.buffalo.nas-central.org/KB_PPC/revolution/. '''Use these at your own risk.''' | ||
− | + | {{Template:Articles|Kurobox|JTAG}} | |
− | + |
Latest revision as of 16:43, 5 April 2010
![]() |
Contents
Building JTAG tools
Download the tarball from here. It has been patched to work with the Kuro and Linkstation MPC8241 based devices. Building the JTAG tools varies depending on the platform you use. Refer to Umino's installation page (in Japanese) or The Google translation of the page for building and installation instructions for several popular flavors of Linux.
In general, you need to move into the include directory and do a ./configure and make install and then move into the jtag directory and do a ./configure, make, and make install as root. You will also need to copy the data/motorola/mpc8241 directory to /usr/local/share/jtag/.
You can start JTAG tools with the command "jtag".
Attach your JTAG cable and start your Kuro
The cable attaches to the component side of the board. That means you will need to remove the four screws that hold the board in place to attach the cable. Make sure you align pin one on the header with pin one on your cable (usually indicated by a red wire or mark).
Once the cable is attached, reattach the board, snake the cable out of your Kuro and close the case. You can also just leave the case open, but if you get shocked it is your own fault. Plug in your kuro and press the red button on the back and hold it in. Press and release the power button and then release the red button (no, this does not get you into EM mode). The power, disk full, and diag lights will blink all on and then all off indicating (no, not EM mode) that the watchdog timer has been deactivated.
JTAG tools command sequence to flash the bootloader
The following are the commands to prepare the Kuro for data transfer. This sequence assumes you are using one of the JTAG cables described here and it is attached to the primary parallel port.
Start jtag and execute the following commands at the jtag prompt:
jtag> cable parallel 0x378 DLC5 jtag> detect jtag> include motorola/mpc8241/1.2 jtag> endian big jtag> instruction SAMPLE/PRELOAD jtag> shift ir jtag> shift dr jtag> dr jtag> instruction EXTEST jtag> shift ir jtag> initbus mpc824x jtag> detectflash 0xFFC00000
According to the Flash ROM page, the flash map is as follows:
start | Size (HEX) | size | contents |
---|---|---|---|
0xFFC00000 | 0x300000 | 3 MB | Linux/initrd |
0xFFF00000 | 0x070000 | 448 K | bootcode.bin |
0xFFF70000 | 0x010000 | 64K | HDD status (OKOKOK) |
0xFFF80000 | 0x080000 | 512 K | Empty |
To read the bootloader which is stored in the area described as bootcode.bin and save it to the file bootloader, type:
jtag> readmem 0xFFF00000 0x0070000 bootloader
To write the bootloader with file u-boot.bin type:
jtag> flashmem 0xFFF00000 u-boot.bin
Flash Files
Flash files are available at http://downloads.buffalo.nas-central.org/KB_PPC/revolution/. Use these at your own risk.