IVI/IVI 3.0 VMware

From Tizen Wiki
< IVI
Jump to: navigation, search

Introduction

Before you can use Tizen IVI 3.0 images in VMware you need to download the image type that's right for you. After downloading the image you need to extract and convert it to a VMware virtual disk image. The following steps explain how this is done.

Note: Images prior to the June 2014 milestone release require tweaking to run inside VMware. The section Tweaking previous releases has steps how to properly run them.

Downloading the Image

Make a pick. If you are a developer working on bleeding edge code the daily release images are right for you.

If you care about image stability and a frozen code base you should choose the milestone release.

MBR vs. EFI images

For some Tizen images, both an MBR and an EFI version are published (as indicated by the name of the image itself). The MBR images are used on systems that have a traditional, legacy Bios system and the EFI ones are to be used on systems that have an UEFI firmware. Note that some systems (such as the Nexcom VTC-1010) provide both at the same time which means you can choose either type and boot it.

By default, VMware emulates a legacy Bios system which means you should pick the mbr image. It is however also possible to boot any efi Tizen image under VMware by following these steps:

32-bit EFI Tizen image

One more step is needed when creating a new Virtual Machine (as described below): add the following line to your Virtual Machine *.vmx file:

firmware = "efi"

64-bit EFI Tizen image

There are a couple of differences when creating a new Virtual Machine (as described below):

  1. Select Fedora 64-bit when selecting the OS that will run in the Virtual Machine
  2. add the following line to your Virtual Machine *.vmx file:
firmware = "efi"

Preview (milestone) images

All Tizen IVI 3.x preview release notes can be found here: Tizen IVI 3.x milestone

Development images

Loading the Tizen IVI image in VMware

Step 1: Extract and convert the image


bunzip2 tizen_{date}_ivi-mbr-i586-sdb.raw.bz2 qemu-img convert -f raw -O vmdk tizen_{date}_ivi-release-mbr-i586-sdb.raw tizen_{date}_ivi-release-mbr-i586-sdb.raw.vmdk

Step 2: Creating the Tizen IVI virtual machine

  • Create a New Virtual Machine
  • Select I will install the operating system later
  • Use Linux -> Fedora (for 32-bit Tizen images) or Fedora 64-bit (for 64-bit Tizen images)
  • Assign a name, e.g. tizen-ivi-october-2014-milestone
  • Create a new disk and select store virtual disk as a single file. The size does not matter as we will later delete it and a new one (mapped to tizen-ivi-october-2014-milestone.vmdk will be added as IDE(0:0))
  • Go to Edit virtual machine settings
  • (Optional) Uncheck the Connect on power-on option for the CD/DVD (unless you have such device on your dev machine)
  • (Optional) Uncheck the Connect at power-on for Printer
  • Check the Connect at power-on for Sound Card
  • Check Accelerate 3D graphics for Display
  • (Only needed if using an EFI image) Add the following line to your *.vmx file: firmware = "efi"

Step 3: Load the VMware disk image we created in Step 1

  • Remove the current Hard Disk
  • Add a new Hard Disk
  • Choose IDE for the Virtual Disk Type
Note: This is nowadays optional as the Tizen IVI kernel (patch for the Tizen Common kernel in progress) includes the necessary SCSI drivers built-in.
  • Select Use an existing virtual disk
  • Select your tizen-ivi-october-2014-milestone.vmdk file
  • When you save these changes, it will ask you if you want to upgrade the virtual disk format, select Keep existing format instead.

Step 4: Start the Tizen IVI virtual machine

You are now ready to start and run your Tizen IVI Virtual Machine! In case you encounter any issue, please check out the sections below which may provide some help. Feel free to reach out to us on the Tizen IVI mailing list if you could not find a solution to your problem below.

Tips, Tricks and Known Issues

This is to be considered an experiment and many functionalities may be missing or incomplete.

Setting up VMware® on your host

Here is a summary of the host/VMware combinations that are known to work:

Windows [1] Linux [2] Mac OS [7]
VMware Player [3] OK OK [5][6] N/A
VMware Workstation [4] OK(?) OK [5] N/A
VMware Fusion [7] N/A N/A OK

[1] Tested with Microsoft Windows 7 Entreprise Service Pack 1 (64-bit)
[2] Tested with Ubuntu 12.10 (32-bit), 13.04 (32 & 64-bit), Fedora 20 (64-bit)

Note: Up until some of the most recent updates of VMware Player, the Virtual Network driver failed to build with very recent kernels (e.g. 3.13) such as used in Fedora 20, Ubuntu 14.04, etc. If you're facing this situation, please follow the instructions posted here for a workaround.

[3] Tested with VMware® Player 5.0.2 build-1031769, 6.0.0 build-1295980 and 6.0.1 build-1379776
[4] Tested with VMware® Workstation 9.0.2 build-1031769 in Ubuntu 12.10 (32-bit)
[5] The Mesa DRI driver is blacklisted by default by both VMware® Player and Workstation so in order to enable 3D acceleration on Intel Graphics hardware, please add the following line to your *.vmx file: mks.gl.allowBlacklistedDrivers = "TRUE"
[6] VMWare Player will work when there will be TF2-S3TC Texture Support enabled in DRI. Problem is described here. It can be turned on with local .drirc file. On Ubuntu one can install driconf application and change the settings from GUI - see following image:

Driconf - turning on TF2-S3TC Texture Support

[7] Tested with Mac OS 10.9.1 and VMware® Fusion 6.0.2

Other versions of host should work too.

The Virtual Machine does not appear to start correctly

The sympton that often gets described is that there is no GUI that comes up. It's usually combined with a cryptic message on the VM window that reads: Drivers/rtc/hctosys.c :unable to open rtc device(rtc0). This is typically caused by the lack of 3D acceleration for your Virtual Machine so make sure you check the following points when that happens:

  • Activate (checkbox) the 'Accelerate 3D graphics' option under 'Display' for your Virtual Machine
  • (Linux hosts only) The Mesa DRI driver is blacklisted by default by both VMware® Player and Workstation so in order to enable 3D acceleration on Intel Graphics hardware, please add the following line to your *.vmx file: mks.gl.allowBlacklistedDrivers = "TRUE"

  • (Linux hosts only) VMWare Player will work when there will be TF2-S3TC Texture Support enabled in DRI. Problem is described here. It can be turned on with local .drirc file. On Ubuntu one can install driconf application and change the settings from GUI.

Changing your virtual screen settings

With Wayland/Weston, you can tweak your screen ([output]) settings including the resolution by editing the /etc/xdg/weston/weston.ini file and more specifically the [output] section that corresponds to your particular set-up (i.e. VGA, HDMI, etc.). When running in VMware, the output is identified as UNKNOWN1 so you should edit the [output] section with the same name. For example, if you want to change your resolution to 720p:

[output]
name=UNKNOWN1
mode=1280x720

Setting your virtual screen to 720p, portrait mode (for Modello or ICO HomeScreen)

VMware does not expose a 720p, portrait orientation (i.e. 720x1280) mode by default which means we have to revert to define a complete modeline. Here is one such modification for your /etc/xdg/weston/weston.ini file:

[output]
name=UNKNOWN1
mode=77.59 720 768 848 976 1280 1281 1284 1325 -hsync +vsync

Audio output

Basic audio works but you will have to make sure that the audio device is connected to the VM and also unmute the devices in Tizen. You can quickly test this as follows (from the weston-terminal or a console)

amixer sset Master on
amixer sset Master 100
amixer sset PCM on
amixer sset PCM 100

Now try to play one of the same WAV file as follows:

aplay -Dhw /usr/share/sounds/alsa/Front_Left.wav
paplay /usr/share/sounds/alsa/Front_Left.wav

Note: aplay uses ALSA directly while paplay goes through PulseAudio

Tweaking and Running pre-Tizen IVI 3.0-M3-June2014 Images in VMware

Tizen IVI 3.0-M2-March2014

The following modification is needed to run web apps using M2 March 14 release in VMware:

 Set the TIZEN_SHARED_PLATFORM_SURFACE_LOCK_DISABLE environment variable to turn off the 'SurfaceLock' mechanism in Webkit as follows:
 #echo TIZEN_SHARED_PLATFORM_SURFACE_LOCK_DISABLE=1 >> /etc/sysconfig/wrt
 #echo TIZEN_SHARED_PLATFORM_SURFACE_LOCK_DISABLE=1 >> /etc/sysconfig/launchpad
 #echo export TIZEN_SHARED_PLATFORM_SURFACE_LOCK_DISABLE=1 >> /etc/profile.d/weston.sh
 #systemctl reboot

You should now be able to start any Web apps as described here.

Tizen IVI 3.0-M2-EOY

There is a known issue in Tizen IVI 3.0-M2-EOY (also affecting October 11, 2013 3.0-M2-Sep milestone) that prevents Web applications from displaying correctly under VMware: TIVI-1859.

There is a workaround under review, and we have also created a special build of webkit-efl that includes a fix for those who do not want to track the development branch. Here is how you can install it in your Tizen IVI 3.0-M2-EOY image:

$su (password is 'tizen')
#cd /etc/zypp/repos.d/
#wget http://download.tizen.org/live/home:/gvancuts:/vmware:/3.0-eoy/standard/home:gvancuts:vmware:3.0-eoy.repo
#zypper refresh
#zypper up

This will update your webkit2-efl package to version webkit2-efl-123997_0.12.1-3.1

Set the TIZEN_SHARED_PLATFORM_SURFACE_LOCK_DISABLE environment variable to turn off the 'SurfaceLock' mechanism in Webkit as follows:

#echo TIZEN_SHARED_PLATFORM_SURFACE_LOCK_DISABLE=1 >> /etc/sysconfig/wrt
#echo TIZEN_SHARED_PLATFORM_SURFACE_LOCK_DISABLE=1 >> /etc/sysconfig/launchpad
#echo export TIZEN_SHARED_PLATFORM_SURFACE_LOCK_DISABLE=1 >> /etc/profile.d/weston.sh
#systemctl reboot

You should now be able to start any Web apps as described here.

It was recently brought to my attention that VMware Fusion does not allow you to set up your Virtual Disk as an IDE drive; this currently prevents Tizen IVI from booting, as our kernel does not have the appropriate driver built-in to load the rootfs from the SCSI-emulated drive. A kernel that includes this driver has been published in the additional repository. Assuming that you have gone through the steps described above to update webkit-efl, you can also directly upgrade the kernel which will now boot seemlessly whether your Virtual Disk is set-up as an IDE or SCSI drive.

You will find in Appendix A a kickstart file (KS) that you can use with mic to generate a modified Tizen IVI 3.0-M2-EOY image that includes all the modifications required to run in VMware.

sudo mic cr raw ivi-release-vmware-i586.ks

Tizen IVI 3.0-M2-Sep

There is a known issue when running Tizen IVI 3.0-M2-Sep preview in VMware Player (see TIVI-2025) which leaves you with no input mechanism (pretty annoying actually...). A new kernel configuration is needed to address this (which entails re-enabling a couple of drivers). In order to make it as easy as possible to most people, I have prepared a new kernel with the fix incorporated; here is how you can install it:

  • Prepare your image as described in Tizen IVI 3.0 in VMware
  • Boot your virtual image
  • Log on as root via SSH (password is tizen)

Note: I set up the network to Bridged so it appears as any other machine on my local network and I can easily determine its IP address.

  • From your SSH session:
cd /etc/zypp/repos.d/
wget http://download.tizen.org/live/home:/gvancuts:/vmware:/3.0-sep/standard/home:gvancuts:vmware:3.0-sep.repo
zypper refresh
zypper up

This will update your kernel to version 3.11.4-8.1-x86-ivi

systemctl reboot

You should now be able to use your mouse/keyboard with this image.

Tizen IVI 3.0-M2-Aug

In order to run most applications, you will need to change the wayland backend from wayland_egl to wayland_shm. Three files need to be manually updated:

/etc/profile.d/weston.sh
/etc/sysconfig/wrt
/etc/sysconfig/launchpad

Update the following variables in each of these:

 ELM_ENGINE=wayland_shm
 ECORE_EVAS_ENGINE=wayland_shm

Older Tizen IVI 3.0-Mx previews

Edit /etc/profile.d/weston.sh

export ELM_ENGINE=wayland_shm
export ECORE_EVAS_ENGINE=wayland_shm

Pre-boot /etc/fstab tweak (for preview milestones before 3.0-M2-Aug). These images were affected by TIVI-1017. Here is how to work around it:

sudo mkdir /mnt/tizen-ivi-3.0
sudo vmware-mount tizen-ivi-pre-3.0.vmdk 2 /mnt/tizen-ivi-3.0
sudo vim /mnt/tizen-ivi-3.0/etc/fstab
               -> replace all sdbX by sdaX
sudo vmware-mount -d /mnt/tizen-ivi-3.0

Start up ('Play') your virtual machine... et voila!

Conclusion

The Tizen IVI Q&A team is now running biweekly sanity tests, but keep in mind that some functionality may be missing. We do, however, hope that this can be useful to other folks... and as usual feel free to provide feedback, improve the wiki page or share additional tips and tricks with everyone else.

Appendix A

Modified kickstart (KS) file to generate a modified Tizen IVI 3.0-M2-EOY image that includes all modifications to run in VMware:

# -*-mic2-options-*- -f raw --fstab=uuid --copy-kernel --compress-disk-image=bz2 --generate-bmap -*-mic2-options-*-
#
# Do not Edit! Generated by:
# kickstarter.py
# 

lang en_US.UTF-8
keyboard us
timezone --utc America/Los_Angeles
part /boot --size 64 --ondisk sdb --fstype=ext4 --label boot --active --align 1024
part / --size 3748 --ondisk sdb --fstype=ext4 --label platform --align 1024 

rootpw tizen
xconfig --startxonboot
bootloader  --timeout=0  --append="rootwait rootfstype=ext4 quiet security=none"   --ptable=gpt

desktop --autologinuser=tizen  
user --name tizen  --groups audio,video,weston-launch --password 'tizen'

installerfw_plugins "bootloader"

repo --name=ivi --baseurl=http://download.tizen.org/releases/milestone/tizen/ivi/tizen_20140115.4/repos/ivi/ia32/packages/ --ssl_verify=no
repo --name=vmware-3.0-eoy --baseurl=http://download.tizen.org/live/home:/gvancuts:/vmware:/3.0-eoy/standard/ --ssl_verify=no --save --priority=1

%packages
@Base System
@IVI Adaptation
@IVI Packaging
@IVI Middleware
@Wayland
@Console Tools
@IVI Applications

kernel-x86-ivi

release-repos
setup-mbr-ivi
%end



%post
# base-general.post

ln -sf /proc/self/mounts /etc/mtab

rm -rf /root/.zypp

#Hack to temporarily disable net-config, which collides with settingsd. Related to TIVI-2569

rm /usr/lib/systemd/system/multi-user.target.wants/net-config.service 

# rpm.post
rm -f /var/lib/rpm/__db*
rpmdb --rebuilddb

# Initialize the native application database
pkg_initdb

# Add 'app' user to the weston-launch group
/usr/sbin/groupmod -A app weston-launch

# Temporary work around for bug in filesystem package resulting in the 'app' user home
# directory being only readable by root
chown -R app:app /opt/home/app

# Since weston-launch runs with the "User" label, the app
# home dir must have the same label
chsmack -a User /opt/home/app

# Enable a logind session for 'app' user on seat0 (the default seat for
# graphical sessions)
mkdir -p /usr/lib/systemd/system/graphical.target.wants
ln -s ../user-session-launch@.service /usr/lib/systemd/system/graphical.target.wants/user-session-launch@seat0-5000.service
ln -sf weston.target  /usr/lib/systemd/user/default.target

# Add over-riding environment to enable the web runtime to
# run on an IVI image as a different user then the tizen user
# Some notes on some of the variables:
#  - ELM_THEME is needed in order for the wrt to have visible content
#  - WRT_PROCESS_POOL_DISABLE is a work around for TIVI-2062
cat > /etc/sysconfig/wrt <<EOF
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket
XDG_RUNTIME_DIR=/run/user/5000
ELM_ENGINE=wayland_egl
ECORE_EVAS_ENGINE=wayland_egl
ELM_THEME=tizen-HD-light
WRT_PROCESS_POOL_DISABLE=1
TIZEN_SHARED_PLATFORM_SURFACE_LOCK_DISABLE=1
EOF

# Use the same over-rides for the native prelaunch daemon
cp /etc/sysconfig/wrt /etc/sysconfig/launchpad

# This seems to be required for starting MiniBrowser directly from terminal in VMware
cat >> /etc/profile.d/weston.sh << EOF

# Do not use EGL_KHR_lock_surface in VMware (not available)
export TIZEN_SHARED_PLATFORM_SURFACE_LOCK_DISABLE=1
EOF

# Add a rule to ensure the app user has permissions to
# open the graphics device
cat > /etc/udev/rules.d/99-dri.rules <<EOF
SUBSYSTEM=="drm", MODE="0666"
EOF 

# Needed to fix TIVI-1629
vconftool set -t int -f db/setting/default_memory/wap 0

# mbr.post
/usr/sbin/setup-mbr-ivi

%end

%post --nochroot
# buildname.nochroot 
if [ -n "$IMG_NAME" ]; then
    echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/tizen-release
    echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/os-release
fi

%end