Modify Emulator Image

From Tizen Wiki
Revision as of 20:40, 17 January 2016 by Pcoval (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Enlarge the image root partition size and convert format

You can find emulator image at:

[sdk install directory]/platforms/ivi-3.0/emulator-images/x86-standard/emulimg-3.0.x86

Download the IVI Emulator image at this link

You need to enlarge the loop image root partition size by:

$ e2fsck -f platform.img
$ resize2fs platform.img 3900M

You can mount it by:

# sudo mount -o loop platform.img /mnt/[mount_directory]

And you can also chroot into it by:

# sudo chroot /mnt/[mount_directory]

You can use "rpm" and other command now.

After that, you can exit from it and umount it:

# exit
# sudo umount /mnt/[mount_directory]

Then you need to convert the loop image to QCOW2 format by:

$ ~/tizen-sdk/tools/emulator/bin/qemu-img convert -O qcow2 platform.img emulimg-3.0.x86

Install the new packages from within the emulator when it's running

You can also use zypper to install packages:

# zypper install [PACKAGE_NAME]

Or you can upload rpm files to emulator by:

$ sdb push [FILE_NAME] [DIRECTORY]

And then you can use sdb tool to login to emulator from console and install rpms within it

$ sdb shell
$ su 
# rpm -i [RPM_FILE_NAME]

How to local build Emulator Image

Now all the Emulator packages and Emulator image can be built automatically. You can do the local build as the following steps when you need.

Local build Emulator package

You can use the following command to build Emulator packages manually.

$ gbs build -A i586 -R
--define "with emulator" --overwrite --include-all

Local build Emulator Image

You can use the following command to create an Emulator image with the KS file IVI Emulator KS File

Note that you need to change the local repo URL in the KS file firstly.

$ sudo mic cr loop --release=tizen-ivi_20141017.8_ivi-mbr-i586-emul.ks