Build Tizen with Yocto Project

From Tizen Wiki
Revision as of 12:46, 3 June 2014 by Kthierry (talk | contribs) (Created page with "The purpose of this page is to explain, step by step, how to create your own Tizen Common image with Yocto. = Create a Tizen Common x86_64 image with Yocto = Currently this ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The purpose of this page is to explain, step by step, how to create your own Tizen Common image with Yocto.

Create a Tizen Common x86_64 image with Yocto

Currently this project is buill on "OpenSuse x86_64" and hasn't been tested on other Linux distros.


  • Intel Haswell
  • Intel Ivy CPU

Create your working directory

Create a working directory (for example "${HOME}/yocto","/mnt/ssd","/tmp"):

mkdir -p ${WORKINGDIR}

Create a download directory (optional). It will act as a common download directory amongst projects:

mkdir -p ${WORKINGDIR}/downloads

Download sources

Download Poky

Poky is a temporary fork of the upstream project patched to support RPM 4.

git clone
cd poky
git reset --hard origin/master
cd -

Download Intel layers

git clone git://
cd meta-intel
git reset --hard 6396a98832719c07dba56184580238d1f92f166c
cd -

Download openembedded layers

git clone git://
cd meta-openembedded
git reset --hard dca466c074c9a35bc0133e7e0d65cca0731e2acf
cd -

Download tizen layer

git clone ssh://${YOUR_TIZEN_ID}
cd meta-tizen
git reset --hard tizen origin/tizen
cd -
  • Developers can register for an account here.
  • Configure your ssh Git access to Tizen here.


Configure the environment:

cd ${WORKINGDIR}/poky
source ./oe-init-build-env build-${BUILDID}

Configuration files


This file contains the list of the layers in which poky has to search for the recipes.



For arch Intel Haswell

${WORKINGDIR}/poky/meta \
${WORKINGDIR}/poky/meta-yocto \
${WORKINGDIR}/poky/meta-yocto-bsp \
${WORKINGDIR}/meta-intel \
${WORKINGDIR}/meta-openembedded/meta-efl \
${WORKINGDIR}/meta-openembedded/meta-oe \
${WORKINGDIR}/meta-openembedded/meta-multimedia \
${WORKINGDIR}/meta-openembedded/meta-ruby \
${WORKINGDIR}/meta-openembedded/meta-systemd \
${WORKINGDIR}/meta-tizen \
${WORKINGDIR}/meta-intel/meta-isg/meta-haswell-wc \

For arch Intel Ivy

${WORKINGDIR}/poky/meta \
${WORKINGDIR}/poky/meta-yocto \
${WORKINGDIR}/poky/meta-yocto-bsp \
${WORKINGDIR}/meta-intel \
${WORKINGDIR}/meta-openembedded/meta-efl \
${WORKINGDIR}/meta-openembedded/meta-oe \
${WORKINGDIR}/meta-openembedded/meta-multimedia \
${WORKINGDIR}/meta-openembedded/meta-ruby \
${WORKINGDIR}/meta-openembedded/meta-systemd \
${WORKINGDIR}/meta-tizen \
${WORKINGDIR}/meta-intel/meta-romley \


Most of default values can be kept. The only one that needs to be changed is:


For qemu

MACHINE ?= "qemux86-64"

For Intel Haswell

MACHINE ?= "haswell-wc"

For Intel Ivy

MACHINE ?= "romley-ivb"

Optional parameters

Download directory

DL_DIR ?= "${WORKINGDIR}/downloads"

Setting the download directory DL_DIR to a directory shared amongst projects prevents common data from being downloaded for each project.

Terminal emulator

OE_TERMINAL = "screen"

The terminal emulator you want to use.

WARNING tmp add to /etc/sudoers WARNING

  • use sudo
sudoedit /etc/sudoers

Note: Replace intel by your id.

Build the Tizen Common image

bitbake -kv tizen-common-core-image-minimal-dev

The generated image can be found in tmp/deploy/images/${MACHINE}

Image build time

Full time build

  • From scratch
  • From source
  • Without any binaries toolchain

This should be optimized.

Boot the Tizen Common image

  • Requirements file
tizen-common-core-image-minimal-dev.ext3 (Download here)
bzImage (Download here)
  • Requirements tool
  • The Tizen Common image is created as root
  • The Tizen Common image is tested on Lenovo x230 Tablet
  • Select your USB or hard drive device:
  • Create rootfs partition.
fdisk /dev/"${USB_DISK}"

Press 'p' to display the partition table and 'd' to delete the previous partition(s). Press 'n' then 'p' and '1' to create a single partition and use the default values for the size. Don't forget to mark it as bootable by pressing 'a' and the partition number '1'. Press 'w' to save and quit.

You should see very similar output :

fdisk -l /dev/"${USB_DISK}"
Disk /dev/sdz: 8004 MB, 8004304896 bytes
142 heads, 18 sectors/track, 6116 cylinders, total 15633408 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: 0x206c1007
  Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *        2048     5633407     2815680   83  Linux
  • Format you partition
mkfs.ext3 /dev/"${USB_DISKID}"
  • Mount your key
mkdir -p /mnt/"${USB_DISKID}"
mount /dev/"${USB_DISKID}" /mnt/"${USB_DISKID}"
  • Mount your EXT3 Tizen source
mkdir -p /mnt/YoctoTizen_EXT3
mount tizen-common-core-image-minimal-dev.ext3 /mnt/YoctoTizen_EXT3
  • Copy the rootfs files
cp -a /mnt/YoctoTizen_EXT3/* /mnt/"${USB_DISKID}"
  • Copy the kernel file
mkdir -p /mnt/"${USB_DISKID}"/boot
cp -a bzImage /mnt/"${USB_DISKID}"/boot
  • Create grub files
grub2-install --recheck --root-directory=/mnt/"${USB_DISKID}" /dev/"${USB_DISK}"
  • Create your grub config file
mkdir -p /mnt/"${USB_DISKID}"/boot/grub2/
cat > /mnt/"${USB_DISKID}"/boot/grub2/grub.cfg <<EOF
set default="0"
set timeout="30"
menuentry 'Yocto Tizen Common' {
     insmod part_msdos
     insmod ext2
     set root='(hd0,msdos1)'
     linux /boot/bzImage root=/dev/sdb1 init=/usr/lib/systemd/systemd

Note that you may have to modify the last line, especially the root parameter.

  • Clean the kitchen
umount /mnt/"${USB_DISKID}"
umount /mnt/YoctoTizen_EXT3
rm -fr /mnt/"${USB_DISKID}"
rm -fr /mnt/YoctoTizen_EXT3
  • Enjoy your meal :)