Monday, June 9, 2014

Flash an Tizen ui Image to Device



Flash an Image to Device


Instructions for Reference Devices PQ and 210The instructions for flashing depend on what type of device you're using. Instructions are available for the following devices:

Instructions for Reference Devices PQ and 210

Downloads

Download or build an image such as one from http://download.tizen.org/releases/2.0/tizen-2.0_20130218.10/images/ which will be in a *.tar.gz file
If you have Ref.Device-PQ device, use RD-PQ-tizen-2.0_20130218.10.tar.gz instead of RD-210-tizen-2.0_20130218.10.tar.gz in following installation guide.

Installation

Ubuntu

You can add the Tizen tools repository by adding the following line to your repositories list.
  • Edit repository source list: 

    $ sudo vi /etc/apt/sources.list
  • Append the following line, save and quit.
    deb http://download.tizen.org/tools/latest-release/Ubuntu_12.10 /
  • Installing the tool
    $ sudo apt-get update
    $ sudo apt-get install lthor
  • Troubleshooting lthor on Ubuntu, including failures to connect:

OpenSUSE

  • Add the Tizen tools repository. 

    $ sudo zypper addrepo http://download.tizen.org/tools/latest-release/openSUSE_12.2/
  • Install the tool.
    $ sudo zypper refresh
    $ sudo zypper install lthor

Fedora

  • Add the Tizen tools repository.  

    $ sudo zypper addrepo http://download.tizen.org/tools/latest-release/Fedora_17/tools.repo
  • Install the tool.
    $ sudo yum makecache
    $ sudo yum install lthor
Note: You may need to use '--nogpgcheck' to install or upgrade the package.

Flashing the Tizen image

1 Boot the phone into download mode.

  1. Make sure the phone is powered-off.
  2. Press <volume down> + <power> keys simultaneously.
  3. The phone will boot up and the download mode image will be displayed on the phone.

2 Connect the phone to the Linux PC with a USB cable.

3 Flashing image

  1. Execute lthor in a console on the Linux PC as follows. Make sure you're running lthor in 32-bit environment (if flash hangs, try unzipping and flashing the *.tar file)
IMPORTANT NOTICE for 1.0 Larkspur Ref.Device-210 device users
Before flashing a new Tizen 2.0 images, you must upgrade device's partition structure. Tizen 1.0 Larkspur use the MBR/EBR disk, but Tizen 2.0 use the GPT instead. Once partition structure migrated, no more upgrade required.                                      
NOTE: DOWNGRADING FROM TIZEN 2.0 TO 1.0 LARKSPUR IS NOT SUPPORTED. 
Step 1. Download partition migration image. http://download.tizen.org/releases/system/Tizen_Disk_Migration.tarhttp://download.tizen.org/releases/system/Tizen_Ref.Device-210_System_20130207_1.tar
Step 2. Flashing migration image before new 2.0 image.           
$sudo ./lthor Tizen_Disk_Migration.tar
Step 3. After migration complete, the phone will automatically rebooted and back to download mode again.
Step 4. Flashing new system image
$sudo ./lthor Tizen_Ref.Device-210_System_20130207_1.tar
Step 5. Wait until all files are downloaded on to the phone. Now your device is ready to download 2.0 images.
$ sudo ./lthor RD-210-tizen-2.0_20130218.10.tar.gz
or
$ sudo ./lthor RD-210-tizen-2.0_20130218.10.tar

4 Wait until files are downloaded

Wait until all files are downloaded on to the phone. The phone will be automatically rebooted after successful downloading. NOTE: 2.0 image does not contain the hardware acceleration binaries. To enable hardware acceleration, you need to install Mali DDK.  

Tips

ssh into target device (USB Debugging Mode)

Once the phone is flashed and booted up, change the usb mode to "USB debugging" by doing this:  
  1. Open the settings application
  2. Press "All" to show all the settings items
  3. Choose "USB utilities"
  4. Choose "USB debugging"
Then the device will export a usbnet device, it's addr: 192.168.129.3 In your host, configure your ip address to match that of usb0:
# ifconfig usb0 192.168.129.4
Then you can ssh into the target device (root, pwd: tizen):
# ssh root@192.168.129.3

ssh into target device (Using SDB)

With the Tizen SDK properly installed and "sdb" added to your path environment variable,
# sdb -d shell

More

Using 3D Acceleration

Tizen reference devices use the Mali400 MP4 for 3D acceleration to guarantee the graphics performance. To install the Mali DDK package, perform the following procedure:
  1. Download Mail DDK by following the link below: https://source.tizen.org/mali-ddk-tizen
  2. Connect the target device to the host computer through a USB cable.
  3. Switch to Tizen tools directory by executing the following command:
host>cd ~/tizen-sdk/tools
  1. Copy hw_accel.tar.gz file from the host computer to the target device by executing the following commands:
host> sdb root on
host> sdb -d push libtbm-*.rpm /root/
host> sdb -d push libump-*.rpm /root/
host> sdb -d push opengl-es-*.rpm /root/
  1. Install hw_accel RPM package by executing the following commands:
host>sdb shell
target>cd /root/
target>rpm -e --nodeps opengl-es-virtual-drv
target>rpm -Uvh --force *.rpm
  1. Sychronize and reboot the device by executing the following commands:
target>sync
target>reboot -f

Instructions for Intel-based devices

Copy to a USB or other storage device

Tizen Common and IVI images require at least 4 GB of storage capacity. There are two ways to copy the image to a device (the old/slow and the new/fast methods.)
The old/slow method uses the standard Unix 'dd' tool (works on Linux, OS X, etc.):
$ bzcat ivi-XYZ.raw.bz2 | dd of=/dev/sdX flag=sync conv=sparse
Before running this command find the name of your storage device using "sudo fdisk -l" or looking at the output of the "dmesg" or "lsblk" commands. Also, confirm that the USB stick is not mounted, or unmount it if needed.
For Windows systems, you will need a tool like rawrite.exe
Flashing may take 10-20 minutes depending on the speed of your storage device.
The new/fast method uses bmaptool, which is a new tool for flashing Tizen IVI images. This tool copies the images four to eight times faster and is more reliable (for example, it checks data SHA1 checksums, makes sure your/dev/sdX is not mounted, etc). Tool documentation is located here:
After installing bmaptool flash an image using:
$ bmaptool copy tizen-XYZ.raw.bz2 /dev/sdX
Note: If you get the error "bmaptool: ERROR: cannot open block device '/dev/sdb' in exclusive mode: [Errno 16] Device or resource busy: '/dev/sdX'", you need to unmount the USB stick. Example: umount /media/usb_volume.
Or copy directly from a URL (providing you have downloaded the image and its bmap file to the same directory):
$ bmaptool copy http://download.tizen.org/..blah.../tizen-XYZ.raw.bz2 /dev/sdX

Boot from USB

  1. Flash the image to the USB stick using bmaptool or dd (see above).
  2. Insert the USB stick into the device.
  3. Power on the device.
  4. Press "<F2>" to access the BIOS menu.
  5. Change Boot Priority to make it boot from the removable USB stick.
  6. Press "Enter" to boot the image from the USB disk.

Install system to HDD or eMMC

For this, you will need two USB drives: one to boot from and one containing the image you wish to install.
  1. Prepare one bootable USB drive with Linux OS (Tizen itself or any regular Linux distribution will do)
  2. Copy the image to the second USB drive (you do not need to decompress it.)
  3. Insert both USB drives into the device that connects to HD.
  4. Press "Del" or "<F2>" to access the BIOS menu.
  5. Change the Boot Priority to boot from the removable USB drive.
  6. Live boot into the system in USB
  7. Launch a terminal or switch to console in live boot environment.
  8. Login as root.
  9. Check the disk partition using “fdisk –l”. You should see some information about /dev/sda, /dev/sdb. On systems with eMMC storage (like Crossville or the Intel NUC DE3815TYKHE), the eMMC storage will show up as /dev/mmcblk0.
  10. Ensure that the storage device you wis to install to is not mounted. For that, use something like: umount /dev/sda
  11. Copy the Tizen image to HD by the command: (ATTENTION: this will completely erase your HDD/SSD)
     bzcat tizen-XXX.raw.bz2 | dd of=/dev/sda bs=512k oflag=sync conv=sparse
  12. The Tizen image is installed to the system storage.
  13. Remove the USB and reboot.

No comments:

Post a Comment