Quick guide for odroidxu3

From Tizen Wiki
Jump to: navigation, search

Odroid-XU3 for Tizen 3.0

Prepare Binary

To make a bootable card, you will need to get the files listed before

※ Please put the all files in the same directory

Name Type
bl1.bin.hardkernel binary
bl2.bin.hardkernel.1mb_uboot binary
tzsw.bin.hardkernel binary
sd_fusing.1M.sh shell script
u-boot.bin binary
mkpart_3.0.sh shell script

1-1. Download the pre bootloader binaries (which binaries are supported by hardkernel)

$ wget https://github.com/hardkernel/u-boot/raw/odroidxu3-v2012.07/sd_fuse/hardkernel_1mb_uboot/bl1.bin.hardkernel
$ wget https://github.com/hardkernel/u-boot/raw/odroidxu3-v2012.07/sd_fuse/hardkernel_1mb_uboot/bl2.bin.hardkernel.1mb_uboot
$ wget https://github.com/hardkernel/u-boot/raw/odroidxu3-v2012.07/sd_fuse/hardkernel_1mb_uboot/tzsw.bin.hardkernel
$ wget https://github.com/hardkernel/u-boot/raw/odroidxu3-v2012.07/sd_fuse/hardkernel_1mb_uboot/sd_fusing.1M.sh
$ chmod u+x sd_fusing.1M.sh

1-2. Download the latest u-boot and kernel (tizen-tv_xxxxxxxx.x_tv-boot-armv7l-odroidxu3.tar.gz)

http://download.tizen.org/snapshots/tizen/tv/latest/images/arm-wayland/tv-boot-armv7l-odroidxu3/

1-3. Extract the contents of the image tarball and change the u-boot binary names

$ tar xvf tizen-tv_xxxxxxxx.x_tv-boot-armv7l-odroidxu3.tar.gz
$ mv u-boot-mmc.bin u-boot.bin

1-4. Save this listing into file "mkpart_3.0.sh"

#!/bin/bash

DISK=$1
SIZE=`sfdisk -s $DISK`
SIZE_MB=$((SIZE >> 10))

BOOT_SZ=64
ROOTFS_SZ=3072
DATA_SZ=512
MODULE_SZ=32

let "USER_SZ = $SIZE_MB - $BOOT_SZ - $ROOTFS_SZ - $DATA_SZ - $MODULE_SZ - 4"

BOOT=boot
ROOTFS=rootfs
SYSTEMDATA=system-data
USER=user
MODULE=modules

if [[ $USER_SZ -le 100 ]]
then
	echo "We recommend to use more than 4GB disk"
	exit 0
fi

echo "========================================"
echo "Label          dev           size"
echo "========================================"
echo $BOOT"		" $DISK"1  	" $BOOT_SZ "MB"
echo $ROOTFS"		" $DISK"2  	" $ROOTFS_SZ "MB"
echo $SYSTEMDATA"	" $DISK"3  	" $DATA_SZ "MB"
echo "[Extend]""	" $DISK"4"
echo " "$USER"		" $DISK"5  	" $USER_SZ "MB"
echo " "$MODULE"		" $DISK"6  	" $MODULE_SZ "MB"


MOUNT_LIST=`mount | grep $DISK | awk '{print $1}'`
for mnt in $MOUNT_LIST
do
	umount $mnt
done

echo "Remove partition table..."                                                
dd if=/dev/zero of=$DISK bs=512 count=1 conv=notrunc

sfdisk --unit M $DISK <<-__EOF__
4,$BOOT_SZ,0xE,*
,$ROOTFS_SZ,,-
,$DATA_SZ,,-
,,E,-
,$USER_SZ,,-
,$MODULE_SZ,,-
__EOF__

mkfs.vfat -F 16 ${DISK}1 -n $BOOT
mkfs.ext4 -q ${DISK}2 -L $ROOTFS -F
mkfs.ext4 -q ${DISK}3 -L $SYSTEMDATA -F
mkfs.ext4 -q ${DISK}5 -L $USER -F
mkfs.ext4 -q ${DISK}6 -L $MODULE -F

1-5. Make the file executable

$ chmod u+x mkpart_3.0.sh

Download bootloader on Micro SD

2-1. Connect the Micro SD to Desktop using Card Reader and check device node

Desktop$ sudo fdisk -l

..........
Partition table entries are not in disk order
Disk /dev/sdb: 32.0 GB, 32010928128 bytes
64 heads, 32 sectors/track, 30528 cylinders, total 62521344 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 * 8192 139263 65536 e W95 FAT16 (LBA)
..........

2-2. run "sd_fusing.1M.sh" with device node

※ This can take a few minutes so wait for the script to finish

Desktop$ sudo ./sd_fusing.1M.sh /dev/sdb

2-3. Insert your Micro SD card into Odroid and select boot mode to SD (down, up)

Left Right Mode
up up eMMC (default)
down up SD

Odroid-om.png

2-4. Turn on the power

Now, You can boot the odroid xu3 with the Micro SD

Partitioning for Tizen 3.0

You should be setup a proper partition table for Tizen 3.0

Partition Name Offset (MB) Size (MB) DFU image name
1 boot 4 64 boot.img
2 rootfs - 3072 rootfs.img
3 system-data - 512 system-data.img
4 user - - user.img
5 modules - 32 modules.img

3-1. Insert bootable Micro SD card into Odroid and select boot mode SD

3-2. Also insert eMMC into Odroid

3-3. Turn on the board and enter u-boot prompt

3-4. Connect the micro USB connector to the target and the second one to your Desktop PC

3-5. Check eMMC device number in u-boot console

You can check that the eMMC device number is 1

ODROID-XU3 # mmc list
EXYNOS DWMMC: 0 (SD)
EXYNOS DWMMC: 1

3-6. Run ums command in u-boot console

ODROID-XU3 # ums 0 mmc 1
UMS: disk start sector: 0x0, count: 0x3ba0000

You can check the UMS exported device node in Desktop

Desktop$ sudo fdisk -l 

..........
Partition table entries are not in disk order
Disk /dev/sdb: 32.0 GB, 32010928128 bytes
64 heads, 32 sectors/track, 30528 cylinders, total 62521344 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 * 8192 139263 65536 e W95 FAT16 (LBA)
..........

3-7. Run the mkpart_3.0sh script for the exported device

※ This can take a few minutes so wait for the script to finish

Desktop$ sudo ./mkpart_3.0.sh /dev/sdb

3-8. Disconnect micro USB connector or make a combination of 'Ctrl+C' keys on the u-boot console

You can check the partition map on the u-boot console

ODROID-XU3 # part list mmc 1

3-9. Run reset command in u-boot console for next step

ODROID-XU3 # reset
resetting ...

Download bootloader on eMMC

4-1. Insert bootable Micro SD card into Odroid and select boot mode SD

4-2. Also insert eMMC into Odroid

4-3. Turn on the board and enter u-boot prompt

4-4. Connect the micro USB connector to the target and the second one to your Desktop PC

4-5. Check eMMC device number in u-boot console

You can check that the eMMC device number is 1

ODROID-XU3 # mmc list
EXYNOS DWMMC: 0 (SD)
EXYNOS DWMMC: 1

4-6. Enter the thor download mode with device number in u-boot console

ODROID-XU3 # thordown usb mmc 1
TIZEN "THOR" Downloader
DFU alt info setting: done

4-7. Create a bootloader tarball to download u-boot binary onto the eMMC

$ tar cvf full_boot.tar bl1.bin.hardkernel bl2.bin.hardkernel.1mb_uboot tzsw.bin.hardkernel u-boot.bin

4-8. Run thor tool with full_boot.tar file and start to download bootloader binary on eMMC

Desktop$ lthor full_bootloader.tar

After the finish, board will automatically reboot

4-9. Remove your Micro SD card into Odroid and select boot mode to eMMC (up, up)

Left Right Mode
up up eMMC
down up SD

Odroid-om.png

4-10. Run reset command in u-boot console

ODROID-XU3 # reset
resetting ...

Now, You can boot odroid with the eMMC

Download kernel and platform image for Tizen 3.0

5-1. Turn on the board and enter u-boot prompt

5-2. Connect the micro USB connector to the target and the second one to your Desktop PC

5-3. Enter the thor download mode in u-boot console

ODROID-XU3 # thor
TIZEN "THOR" Downloader
DFU alt info setting: done

5-4.Download Latest platform binary "tizen-tv_xxxxxxxx_tv-wayland-armv7l-odroidu3.tar.gz"

https://download.tizen.org/snapshots/tizen/tv/latest/images/arm-wayland/tv-wayland-armv7l-odroidu3/

5-5. Run thor tool with boot tarball and platfor tarball

Maybe, you already have the boot tarball (please see the 1-2 step)

Desktop$ lthor tizen-tv_xxxxxxxx.x_tv-boot-armv7l-odroidxu3.tar.gz tizen-tv_xxxxxxxx_tv-wayland-armv7l-odroidu3.tar.gz

After the finish board will automatically reboot