This is my success story unbricking an IPBox 910HD (CubeRevo mini2 board). This has the STi7109 cut30 CPU. Thanks a lot to YLG80 for making this possible in the first place, without his great work on all this I would still have an IPBox brick laying around!
Tools used:
FT4232H micro module
A couple of Macbook Pro's
UC232 - USB -> serial interface from ATEN (guess the serial ports on the FT4232 coule be used too)
RS232 nullmodem cable
Several wires with single DIL connectors
Bricked IPBox 910HD
Fedora 14 (fully updated)
STLinux 2.4 (fully updated)
To make the FT4232H module into a ST Micro Connect Lite clone and wire it all up, read the great guide here from YLG80.
Now, when everything is wired up and loaded, first off you need a U-Boot ELF file. Either grab some of the precompiled ones from the STLinux 2.3 distro (the 2.4 distro do not have them yet), or compile your own U-Boot files. My receiver did not give out any output from the serial port when I tried the precompiled ones, so I had to compile my own from the U-Boot sources included with the STLinux 2.4 distro. Follow these procedures to avoid files not found errors etc, in terminal:
Code:
--------------------------------------------------------------------------------
su export PATH=/opt/STM/STLinux-2.4/devkit/sh4/bin:$PATH cd /opt/STM/STLinux-2.4/devkit/sources/u-boot/u-boot-sh4 make distclean make mb442_27_config make
--------------------------------------------------------------------------------
Where mb442_27_config have to match whatever config suits your board best. Look inside the Makefile (scroll down almost at the bottom) to see all SH4 supported boards. I had to do some modifications to the mb442 header file too. The header is found in /opt/STM/STLinux-2.4/devkit/sources/u-boot/u-boot-sh4/include/configs/mb442.h The modifications I had to make to have it working with my board was to make it use UART3 instead of UART2. By default it sends console output to the first serial port, on my board that port is used by the front processor (I believe) and the second port UART3 (/dev/ttyAS1) is the RS232 serial port on the backside of the STB. The other changes I made was changing CFG_SDRAM_SIZE to 0x080000000 (it was 0x040000000) and CFG_MAX_FLASH_SECT to 256 (was 128 I think). I know these changes can actually be added to the Makefile too adding them as parameters to the board config, but I did it the quick way and edited the mb442.h. If the compilation completed successfully you should now have 4 new files in your directory. uboot uboot.bin uboot.map and uboot.srec. The file we want here is uboot, which is the ELF file. To keep things nice and tidy move these files to the ...target/u-boot folder. Code:
--------------------------------------------------------------------------------
mv u-boot* /opt/STM/STLinux-2.4/devkit/sh4/target/boot/u-boot/
--------------------------------------------------------------------------------
open a new tab in your terminal (keeping things tidy, remember?) and: Code:
--------------------------------------------------------------------------------
export PATH=/opt/STM/STLinux-2.4/devkit/sh4/bin:$PATH
--------------------------------------------------------------------------------
Make sure everything is connected as it should be and turn the STB on, then: Code:
--------------------------------------------------------------------------------
st40load_gdb -t STMCLT1000_A:mb442:st40 -b /opt/STM/STLinux-2.4/devkit/sh4/target/boot/u-boot/u-boot
--------------------------------------------------------------------------------
Now you should see some interesting things happening, U-Boot should be loaded into your receivers memory, now just type c to continue and watch the serial console output (you have hopefully hooked up the STB to a serial port running a terminal emulator already). The generic (and stripped I may say) U-Boot that I compiled did not have the network drivers compiled into it that my STB has (RTL8201) so I had to use ymodem to upload a uboot.bin to memory and write that to flash (I made that uboot.bin out from the uboot.img file for my receiver, just remember to remove the header information first, that is how I bricked mine in the first place!) In U-Boot console: Code:
--------------------------------------------------------------------------------
loady (default it loads to 0x84000000, start ymodem upload with your uboot.bin from the terminal emulator) protect off 1:0-2 erase all cp.b 0x84000000 0xA0000000 0x41000 protect on 1:0-2 reset
--------------------------------------------------------------------------------
That is pretty much how I unbricked my STB anyway... took a lot of trial and error to get it all right but hey.. nobody is born with JTAG information already present in the brain right?