Difference between revisions of "Boot from USB using u-boot"


From SamyGO
Jump to: navigation, search
(Build OE kernel and rootfs)
m (Prepare USB drive (and optionally TFTP))
 
(25 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
'''Note: This instruction apply and booting only to TV with firmwares listed below!'''
 
'''Note: This instruction apply and booting only to TV with firmwares listed below!'''
  
T-CHL5DEUC, T-CHL5DAUC, T-CHE6AUSC, T-CHE7AUSC, T-CHEAUSC, T-CHL7DAUC, T-CHL7DEUC, T-CHU7DAUC, T-CHU7DEUC
+
T-CHL7DEUC, T-CHEAUSC, T-CHL7DAUC (B650 and B750 series)
  
 
'''This is for advanced users and developers only.'''
 
'''This is for advanced users and developers only.'''
Line 11: Line 11:
 
* Serial connection
 
* Serial connection
 
* Usb disk drive or pen drive (at least 256MB)
 
* Usb disk drive or pen drive (at least 256MB)
* TFTP server outside TV on some host in case using pen drive or optionally in case disk drive
+
* TFTP server outside TV on some host in case if you prefer load kernel from network (Do this only if you want faster kernel load or lack network).
* Regular Linux based system to prepare usb disk/pen drive
+
* Regular Linux based system to prepare usb disk/pen drive (disk drive is preffered for speed)
* Builded rootfs image
+
* Builded rootfs image and kernel.
 +
 
  
 
----
 
----
 
'''Follow steps:'''
 
'''Follow steps:'''
 
=Build OE kernel and rootfs=
 
=Build OE kernel and rootfs=
* Build rootfs image using [http://wiki.samygo.tv/index.php?title=SamyGO_OpenEmbedded SamyGO OE Framework].
 
  
Builded rootfs image is located in '''build-samygo/tmp/deploy/images''' directory. File name looks like '''externalboot-base-rootfs-ssdtv-xxxxxxx.tar.gz'''.
+
Or you can build your self from recent repository:
  
Prebuilded images you can download from here: http://download.samygo.tv/SamyGO%20Open%20Embedded/binaries/
+
* Build rootfs image using [http://wiki.samygo.tv/index.php5?title=SamyGO_OpenEmbedded SamyGO OE Framework].
  
=Prepare USB disk=
+
Builded rootfs image is located in '''build-samygo/tmp/deploy/images''' directory. File name looks like '''externalboot-base-rootfs-ssdtv-b650.tar.gz'''.
 +
 
 +
=Prepare USB drive (and optionally TFTP)=
 
* Partition usb disk/pen drive.
 
* Partition usb disk/pen drive.
  
Line 35: Line 37:
 
Format second partition with '''ext2fsprogs''' as ext3.
 
Format second partition with '''ext2fsprogs''' as ext3.
  
* Unpack rootfs image to linux partition on usb disk/pen drive.
+
* Unpack rootfs image to second partition on usb disk/pen drive with '''root''' rights
 +
 
 +
* '''Follow two steps below only if you want install original samsung software (script can also download image from inside booted tv, but it's preffered download and copy into rootfs)'''
  
Unpack image to second partition with '''root''' rights.
+
* Download [http://wiki.samygo.tv/index.php5?title=Old_%26_Good_Firmwares original firmware file from samsung site] (e.g T-CHL7DEUC.exe for B65x-B75x) and place as is on /home/root
  
* Download [http://wiki.samygo.tv/index.php?title=Old_%26_Good_Firmwares firmware upgrade file] (e.g T-CHL7DEUC.exe for B65x-B75x) and place as is on /home/root
+
* Download LaunchCLManager.zip from [https://www.dropbox.com/s/d3imer2aj7iyb2c/LaunchCLManager.zip?dl=0 here] and place as is on /home/root
  
* Download [http://download.samygo.tv/SamyGO%20Open%20Embedded/LaunchCLManager.zip LaunchCLManager.zip] and place as is on /home/root
+
* Get proper kernel image:
  
=TFTP server for kernel load=
+
Find proper kernel image in '''build-samygo/tmp/deploy/images''' or download from http://download.samygo.tv/SamyGO%20Open%20Embedded/binaries/ .
* Put kernel image to TFTP service directory. (or /tftpboot directory. on my NAS it is on /opt/tftpboot)
 
  
Note: Do this only if you want faster kernel load image.
+
It is: '''uImage-2.6.18.8-r0-ssdtv.multi-config-multi-config-b650.bin'''. (it's for B750 too)
  
* Find proper kernel image in '''build-samygo/tmp/deploy/images'''.
+
* Put kernel image to proper place:
It's like: '''uImage-2.6.18.8-r0-ssdtv.multi-config-multi-config-bXXX.bin'''.
 
  
For firmwares:
+
==TFTP kernel load method==
  
T-CHE7AUSC, T-CHEAUSC, T-CHL7DAUC, T-CHL7DEUC, T-CHU7DAUC, T-CHU7DEUC - use '''b650'''
+
Copy kernel image into root directory of TFTP service directory like '''/tftpboot''' directory, or for NAS it is on '''/opt/tftpboot''' .
  
T-CHE6AUSC - use '''b6000'''
+
And rename kernel image to '''uImage''' .
  
T-CHL5DEUC, T-CHL5DAUC - use '''b550'''
+
==USB kernel load method==
  
* Copy and rename it to '''uImage''' into root directory of TFTP service or on FAT partition if you are not using TFTP way.
+
Put kernel image on FAT partition (first).
  
* Enable [http://wiki.samygo.tv/index.php?title=Enable_Serial_Console_on_non_CI%2B_Devices serial debug console].
+
And rename kernel image to '''uImage''' .
  
* Enter [http://wiki.samygo.tv/index.php?title=Getting_access_to_u-boot u-boot] prompt shell.
+
=U-Boot shell=
 +
* Enable [http://wiki.samygo.tv/index.php5?title=Enable_Serial_Console_on_non_CI%2B_Devices serial debug console].
  
* Set variables and execute commands in u-boot shell to boot linux kernel.
+
* Enter [http://wiki.samygo.tv/index.php5?title=Getting_access_to_u-boot u-boot] prompt shell.
  
 
=Booting TV=
 
=Booting TV=
You can boot kernel and rootfs from any source (USB, TFTP or NFS)
+
You can load and boot kernel from USB or TFTP:
Here few scenario:
 
 
   
 
   
 
==TFTP==
 
==TFTP==
Line 88: Line 90:
  
 
where /dev/sda2 is linux rootfs.
 
where /dev/sda2 is linux rootfs.
uImage can be taken from TV kernel partition (see [http://wiki.samygo.tv/index.php?title=Dumping_and_Flashing_images_by_hand Dumping and Flashing images by hand]) but it must have added uboot header.
 
mkimage -A arm -O linux -T kernel -a 0x60008000 -e 0x60008000 -C none -n "Original Samsung Kernel" -d ./bml5.img uImage
 
 
Without header u-boot will trigger error: Bad Magic Number
 
 
  
 
==NFS==
 
==NFS==
Line 98: Line 95:
  
 
==='''Prepare rootfs and kernel'''===
 
==='''Prepare rootfs and kernel'''===
* [[#Prepare_USB_disk]], or you can simply extract rootfs.tar.gz from OE on your NAS directory:
+
* [[#Prepare_USB_drive_.28and_optionally_TFTP.29|Prepare USB drive]], or you can simply extract rootfs.tar.gz from OE on your NAS directory:
 
(i use /mnt/disk1/TV_rootfs for filesystem)
 
(i use /mnt/disk1/TV_rootfs for filesystem)
 
  cd /mnt/disk1/TV_rootfs
 
  cd /mnt/disk1/TV_rootfs
Line 125: Line 122:
  
 
* set network variables to load rootfs
 
* set network variables to load rootfs
  setenv bootargs root=/dev/nfs rw nfsroot=192.168.1.200:/mnt/usbdisk3 rootpath=/home/root ip=192.168.1.102:192.168.1.200:192.168.1.1:255.255.255.0:LS-GL984:eth0:off console=ttyS1
+
  setenv bootargs root=/dev/nfs rw nfsroot=192.168.1.200:/mnt/disk1/TV_rootfs rootpath=/home/root ip=192.168.1.102:192.168.1.200:192.168.1.1:255.255.255.0:LS-GL984:eth0:off console=ttyS1
  
 
Now you have to boot kernel. Choose method you prefer (use NFS or TFTP)
 
Now you have to boot kernel. Choose method you prefer (use NFS or TFTP)
Line 140: Line 137:
 
Where rootpath of OE kernel is /home/root
 
Where rootpath of OE kernel is /home/root
  
==Starting TV software==
+
==Starting main Samsung TV software==
  
 
After boot system, login over serial console as root and execute followed commands:
 
After boot system, login over serial console as root and execute followed commands:
Line 151: Line 148:
 
   
 
   
 
  --- Installer of Original Samsung Software ---
 
  --- Installer of Original Samsung Software ---
  --- SamyGO http://samygo.sourceforge.net  ---
+
  --- SamyGO http://www.samygo.tv ---
 
 
   
 
   
 
  Select proper firmware for your TV:
 
  Select proper firmware for your TV:
 
   
 
   
  1. T-CHE6AUSC
+
  1. T-CHL7DEUC
  2. T-CHE7AUSC
+
  2. T-CHEAUSC
  3. T-CHEAUSC
+
  3. T-CHL7DAUC
4. T-CHL5DAUC
 
5. T-CHL5DEUC
 
6. T-CHL7DAUC
 
7. T-CHL7DEUC
 
8. T-CHU7DAUC
 
9. T-CHU7DEUC
 
 
   
 
   
 
  Choice:
 
  Choice:
Line 178: Line 168:
 
<br>
 
<br>
 
<br>
 
<br>
--[[User:Juzis28|Juzis28]] 13:57, 1 December 2010 (UTC)
 

Latest revision as of 06:49, 13 October 2014

Note: This instruction apply and booting only to TV with firmwares listed below!

T-CHL7DEUC, T-CHEAUSC, T-CHL7DAUC (B650 and B750 series)

This is for advanced users and developers only.


Requirements:

  • Serial connection
  • Usb disk drive or pen drive (at least 256MB)
  • TFTP server outside TV on some host in case if you prefer load kernel from network (Do this only if you want faster kernel load or lack network).
  • Regular Linux based system to prepare usb disk/pen drive (disk drive is preffered for speed)
  • Builded rootfs image and kernel.



Follow steps:

Build OE kernel and rootfs

Or you can build your self from recent repository:

Builded rootfs image is located in build-samygo/tmp/deploy/images directory. File name looks like externalboot-base-rootfs-ssdtv-b650.tar.gz.

Prepare USB drive (and optionally TFTP)

  • Partition usb disk/pen drive.

Partition drive using fdisk or other tool.

First partition FAT type. It will be usefull or needed if you don't have network on tv. Second partition set as Linux type.

Format first partition with mtools or other tool as VFAT type filesystem. Format second partition with ext2fsprogs as ext3.

  • Unpack rootfs image to second partition on usb disk/pen drive with root rights
  • Follow two steps below only if you want install original samsung software (script can also download image from inside booted tv, but it's preffered download and copy into rootfs)
  • Download LaunchCLManager.zip from here and place as is on /home/root
  • Get proper kernel image:

Find proper kernel image in build-samygo/tmp/deploy/images or download from http://download.samygo.tv/SamyGO%20Open%20Embedded/binaries/ .

It is: uImage-2.6.18.8-r0-ssdtv.multi-config-multi-config-b650.bin. (it's for B750 too)

  • Put kernel image to proper place:

TFTP kernel load method

Copy kernel image into root directory of TFTP service directory like /tftpboot directory, or for NAS it is on /opt/tftpboot .

And rename kernel image to uImage .

USB kernel load method

Put kernel image on FAT partition (first).

And rename kernel image to uImage .

U-Boot shell

Booting TV

You can load and boot kernel from USB or TFTP:

TFTP

Set network variables first:

setenv ipaddr 192.168.1.100;setenv gatewayip 192.168.1.1;setenv serverip 192.168.1.200

where first IP is TV, second gateway is not important in this case, third is address of TFTP server.

Boot linux kernel over TFTP and rootfs from USB ext3 partition:

setenv bootargs root=/dev/sda2 console=ttyS1;tftp;bootm

USB

Boot linux kernel from USB FAT partition, rootfs from USB ext3 partition:

setenv bootargs root=/dev/sda2 rootdelay=1 console=ttyS1;usb start;fatload usb 0 61000000 uImage;bootm

where /dev/sda2 is linux rootfs.

NFS

If you have NFS server on your home network working, you can boot file system for TV (rootfs) and kernel from OE over NFS!

Prepare rootfs and kernel

  • Prepare USB drive, or you can simply extract rootfs.tar.gz from OE on your NAS directory:

(i use /mnt/disk1/TV_rootfs for filesystem)

cd /mnt/disk1/TV_rootfs
cp /<path to>/rootfs.tar.gz /mnt/disk1/TV_rootfs
tar xzf rootfs.tar.gz
  • Copy kernel file (uImage) to /mnt/disk1/TV_rootfs
 cp /<path to>/uImage /mnt/disk1/TV_rootfs
  • Edit exports to enable your rootfs and uImage on NFS

If you use filesystem on USB, attached to NAS:

root@LS-GL984:~# cat /etc/exports
/mnt/usbdisk3 192.168.1.100/255.255.255.0(rw,async,all_squash,anonuid=99,anongid=99,no_subtree_check)

If you use filesystem on NAS directory:

root@LS-GL984:~# cat /etc/exports
/mnt/disk1/TV_rootfs 192.168.1.100/255.255.255.0(rw,async,all_squash,anonuid=99,anongid=99,no_subtree_check)

where 192.168.1.100 is my TV IP. 255.255.255.0 is submask, /mnt/usbdisk3 is my USB with TVs file system, /mnt/disk1/TV_rootfs - path to rootfs and kernel on NAS directory.

Boot kernel and rootfs over network

  • Enter to u-boot promt.
  • set network variables to load kernel
setenv ipaddr 192.168.1.100;setenv gatewayip 192.168.1.1;setenv serverip 192.168.1.200
  • set network variables to load rootfs
setenv bootargs root=/dev/nfs rw nfsroot=192.168.1.200:/mnt/disk1/TV_rootfs rootpath=/home/root ip=192.168.1.102:192.168.1.200:192.168.1.1:255.255.255.0:LS-GL984:eth0:off console=ttyS1

Now you have to boot kernel. Choose method you prefer (use NFS or TFTP)

  • load kernel over NFS and start booting TV
nfs 0x61000000 192.168.1.200:/disk1/TV_rootfs/uImage;bootm
  • load kernel over TFTP and start booting TV
tftp;bootm


P.s. structure of commandline should for NFS should be:

setenv bootargs root=/dev/nfs rw nfsroot=${serverip} rootpath=${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:eth0:off  console=ttyS1

Where rootpath of OE kernel is /home/root

Starting main Samsung TV software

After boot system, login over serial console as root and execute followed commands:

  • Install Samsung original software:
samsung-install.sh

Choose your firmware version:

root@localhost:~# samsung-install.sh

--- Installer of Original Samsung Software ---
--- SamyGO http://www.samygo.tv ---

Select proper firmware for your TV:

1. T-CHL7DEUC
2. T-CHEAUSC
3. T-CHL7DAUC

Choice:

Wait while TV installs firmware. It is quite long process, be patient.

  • Start Samsung original software:
samsung-start.sh

Done!

NB! Kernel from OE does not support NAND writing and it does not help to restore bricked device.