Trying Tizen SDK 1.0 on 64-bit Fedora 16

The Following Article Originally Appeared on Nixu Open and posted by Tomi Ollila<
By
Ash
 - 
May 22, 2012

The Following Article Originally Appeared on Nixu Open and posted by Tomi Ollila:

The operating system requirements for Tizen SDK version 1.0 were initially Ubuntu 10.04/10.10/11.04/11.10 32-bit or Windows XP SP3/7 32-bit so installing this (the Linux version) on Fedora 16 64-bit is not supported.

Having some experience doing 32-bit chrooted compilation environments on Linux servers provided me a short path attempting to do the same for this excercise; debootstrapping 32-bit Ubuntu 11.10 and continuing from that is easy step to start.

There is suitable debootstrap rpm package available for Fedora 16 which also includes Ubuntu 11.10 configuration.

After base system is debootstrapped, finding a suitable set of packages for Tizen SDK to install and run is another story; it took a few rounds of trial&error to get this set figured out.

Below there is the final sequence of commands presented; Following these one should be able to install Tizen SDK on their machine. These should work on any distribution, provided that recent-enough debootstrap is available.

NOTES FOR THE COMMANDS

02 and 13echo $DISPLAY is executed to make sure that X Window System is available. It doesn’t hurt to test some X clients as well…

03: If yum is not the command to install software in your machine, use the alternative provided by your distribution.

04: Define any directory you want for a parent dir to the chrooted Ubuntu environment. the variable $_CHROOTS is referenced in commands 05 and 06.

09: This set of “bind”-mounts provides essential directories to be available in chrooted environment. Especially, mounting /home eases many things.

10: Traditional /etc/mtab is symlinked to /proc/mounts in modern Linux kernels & distributions. Good for us!

11: The user name & uid from grep output are used in 14 and 26

12: 32 bit architecture is needed for Tizen SDK. setarch makes setting that easy.

15: Some packages requires are available in universe (Community maintained software, i.e. not officially supported software.) component of Ubuntu software repository. This command adds it to the deboostrapped original sources.list.

21: Note ppa:webupd8team/java (the alternative ppa:eugenesan/java you may have seen does not work as of 2012-05-07).

27: It is expected one has downloaded Tizen SDK already — if not to Downloads adjust command line accordingly.

THE COMMAND SEQUENCE

Examine and think through these steps carefully before continuing; these are harmless (nothing that reboot cannot clear out) but it is good to know what you’re doing.


01 $ sudo $SHELL 
02 # echo $DISPLAY 
03 # yum install debootstrap 
04 # _CHROOTS=/srv/chroots 
05 # mkdir $_CHROOTS 
06 # cd $_CHROOTS 
07 # unset _CHROOTS 
08 # debootstrap --arch=i386 oneiric ubuntu-oneiric1104-i386 
09 # for d in dev dev/shm dev/pts sys proc home tmp 
do mount /$d --bind ubuntu-oneiric1104-i386/$d; done 
10 # ln -s /proc/mounts ubuntu-oneiric1104-i386/etc/mtab 
11 # grep $SUDO_USER: /etc/passwd 
12 # chroot ubuntu-oneiric1104-i386 setarch i386 /bin/bash 
13 # echo $DISPLAY 
14 # useradd -s /bin/bash -u <uid> <user> 
15 # perl -pi -e 's/main/main universe/' /etc/apt/sources.list 
16 # apt-get update 
17 # apt-get install qemu-kvm binutils-multiarch debhelper fakeroot realpath 
18 # apt-get install gettext procps xsltproc libdbus-1-3 liblua5.1-0 libexif12 
19 # apt-get install libcurl3 expect libsdl-gfx1.2-4 
20 # apt-get install python-software-properties 
21 # add-apt-repository ppa:webupd8team/java 
22 # apt-get update 
23 # apt-get install oracle-java7-installer 
24 # apt-get install libgtk2.0-0 libxtst6 xdg-user-dirs xdg-utils unzip 
25 # apt-get install libwebkitgtk-1.0-0 chromium-browser 
26 # su - <user> 
27 $ bash ./Downloads/tizen_sdk.bin 

Then, continuing on command line:

28 $ ./tizen_sdk/IDE/startup.sh


When GUI launches, go to Window->Preferences — Tizen SDK / Web / Simulator and setGoogle Chrome location: as /usr/bin/chromium-browser

(Untested alternative: edit file<workspace>/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.tizen.web.simulator.prefsbefore executing startup.sh (step 28 above))

I encourage most of you to try these steps; I believe you have high chance of succeeding. Please report your experience in comments below.

Good luck!

REATTACHING

If the machine has been rebooted or the directories unmounted, enter

 # sudo sh -c 'for d in dev dev/shm dev/pts sys proc home tmp 
do mount /$d --bind /path/to/ubuntu-oneiric1104-i386/$d; done' 

to (re)mount the directories. (replace /path/to with what you used for $_CHROOT).

To reattach (or run another shell) into the chrooted environment, enter

 # sudo chroot /path/to/ubuntu-oneiric1104-i386 setarch i386 /bin/su - $USER 

Alternatively you can seek solutions like schroot to manage these things.

UNINSTALLING

To uninstall you need first to either reboot the machine (to release mounts) or do the following to unmount bind-mounts done in 09:

  • In case shell launched in 26 active, exit that shell; In case chroot executed in 12 still active, exit the shell executed by that (too).
  • Execute command
    df | awk '/oneiric1104/ { print $6 }' | sort -r | sudo xargs umount 

Then check with df that all mounts are gone. If not some of the mountpoints are busy. Attempt to exit the processes holding reference to those mountpoints.

If you’re left out with just .../ubuntu-oneiric1104/dev which just won’t go away (happens to me all the time), append -l to the above command line:

 df | awk '/oneiric1104/ { print $6 }' | sort -r | sudo xargs umount -l 

This makes lazy umount which detaches the mounted filesystem from the filesystem hierarchy (and cleanups all references to the filesystem as soon as it is not busy anymore…)

When all bindmounts umounted executing rm -rf can be used to wipe the deboostrapped installation. Just make sure with df -a that all are really gone — otherwise the contents in bindmounted directories will be wiped, too.

Now, you still have Tizen SDK files in your home directory. Executing

 cd $HOME && ls -la | grep -i -e tizen -e workspace 

Should reveal the directories created by Tizen SDK installer (provided you used the defaults). Examine this data and delete it if so desired.


 

Source Nixu Open Blog

About us

IoT Gadgets is dedicated to bring you all the Internet of Things IoT news that pertains to gadgets. Simple. We love for you to join us on this journey.

Contact us: [email protected]

FOLLOW US

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram