Difference between revisions of "Recovery of Bricked Device"


From SamyGO
Jump to: navigation, search
m
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
==If you make bad Service Menu setting==
 +
Than you needed to read [[UnBricking TV by EEPROM Reset]] page.
 +
 
==If you write bad boot.img to tv.==
 
==If you write bad boot.img to tv.==
  
Line 16: Line 19:
  
 
== Restore TV from u-boot ==
 
== Restore TV from u-boot ==
Go [http://wiki.samygo.tv/index.php?title=Repair_TV_from_u-boot here]
+
Go [http://wiki.samygo.tv/index.php5?title=Repair_TV_from_u-boot here]
  
 
== Restore firmware (exe.img, appdata.img) images (CI only) ==
 
== Restore firmware (exe.img, appdata.img) images (CI only) ==
Line 25: Line 28:
 
* Change setting for your RS232C interface to "'''debug'''" ( Control -> Sub Option -> RS-232 Jack -> [ '''Debug''' | UART | Logic ] )
 
* Change setting for your RS232C interface to "'''debug'''" ( Control -> Sub Option -> RS-232 Jack -> [ '''Debug''' | UART | Logic ] )
 
* Change setting for Watchdog to "'''off'''", so that the device doesn't reboot while you are in uBoot menu ( Control -> Sub Option -> Watchdog -> [ on | '''off''' ] )<br><br>
 
* Change setting for Watchdog to "'''off'''", so that the device doesn't reboot while you are in uBoot menu ( Control -> Sub Option -> Watchdog -> [ on | '''off''' ] )<br><br>
* Make or buy '''Service Cable''' - [http://wiki.samygo.tv/index.php?title=Enable_Serial_Console_on_non_CI%2B_Devices#The_Ex-Link_.28serial.29_cable ExLink]
+
* Make or buy '''Service Cable''' - [http://wiki.samygo.tv/index.php5?title=Enable_Serial_Console_on_non_CI%2B_Devices#The_Ex-Link_.28serial.29_cable ExLink]
  
* You need images to restore (or dumps of partitions you made before. How to make dumps [http://wiki.samygo.tv/index.php?title=Dumping_and_Flashing_images_by_hand read here].)<br>
+
* You need images to restore (or dumps of partitions you made before. How to make dumps [http://wiki.samygo.tv/index.php5?title=Dumping_and_Flashing_images_by_hand read here].)<br>
* If you use firmware files from firmware upgrade file (you can download it from [http://wiki.samygo.tv/index.php?title=Old_%26_Good_Firmwares here], make sure, that you have UNxored exe.img and appdata.img on USB/update (NOT exe.img.enc and NOT appdata.img.enc). How to unXOR images read [http://wiki.samygo.tv/index.php?title=Playing_with_Firmware_Images#Decryption.2FEncrpytion_of_Image here.]
+
* If you use firmware files from firmware upgrade file (you can download it from [http://wiki.samygo.tv/index.php5?title=Old_%26_Good_Firmwares here], make sure, that you have UNxored exe.img and appdata.img on USB/update (NOT exe.img.enc and NOT appdata.img.enc). How to unXOR images read [http://wiki.samygo.tv/index.php5?title=Playing_with_Firmware_Images#Decryption.2FEncrpytion_of_Image here.]
 
=== Prepare USB ===
 
=== Prepare USB ===
 
* 1. Format USB to FAT32
 
* 1. Format USB to FAT32
 
* 2. Copy required images to /update directory on USB. <br>
 
* 2. Copy required images to /update directory on USB. <br>
 
* 3. Place exe.'''img''' and appdata.'''img''' to USB/update<br>
 
* 3. Place exe.'''img''' and appdata.'''img''' to USB/update<br>
* 4. Reboot TV, go to [http://wiki.samygo.tv/index.php?title=Enable_Serial_Console_on_non_CI%2B_Devices#Debug_Menu_.28On_CI.2B_Devices_Too.29 TOP Debug menu]
+
* 4. Reboot TV, go to [http://wiki.samygo.tv/index.php5?title=Enable_Serial_Console_on_non_CI%2B_Devices#Debug_Menu_.28On_CI.2B_Devices_Too.29 TOP Debug menu]
 
* 5. Enter Ctrl+c to get to console. TV from this moment does not respond to RC.
 
* 5. Enter Ctrl+c to get to console. TV from this moment does not respond to RC.
 
* 6. Mount USB disk with next command
 
* 6. Mount USB disk with next command
 +
sh +x /sbin/usb_start.sh
 +
 +
If you get error (in some models) about not existing file, try:
 
  sh +x /sbin/start_usb.sh
 
  sh +x /sbin/start_usb.sh
 +
 
* 7. Check if USB is mounted
 
* 7. Check if USB is mounted
 
  cd dtv/usb
 
  cd dtv/usb
Line 61: Line 68:
 
  fsrrestore /dev/bml0/8 exe.img;
 
  fsrrestore /dev/bml0/8 exe.img;
 
  fsrrestore /dev/bml0/9 appdata.img;
 
  fsrrestore /dev/bml0/9 appdata.img;
fsrrestore /dev/bml0/10 exe.img;
 
fsrrestore /dev/bml0/11 appdata.img;
 
  
 
* 13. Mount the updated images
 
* 13. Mount the updated images
Line 74: Line 79:
  
 
* 15. If you need restore some other partitions, you can do it as example:
 
* 15. If you need restore some other partitions, you can do it as example:
  cat /dev/usb/sda1/update/u-boot.bin > /dev/bml0/2
+
  cat /dtv/usb/sda1/update/u-boot.bin > /dev/bml0/2
  cat /dev/usb/sda1/update/fnw.bin > /dev/bml0/4
+
  cat /dtv/usb/sda1/update/fnw.bin > /dev/bml0/4
  cat /dev/usb/sda1/update/Image > /dev/bml0/5
+
  cat /dtv/usb/sda1/update/Image > /dev/bml0/5
  cat /dev/usb/sda1/update/rootfs.img > /dev/bml0/6
+
  cat /dtv/usb/sda1/update/rootfs.img > /dev/bml0/6
  cat /dev/usb/sda1/update/boot.img > /dev/bml0/7
+
  cat /dtv/usb/sda1/update/boot.img > /dev/bml0/7
  
 
or you can use bml tool:
 
or you can use bml tool:
  bml.restore /dev/usb/sda1/update/u-boot.bin /dev/bml0/2
+
  bml.restore /dev/bml0/2 /dtv/usb/sda1/update/u-boot.bin  
  bml.restore /dev/usb/sda1/update/fnw.bin /dev/bml0/4
+
  bml.restore /dev/bml0/4 /dtv/usb/sda1/update/fnw.bin  
  bml.restore /dev/usb/sda1/update/Image /dev/bml0/5
+
  bml.restore /dev/bml0/5 /dtv/usb/sda1/update/Image  
  bml.restore /dev/usb/sda1/update/rootfs.img /dev/bml0/6
+
  bml.restore /dev/bml0/6 /dtv/usb/sda1/update/rootfs.img  
  bml.restore /dev/usb/sda1/update/boot.img /dev/bml0/7
+
  bml.restore /dev/bml0/7 /dtv/usb/sda1/update/boot.img
  
 
== Make dumps ==
 
== Make dumps ==
  bml.dump /dev/bml0/2 /dev/usb/sda1/dump/bml0_2_dump
+
It is good to have dumps of partitions on TV before you start playing with flashing. You need USB Fat32, working console (over ExLink or telnet).
  bml.dump /dev/bml0/3 /dev/usb/sda1/dump/bml0_3_dump
+
 
  bml.dump /dev/bml0/4 /dev/usb/sda1/dump/bml0_4_dump
+
How is your USB recognized you can see with command
  bml.dump /dev/bml0/5 /dev/usb/sda1/dump/bml0_5_dump
+
df -h
  bml.dump /dev/bml0/6 /dev/usb/sda1/dump/bml0_6_dump
+
Here is output of LE40B653T5W:
  bml.dump /dev/bml0/7 /dev/usb/sda1/dump/bml0_7_dump
+
# df -h
  bml.dump /dev/bml0/8 /dev/usb/sda1/dump/bml0_8_dump
+
Filesystem                Size      Used Available Use% Mounted on
  bml.dump /dev/bml0/9 /dev/usb/sda1/dump/bml0_9_dump
+
  /dev/tbml6                3.1M      3.1M        0 100% /
  bml.dump /dev/bml0/10 /dev/usb/sda1/dump/bml0_10_dump
+
  none                    10.0M      8.0k    10.0M  0% /dtv
  bml.dump /dev/bml0/11 /dev/usb/sda1/dump/bml0_11_dump
+
/dev/tbml7              896.0k    896.0k        0 100% /mtd_boot
 +
  none                    10.0M        0    10.0M  0% /mtd_ram
 +
/dev/stl0/14            11.0M    10.8M    208.0k  98% /mtd_rwarea
 +
  /dev/tbml8              60.0M    51.2M      8.8M  85% /mtd_exe
 +
/dev/tbml9              28.6M    28.6M        0 100% /mtd_appdata
 +
  /dev/stl0/13            189.0M    134.3M    54.7M  71% /mtd_tlib
 +
  /dev/stl0/15            50.0M      7.3M    42.6M  15% /mtd_contents
 +
  /dev/stl0/16            87.9M      9.5M    78.4M  11% /mtd_down
 +
  /dev/stl0/12            149.0M    224.0k    148.8M  0% /mtd_wiselink
 +
  /dev/stl0/17            87.0M    176.0k    86.8M  0% /mtd_swu
 +
  /dev/sda1              298.0k    298.0k        0 100% /dtv/usb/sda1
  
How is your USB recognised you can see
+
Make dumps by commands:
  mount
+
  bml.dump /dev/bml0/1 /dtv/usb/sda1/dump/bml0_1_dump
 +
bml.dump /dev/bml0/2 /dtv/usb/sda1/dump/bml0_2_dump
 +
bml.dump /dev/bml0/3 /dtv/usb/sda1/dump/bml0_3_dump
 +
bml.dump /dev/bml0/4 /dtv/usb/sda1/dump/bml0_4_dump
 +
bml.dump /dev/bml0/5 /dtv/usb/sda1/dump/bml0_5_dump
 +
bml.dump /dev/bml0/6 /dtv/usb/sda1/dump/bml0_6_dump
 +
bml.dump /dev/bml0/7 /dtv/usb/sda1/dump/bml0_7_dump
 +
bml.dump /dev/bml0/8 /dtv/usb/sda1/dump/bml0_8_dump
 +
bml.dump /dev/bml0/9 /dtv/usb/sda1/dump/bml0_9_dump
 +
bml.dump /dev/bml0/10 /dtv/usb/sda1/dump/bml0_10_dump
 +
bml.dump /dev/bml0/11 /dtv/usb/sda1/dump/bml0_11_dump
  
 
Finish!
 
Finish!
  
--[[User:Juzis28|Juzis28]] 19:11, 28 December 2010 (UTC)
+
--[[User:Juzis28|Juzis28]] 09:01, 1 January 2011 (UTC)

Latest revision as of 20:40, 7 October 2011

If you make bad Service Menu setting

Than you needed to read UnBricking TV by EEPROM Reset page.

If you write bad boot.img to tv.

A) Connect to TV by ex-link cable.

B) Enable USB support. Command "/lib/modules/rc.local"

C) Enable NAND support. Commands

 # insmod /lib/modules/fsr.ko
 # insmod /lib/modules/rfs.ko
 # insmod /lib/modules/fsr_stl.ko

D) Erase old bad image. Command "bml.erase /dev/bml0/7"

E) Write original (work) image. Command "bml.restore /dev/bml0/7 /dtv/usb/sd1/boot.img"

It all!!! Happy new Year.

Restore TV from u-boot

Go here

Restore firmware (exe.img, appdata.img) images (CI only)

Before to start

To restore TV you need:

  • Settings in Service menu are set before TV broke - do it now, if your TV isn`t broken - insurance for future :)
  • Enter Service Menu ( quickly push [INFO] [MENU] [MUTE] [POWER] on your remote control )
  • Change setting for your RS232C interface to "debug" ( Control -> Sub Option -> RS-232 Jack -> [ Debug | UART | Logic ] )
  • Change setting for Watchdog to "off", so that the device doesn't reboot while you are in uBoot menu ( Control -> Sub Option -> Watchdog -> [ on | off ] )

  • Make or buy Service Cable - ExLink
  • You need images to restore (or dumps of partitions you made before. How to make dumps read here.)
  • If you use firmware files from firmware upgrade file (you can download it from here, make sure, that you have UNxored exe.img and appdata.img on USB/update (NOT exe.img.enc and NOT appdata.img.enc). How to unXOR images read here.

Prepare USB

  • 1. Format USB to FAT32
  • 2. Copy required images to /update directory on USB.
  • 3. Place exe.img and appdata.img to USB/update
  • 4. Reboot TV, go to TOP Debug menu
  • 5. Enter Ctrl+c to get to console. TV from this moment does not respond to RC.
  • 6. Mount USB disk with next command
sh +x /sbin/usb_start.sh

If you get error (in some models) about not existing file, try:

sh +x /sbin/start_usb.sh
  • 7. Check if USB is mounted
cd dtv/usb
ls

You get something like:

log     sda1
  • 8. Check images on USB/update
cd sda1/update 
ls

You get:

Image             exe.img           oneboot.bin       uboot_env.bin
Image_serial      fnw.bin           rootfs.img        validinfo.txt
appdata.img       info.txt          serial_temp       version_info.txt
boot.img          onboot.bin        u-boot.bin
  • 9. Prevent TV from rebooting when exeDSP is stopped
/mtd_boot/MicomCtrl 23
  • 10. Kill exeDSP
killall -9 exeDSP
  • 11. unmount /mtd_exe/ and /mtd_appdata/
umount /mtd_exe/
umount /mtd_appdata/
  • 12. Write ‘exe.img and appdata.img’ to TV
fsrrestore /dev/bml0/8 exe.img;
fsrrestore /dev/bml0/9 appdata.img;
  • 13. Mount the updated images
mount -t auto /dev/tbml8 /mtd_exe
mount -t auto /dev/tbml9 /mtd_appdata
  • 14. Start exeDSP again (Do not worry if screen is bottom to up, after restart TV you get normal operating TV)
/mtd_exe/rc.local

Flash another partitions from console

  • 15. If you need restore some other partitions, you can do it as example:
cat /dtv/usb/sda1/update/u-boot.bin > /dev/bml0/2
cat /dtv/usb/sda1/update/fnw.bin > /dev/bml0/4
cat /dtv/usb/sda1/update/Image > /dev/bml0/5
cat /dtv/usb/sda1/update/rootfs.img > /dev/bml0/6
cat /dtv/usb/sda1/update/boot.img > /dev/bml0/7

or you can use bml tool:

bml.restore /dev/bml0/2 /dtv/usb/sda1/update/u-boot.bin 
bml.restore /dev/bml0/4 /dtv/usb/sda1/update/fnw.bin 
bml.restore /dev/bml0/5 /dtv/usb/sda1/update/Image 
bml.restore /dev/bml0/6 /dtv/usb/sda1/update/rootfs.img 
bml.restore /dev/bml0/7 /dtv/usb/sda1/update/boot.img

Make dumps

It is good to have dumps of partitions on TV before you start playing with flashing. You need USB Fat32, working console (over ExLink or telnet).

How is your USB recognized you can see with command

df -h

Here is output of LE40B653T5W:

# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/tbml6                3.1M      3.1M         0 100% /
none                     10.0M      8.0k     10.0M   0% /dtv
/dev/tbml7              896.0k    896.0k         0 100% /mtd_boot
none                     10.0M         0     10.0M   0% /mtd_ram
/dev/stl0/14             11.0M     10.8M    208.0k  98% /mtd_rwarea
/dev/tbml8               60.0M     51.2M      8.8M  85% /mtd_exe
/dev/tbml9               28.6M     28.6M         0 100% /mtd_appdata
/dev/stl0/13            189.0M    134.3M     54.7M  71% /mtd_tlib
/dev/stl0/15             50.0M      7.3M     42.6M  15% /mtd_contents
/dev/stl0/16             87.9M      9.5M     78.4M  11% /mtd_down
/dev/stl0/12            149.0M    224.0k    148.8M   0% /mtd_wiselink
/dev/stl0/17             87.0M    176.0k     86.8M   0% /mtd_swu
/dev/sda1               298.0k    298.0k         0 100% /dtv/usb/sda1

Make dumps by commands:

bml.dump /dev/bml0/1 /dtv/usb/sda1/dump/bml0_1_dump
bml.dump /dev/bml0/2 /dtv/usb/sda1/dump/bml0_2_dump
bml.dump /dev/bml0/3 /dtv/usb/sda1/dump/bml0_3_dump
bml.dump /dev/bml0/4 /dtv/usb/sda1/dump/bml0_4_dump 
bml.dump /dev/bml0/5 /dtv/usb/sda1/dump/bml0_5_dump 
bml.dump /dev/bml0/6 /dtv/usb/sda1/dump/bml0_6_dump 
bml.dump /dev/bml0/7 /dtv/usb/sda1/dump/bml0_7_dump 
bml.dump /dev/bml0/8 /dtv/usb/sda1/dump/bml0_8_dump
bml.dump /dev/bml0/9 /dtv/usb/sda1/dump/bml0_9_dump
bml.dump /dev/bml0/10 /dtv/usb/sda1/dump/bml0_10_dump
bml.dump /dev/bml0/11 /dtv/usb/sda1/dump/bml0_11_dump

Finish!

--Juzis28 09:01, 1 January 2011 (UTC)