Introduction to the Tizen Installation on the Intel DE3815 NUC Board

Everything for building tizen image && compile it to the target board starts from here. I will briefly write down what I have done with the instruction above. ====================================================================================

1 Setting up Gerrit Access

1.1 Registering User Account

To register user account to gain access to tizen.org, perform the following procedure:

  1. Open the Register Page.
  2. Fill in the mandatory fields and other necessary information, then click Register. Gerrit will send a verification e-mail to the e-mail address provided by the user.
  3. Follow the instructions in the verification e-mail to verify the e-mail, change the password and gain access to tizen.org.

Then you will see the following page:

1.2 Configuring SSH for Gerrit Access

To configure SSH for Gerrit access, perform the following procedure:

  1. Install ssh

# sudo apt-get install ssh

  1. Generate RSA keys by executing the following command:
    $ ~/.ssh$ ssh-keygen -t rsa -C jiafei427

    Note: “[-t rsa]” and “[-C “<Comments>”]” are both optional arguments for ssh-keygen command. Follow the on-screen prompt below to specify the file in which to save the key. When pressing ENTER directly, the default value “/home/<User>/.ssh/id_rsa” is used, as shown in the parentheses.

    Enter file in which to save the key (/home/<User>/.ssh/id_rsa):

    Then follow the on-screen prompt below to set a passphrase. Pressing ENTER directly indicates no passphrase, as shown in the parentheses.

    Enter passphrase (empty for no passphrase):
    Enter same passphrase again:

    At this point, the SSH keys are successfully generated.

  1. Create an SSH configuration file “~/.ssh/config” and add one of the following, as appropriate:
    • Ubuntu, openSUSE, CentOS,and Debian
      Host tizen review.tizen.org
      Hostname review.tizen.org
      IdentityFile ~/.ssh/id_rsa
      User <Gerrit_Username>
      Port 29418
      # Add the line below when using proxy,
      		otherwise, skip it.
      # ProxyCommand nc
      		-X5 -x <Proxy Address>:<Port> %h %p
    • Fedora
      Host tizen review.tizen.org
      Hostname review.tizen.org
      IdentityFile ~/.ssh/id_rsa
      User <Gerrit_Username>
      Port 29418
      # Add the line below when using proxy,
      		otherwise, skip it.
      # ProxyCommand nc
      		--proxy-type socks4 --proxy <Proxy Address>:<Port> %h
      		%p
  2. Copy the the full text in ~/.ssh/id_rsa.pub, including all of the following:
    • “ssh-rsa” lead
    • SSH public key
    • e-mail address tail
  3. Log in to Tizen Gerrit and upload the key.
    • In the Gerrit web page, click the user name on the upper right corner (with a inverted triangle on the right), then click Settings to display the Settings web page.
    • Click SSH Public Keys in the left panel, paste the text copied in step-03 to the Add SSH Public Key box, and click Add.

  1. Verify SSH Connection by executing the following command:
    $ ssh tizen

    After type in the password, the message below indicates that SSH connection has been established successfully.

    **** Welcome to Gerrit Code Review ****

1.3 Configuring Git for Gerrit Access

Git must know the user’s name and e-mail address to determine the author of each commit. If the user name or e-mail address is not set up in a way that Git can find it, the user may encounter some odd warnings. This configuration operation requires developer access. In addition, matching the e-mail address with the one registered in contact information, which helps Git determine a user, is recommended. To configure Git for Gerrit access, perform the following procedure: 0. Download the git via “sudo apt-get install git”

  1. Set the user name by executing the following command:
    $ git config --global user.name <First_Name Last_Name>
  2. Set the e-mail address by executing the following command:
    $ git config --global user.email "<E-mail_Address>"

    Note: Using the GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL environment variables is an alternative solution. These variables override all configuration settings once set.

  3. Check the configuration is done correctly:

arthur@arthur-laptop:~/.ssh$ git config –global -l color.ui=auto user.name=jiafei427 user.email=jiafei427@163.com

2. Installing Development Tools in Fedora and CentOS

To install a development tool in Fedora and CentOS, perform the following procedure:

  1. Add Tizen tools repository to the source list. Take Fedora 20 as an example, execute the following command:
    $ sudo wget -O
    	/etc/yum.repos.d/tools.repo
    	http://download.tizen.org/tools/latest-release/Fedora_20/tools.repo
  2. Install a development tool by executing the following commands:
    $ sudo yum makecache
    $ sudo yum install <Package_Name>

    An example of installing GBS and MIC is shown below:

    $ sudo yum makecache
    $ sudo yum install gbs mic
  3. Upgrade a development tool by executing the following commands:
    $ sudo yum makecache
    $ sudo yum update <Package_Name>

Tips: Add the repos via yum-config-manager: #yum-config-manager --add-repo <repository_url> For this I did: #sudo yum-config-manager –add-repo http://download.tizen.org/tools/latest-release/Fedora_20/*.repo Delete mistaken repo from /etc/yum.repos.d/ #sudo rm -rf blahblah.repo Installation Fail via “Package build-2013.11.12-7.1.x86_64.rpm is not signed”, this will do the charm #sudo yum install –nogpgcheck gbs

3. Cloning over SSH

3.1 Cloning Specific Project over SSH

This section describes how to clone specific project over SSH. To clone specific project over SSH, perform the following procedure:

  1. Confirm the package name by checking it on Tizen Project List or by running the following command:
    $ ssh review.tizen.org gerrit ls-projects
  2. Clone the required package by executing the following command:
    $ git clone [-b <Branch>] ssh://<Username>@review.tizen.org:29418/<Gerrit_Project> [<Local_Project>]

    An example is shown below:

    $ git clone ssh://<Username>@review.tizen.org:29418/pkgs/a/avsystem

3.2 Cloning All Projects over SSH

To prepare for cloning, perform the following procedure:

  1. Create ~/bin/ subdirectory, include it in PATH, and then switch to it by executing the following commands:
    $ mkdir ~/bin/
    $ PATH=~/bin:$PATH
  2. Download the repo script by executing the following command:
    $ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo

    Note: To find solutions for the issues encountered during obtaining the repo tool, refer to Tips and Heads-up.

  3. Change the attribute of repo to make it executable by executing the command:
    $ sudo chmod a+x ~/bin/repo
  4. Create a new directory for Tizen and then switch to it by executing the following commands:
    $ mkdir ~/<Tizen_Project>
    $ cd ~/<Tizen_Project>

3.2.1 Cloning the Latest Source of All Projects over SSH

To clone the latest source of all projects over SSH, perform the following procedure:

  1. Initialize the repository by executing one of the following commands, as appropriate:
      • IVI
        $ repo init -u ssh://<Username>@review.tizen.org:29418/scm/manifest -b tizen -m ivi.xml
  2. Change the “~/tizen_ivi/.repo/manifests/_remote.xml” file for the correct id and port

<?xml version=”1.0″ encoding=”UTF-8″?> <manifest> <remote name=”tizen-gerrit” fetch=”ssh://jiafei427@review.tizen.org:29418/” review=”https://review.tizen.org/gerrit”/&gt; </manifest>

  1. Synchronize the repository by executing the following command:
    $ repo sync

3.3 Building All Packages

Note:

  1. Follow section 2.2 or section 3.2 in Cloning Tizen Source to clone source of all projects. Upon successful source code cloning, a full GBS configuration file named .gbs.conf is copied from the gbs-config project in Tizen Project List to the top directory of <Tizen_Project> in which repo sync command is executed.
  2. Switch to the directory that contains all Tizen projects.
    $ cd <Tizen_Project>
  3. Configure the default .gbs.conf. (3-1) Add customized remote repo (mandatory).
    • IVI
      [general]
      tmpdir=/var/tmp/
      profile = profile.tizen3.0_ivi
      work_dir=.
      [repo.tizen3.0_x86]
      url=${work_dir}/pre-built/toolchain-x86/
       [profile.tizen3.0_ivi]
      repos=repo.tizen3.0_x86
      buildconf=${work_dir}/scm/meta/build-config/build.conf
  4. Build all packages required for image creation by executing one of the following commands, as appropriate:
    $ gbs build --threads=4 --clean-once --exclude=gettext,libtool

3.4 Building Specific Package

This section describes how to build specific package. To build package for specific project, perform the following procedure:

  1. Follow section 3 in Cloning Tizen Source to clone source of specific project.
  2. Switch to the directory that contains specific project.
    cd <Specific_Project>
  3. Create GBS configuration file <Specific_Project>/.gbs.conf. An example of GBS configuration file for Tizen 2.2 is shown below:
    [general]
    tmpdir=/var/tmp/
    profile = profile.tizen2.2
    work_dir=.
     [repo.tizen2.2]
    url = http://download.tizen.org/releases/2.2/tizen-2.2/
    [profile.tizen2.2]
    repos=repo.tizen2.2

    For more information about .gbs.conf, refer to GBS Configuration File. For more customization information about remote repo, refer to Available Branches and the Corresponding Remote Repos.

  4. Build package for this project.
    $ gbs build -A
    	<Arch> --include-all

Build the Tizen Image 1.Download the original kickstart file for the specific Tizen image from the LINK.

I downloaded from this one.

#mkdir tizen_build

#cd tizen_build

#wget http://download.tizen.org/releases/milestone/tizen/ivi-3.0.m14.2/tizen-3.0.m14.2-ivi_20140724.4/images/atom/ivi-mbr-i586/tizen-3.0.m14.2-ivi_20140724.4_ivi-mbr-i586.ks

2. Create Tizen Image i. Create with local built packages

#sudo mic create raw tizen-3.0.m14.2-ivi_20140724.4_ivi-mbr-i586.ks –pack-to=/home/jiafei427/build_tizen/local_build/tizen-3.0.m14.2-ivi_20140724.4_ivi-mbr-i586.raw.bz2 –logfile=ck_test2.log –local-pkgs-path=/home/jiafei427/GBS-ROOT/local/repos

ii. Create with remote packages

#sudo mic create raw tizen-3.0.m14.2-ivi_20140724.4_ivi-mbr-i586.ks –pack-to=~/build_tizen/remote_build/tizen-3.0.m14.2-ivi_20140724.4_ivi-mbr-i586.raw.bz2 –logfile=ck_test2.log PS. if the package link in the ks file is not available anymore change it to the appropriate one from the download.tizen.org website and re-do the command.

iii.Extract the image for bz2 or tar file extensions

a) for tar file:

#tar -xvf tizen-3.0.m14.2-ivi_20140724.4_ivi-mbr-i586.raw.tar

b) for bzip2 file:

#bzip2 -dk tizen-3.0.m14.2-ivi_20140724.4_ivi-mbr-i586.raw.bz2

PS. You can check the image file property via

#file <file_name> and then decide what to do. ex. [jiafei427@localhost local_build]$ file tizen-3.0.m14.2-ivi_20140724.4_ivi-mbr-i586-201410021342-sdb.raw tizen-3.0.m14.2-ivi_20140724.4_ivi-mbr-i586-201410021342-sdb.raw: SYSLINUX GPT-MBR (version 4.00 or newer)

iv. check the disk for which hard to install that

#sudo fdisk -l

v. write to the target disk

#sudo dd if= tizen-3.0.m14.2-ivi_20140724.4_ivi-mbr-i586.raw of=/dev/sdb

or you can directly write the image from bz2 file via

#bzcat -dk *.bz2 | dd of=/dev/sdb

If the target disk is mounted as boot and the others it’s succeeded. Install GCC Since the board’s network card driver was not installed I needed to download the network driver source code, build it and install it to the kernel. BUT, the gcc and make was not installed in the OS…. HOLLY DAMN… First I thought about the cross-compile, but the cross-compiler was not easy to find anyway too.. Finally I found the relevant *.rpm packages from the package directory I built – “~/tizen_ivi/pre-built/toolchain-x86” I duplicated rpm files to the tizen os and installed the packages one-by-one for the dependent packages.

Install the Network Driver 0. Check the network Card #lspci | grep net ~~blahblah~~ Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller

Download the network driver source from Readltek website.

Compile and build it by

#./configure

#make clean

#make modules

#make install

1. Go to the Network-Driver Directory

#depmod

#insmod r8618.ko

PS. Then you will be able to see ur ethernet is shown from the #ifconfig

Also maybe we need to install the kernel-header or kernel-devel rpm file to be installed first here.

—————————————-updated 2014.10.15——————————————

For Automatically loading the r8168 network driver module:

Check whether module is loaded or not

#lsmod

Copy the compiled module ko file to the kernel driver directory

#cp r8168.ko /lib/modules/{$uname -r}/kernel/drivers/net/ethernet/realtek

#depmod -a

Load module and check

#modprobe r8168

#lsmod

If the module is successfully loaded then add a boot-up conf file

#echo “r8168” > /etc/modprobe.d/r8168.conf

#restart

Then you will be able to see that network driver is loading automatically whenever u boot-up

Set-up static ip:

#connmanctl

Check the interface service id

#services

Set the ip and others

#config ethernet_<MAC_ADDRESS>_cable –ipv4 manual <IP> <NETMASK> <BROADCAST> –nameservers <dns1> <dns2>

#exit

#restart

After restart your computer, you will be able to connect to the internet via static way.

————————————————————————————————————

2.Network Configuration

i. ip & mask & broadcast setting

#ifconfig eth0 <IP> netmask <MASK> broadcast <BROADCAST>

ii.DNS Setting

#vi /etc/resolv.conf

iii.Gateway Setting

#vi /etc/sysconfig/network

add a line “GATEWAY=192.168.0.1”

iv. Restart the network interface

#ifconfig eth0 down

#ifconfig eth0 up

Bam~ the network is working now

^___________________________________^

Download the Modello Sample

#zypper install -t pattern ivi-ux-modello-ui

check the applications

#xwalkctl

luanch the application

#xwalk-launcher <application_id>

References: 1. http://blog.csdn.net/flydream0/article/details/8996654

2. https://source.tizen.org/documentation/developer-guide/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s