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


From SamyGO
Jump to: navigation, search
(added manual for root TV over NFS)
Line 16: Line 16:
  
 
----
 
----
 
 
'''Follow steps:'''
 
'''Follow steps:'''
 
+
=Build OE kernel and rootfs=
 
* Build rootfs image using [http://wiki.samygo.tv/index.php?title=SamyGO_OpenEmbedded SamyGO OE Framework].
 
* 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'''.
 
Builded rootfs image is located in '''build-samygo/tmp/deploy/images''' directory. File name looks like '''externalboot-base-rootfs-ssdtv-xxxxxxx.tar.gz'''.
  
 +
=Prepare USB disk=
 
* Partition usb disk/pen drive.
 
* Partition usb disk/pen drive.
  
Line 37: Line 37:
 
Unpack image to second partition with '''root''' rights.
 
Unpack image to second partition with '''root''' rights.
  
* Put kernel image to TFTP service directory.
+
* Download [http://wiki.samygo.tv/index.php?title=Forced_revert_back_to_older_firmware#List_Firmware_links.2C_versions_and_their_ids firmware upgrade file] (e.g T-CHL7DEUC.exe for B65x-B75x) and place as is on /home/root
 +
 
 +
* Download [http://download.samygo.tv/SamyGO%20OE/LaunchCLManager.zip LaunchCLManager.zip] and place as is on /home/root
 +
=TFTP server for kernel load=
 +
* 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.
 
Note: Do this only if you want faster kernel load image.
Line 60: Line 64:
 
* Set variables and execute commands in u-boot shell to boot linux kernel.
 
* Set variables and execute commands in u-boot shell to boot linux kernel.
  
 +
=Booting=
 +
==TFTP==
 
In case use TFTP set network variables first:
 
In case use TFTP set network variables first:
  
  setenv ipaddr 192.168.1.100;setenv gatewayip 192.168.1.1;setenv serverip 192.168.1.2
+
  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.
 
where first IP is TV, second gateway is not important in this case, third is address of TFTP server.
Line 69: Line 75:
  
 
  setenv bootargs root=/dev/sda2 console=ttyS1;tftp;bootm
 
  setenv bootargs root=/dev/sda2 console=ttyS1;tftp;bootm
 
+
==USB==
 
Boot linux kernel (case USB FAT partition):
 
Boot linux kernel (case USB FAT partition):
  
Line 76: Line 82:
 
where /dev/sda2 is linux rootfs.
 
where /dev/sda2 is linux rootfs.
  
 +
==Rootfs over NFS==
 +
If you have NFS server on your home network working, you can boot file system for TV (rootfs from OE)over NFS!
 +
==='''Prepare rootfs'''===
 +
* [[#Prepare_USB_disk]] or you can simply mount rootfs image on NAS directory!
 +
 +
* Attach it to your NFS server
 +
 +
* Write exports for your USB with rootfs on NAS
 +
 +
Here is an example of my Buffalo NAS:<br>
 +
File to edit is /etc/exports
 +
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)
 +
 +
where 192.168.1.100 is my TV IP. 255.255.255.0 is submask, /mnt/usbdisk3 is my USB with TVs filesystem
 +
==='''Boot kernel and rootfs over network'''===
 +
* Enter to u-boot promt
 +
 +
* set network variables for NFS (to load kernel)
 +
setenv ipaddr 192.168.1.100;setenv gatewayip 192.168.1.1;setenv serverip 192.168.1.200
 +
 +
* set network variables for NFS (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
 +
 +
structure of commandline 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
 +
 +
* load kernel and start booting TV
 +
tftp;bootm
 +
 +
==Starting TV software==
 +
 +
After boot system, login over serial console as root and execute followed commands:
 
* Install Samsung original software:
 
* Install Samsung original software:
 
After boot system, login over serial console as root and execute followed command:
 
  
 
  samsung-install.sh
 
  samsung-install.sh

Revision as of 17:06, 30 November 2010

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

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 using pen drive or optionaly in case disk drive
  • Regular Linux based system to prepare usb disk/pen drive
  • Builded rootfs image

Follow steps:

Build OE kernel and rootfs

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

Prepare USB disk

  • Partition usb disk/pen drive.

Partition drive using fdisk or other tool.

First parittion 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 linux partition on usb disk/pen drive.

Unpack image to second partition with root rights.

TFTP server for kernel load

  • 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.

  • Find proper kernel image in build-samygo/tmp/deploy/images.

It's like: uImage-2.6.18.8-r0-ssdtv.multi-config-multi-config-bXXX.bin.

For firmwares:

T-CHE7AUSC, T-CHEAUSC, T-CHL7DAUC, T-CHL7DEUC, T-CHU7DAUC, T-CHU7DEUC - use b650

T-CHE6AUSC - use b6000

T-CHL5DEUC, T-CHL5DAUC - use b550

  • Copy and rename it to uImage into root directory of TFTP service or on FAT partition if you are not using TFTP way.
  • Set variables and execute commands in u-boot shell to boot linux kernel.

Booting

TFTP

In case use 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 (case TFTP):

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

USB

Boot linux kernel (case USB FAT partition):

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

where /dev/sda2 is linux rootfs.

Rootfs over NFS

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

Prepare rootfs

  • Attach it to your NFS server
  • Write exports for your USB with rootfs on NAS

Here is an example of my Buffalo NAS:
File to edit is /etc/exports

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)

where 192.168.1.100 is my TV IP. 255.255.255.0 is submask, /mnt/usbdisk3 is my USB with TVs filesystem

Boot kernel and rootfs over network

  • Enter to u-boot promt
  • set network variables for NFS (to load kernel)
setenv ipaddr 192.168.1.100;setenv gatewayip 192.168.1.1;setenv serverip 192.168.1.200
  • set network variables for NFS (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

structure of commandline 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

  • load kernel and start booting TV
tftp;bootm

Starting TV software

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

  • Install Samsung original software:
samsung-install.sh
  • Start Samsung original software:
samsung-start.sh