Building Tizen Development Environment Minsoo Ryu Real-Time Computing and Communications Lab. Hanyang University msryu@hanyang.ac.kr
Tizen 2.3 Development Environment Target hardware device Tizen Reference Device-PQ (RD-PQ) Display Chipset CPU Sensors Camera WiFi Bluetooth GPS Super AMOLED capacitive touch screen with 16M colors. Size 720 X 1280 pixels. Exynos Quad Quad-core 1.4GHz Cortex-A9 Accelerometer, Gyro, Proximity, Magnetic etc. Primary 8MP, Secondary 1.9MP Yes Yes No? (emulated) Tizen 2.2.1 is installed in current RD-PQ Our target Tizen platform is 2.2.1, so we need to upgrade the device with Tizen 2.3 2 2
Tizen 2.3 Development Environment Download the following images from #Bootloader http://download.tizen.org/releases/2.3/2.3- mobile/bootloader/migrate_2.3_bootloader.tar.gz #Mobile boot image http://download.tizen.org/releases/2.3/2.3-mobile/tizen-2.3- mobile_20150311.3/images/target/mobile_boot/tizen-2.3- mobile_20150311.3_mobile_boot.tar.gz #Mobile platform Image http://download.tizen.org/releases/2.3/2.3-mobile/tizen-2.3- mobile_20150311.3/images/target/mobile_target/tizen-2.3- mobile_20150311.3_mobile_target.tar.gz Remark: Tizen 2.3 is based on Linux kernel 3.0 3 3
Upgrading Tizen 2.2.1 to Tizen 2.3 Bootloader upgrade Enter the download mode of your device with PowerKey+VolDown Fuse the migrate_2.3_bootloader.tar.gz using lthor $ Sudo lthor migrate_2.3_bootloader.tar.gz Platform upgrade Enter the download mode for your device with PowerKey+VolDown Flash the boot image and the platform image $ Sudo lthor tizen-2.3-mobile_20150311.3_mobile_boot.tar.gz tizen- 2.3-mobile_20150311.3_mobile_target.tar.gz 4 4
Setting Up Gerrit Access 1. Registering a user account to gain access to tizen.org 2. Configuring Secure Shell (SSH) for Gerrit access 3. Configuring Git 5 5
Registering a User Account https://www.tizen.org/ 6 6
Configuring Secure Shell (SSH) Generate RSA keys by executing the following command $ ssh-keygen Follow the on-screen prompt Enter file in which to save the key (/home/(user)/.ssh/id_rsa) : Enter passphrase (empty for no passphrase) : Enter same passphrase again : Create an SSH configuration file with a full path of ~/.ssh/config $ vim ~/.ssh/config 7 7
Configuring Secure Shell (SSH) Insert your Tizen ID Host tizen review.tizen.org Hostname review.tizen.org IdentityFile ~/.ssh/id_rsa User Tizen ID Port 29418 #The line below is optional configuration applicable to Ubuntu and opensuse. #Add when using proxy, otherwise, skip it. #ProxyCommand nc -X5 -x : %h %p #The line below is optional configuration applicable to Fedora. #Add when using proxy, otherwise, skip it. #ProxyCommand nc --proxy-type socks4 --proxy : %h %p 8 8
Configuring Secure Shell (SSH) SSH public key vim ~/.ssh/id_rsa.pub Register SSH public key 9 9
Configuring Secure Shell (SSH) Check SSH connection $ ssh tizen **** Welcome to Gerrit Code Review **** Hi Kyusang Choi, you have successfully connected over SSH. Unfortunately, interactive shells are disabled. To clone a hosted Git repository, use: git clone ssh://kyusang@review.tizen.org:29418/repository_name.git 10 10
Configuring Git Install Git $ sudo apt-get install git Configure Git $ git config --global user.name name" $ git config --global user.email e-mail address" 11 11
Installing Tizen Development Tools Configure Tizen tools repository (Ubuntu 14.04 LTS) $ sudo vim /etc/apt/sources.list deb http://download.tizen.org/tools/latest-release/ubuntu_14.04 / $ sudo apt-get update Install gbs, mic package $ sudo apt-get install gbs mic $ sudo apt-get update $ sudo apt-get upgrade 12 12
Cloning Tizen v2.3 Source Create ~/bin/ subdirectory, include it in PATH $ mkdir ~/bin/ $ PATH=~/bin:$PATH Download the repo script by executing the following command : $ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo Change the attribute of repo $ sudo chmod a+x ~/bin/repo Create a new directory $ mkdir ~/<Tizen_Project> $ cd ~/<Tizen_Project> 13 13
Cloning Tizen v2.3 Source Initialize the repository Tizen 2.3 $ repo init -u ssh://<username>@review.tizen.org:29418/scm/manifest -b tizen_2.3 Synchronize the repository $ repo sync 14 14
Git Build System (GBS) GBS A developer command line tool that supports Tizen package development It's used to generate tarballs based on Git repositories, to do local test buildings, and to submit code to OBS (Tizen's main build service) 15 15
Git Build System (GBS) Prebuilt binary packages The <Tizen_Project>/pre-built directory contains a group of prebuilt projects that provides base and toolchain binary RPM packages for GBS build. Dependency cycles in Repos Building packages with dependency cycles is not supported by GBS. Known cycles are as follows: gcc->eglibc->gcc gcc->binutils->gettext->gcc gettext->gcc->eglibc->gettext cmake->curl->c-ares->cmake filesystem->setup->filesystem aul->privacy-manager-server->aul libtool->texinfo->libzio->bzip2->libtool libmm-sound->avsystem->pulseaudio->system-server- >libfeedback->libmm-sound 16 16
Git Build System (GBS) Accelerator Packages Tizen provides cross-compilers and other accelerator packages, as shown below, in <Tizen_Project>/pre-built/toolchain-arm/ for ARM build. bash,bzip2-libs,c-ares,cmake,coreutils,diffutils,eglibc,elfutils-libelf,elfutilslibs,elfutils,fdupes,file,findutils,gawk,gmp,gzip,libacl,libattr,libcap,libcurl,libfile,libgcc,libl ua,libstdc++,make,mpc,mpfr,ncurses-libs,nodejs,nspr,nss-softoknfreebl,nss,openssl,patch,popt,rpm-build,rpm-libs,rpm,sed,sqlite,tar,xzlibs,zlib,binutils,gcc For the first build, these packages need to be excluded, otherwise built out packages will be installed and used, which will make accelerator packages fail to work. 17 17
Building a Specific Package Move to Project folder $ cd <Project folder> Configuring.gbs.conf [general] profile = profile.tizen [profile.tizen] user = ID passwdx = password obs = obs.tizen repos = repo.tizen_latest [repo.tizen_latest] url = http://download.tizen.org/releases/2.3/2.3-mobile/tizen-2.3- mobile_20150311.3/repos/target/packages/ 18 18
Cloning a Specific Package over SSH Clone the required package by executing the following command $ git clone ssh: //<Username>@review.tizen.org:29418/framework/system/sen sord You can check if it is the master branch by executing the following command $ git branch a Build package in architecture armv7l $ gbs build -A armv7l include-all 19 19
MIC Image Creator MIC is an image creator It's used to create images for Tizen With the MIC tool, users can create images of different types for different verticals, including live CD images, live USB images, raw images for KVM, loop images for IVI platforms, and fs images for chrooting entire framework Result of specific built package 20 20
Creating a Tizen Image with MIC Preparing the Kickstart File $ wget http://download.tizen.org/releases/2.3/2.3-mobile/tizen-2.3- mobile_20150311.3/images/target/mobile_target/tizen-2.3- mobile_20150311.3_mobile_target.ks Create a Tizen Image $ sudo mic create loop <KS-File> --local-pkgs-path=<localpath>/ -- pack-to=<image name>.tar.gz $ sudo mic create loop tizen-2.3- mobile_20150311.3_mobile_target.ks --local-pkgspath=localpath/ --pack-to=tizen_0416.tar.gz Note that tizen_0416 is the result of MIC and localpath is the result of GBS KS-File is a kickstart file that we already downloaded 21 21
Putting Image into RD-PQ $ sudo lthor tizen-2.3-mobile_20150206.1_mobile_boot.tar.gz tizen_0416.tar.gz 22 22