Tizen Project Guideline. SKKU Embedded Software Lab.

Similar documents
Tizen/Artik IoT Practice Part 4 Open Source Development

Tizen Platform Practice Part 3. Project. SKKU Embedded Software Lab.

Building Tizen Development Environment

Building Tizen Development Environment

GIT. A free and open source distributed version control system. User Guide. January, Department of Computer Science and Engineering

One-click Solution for Tizen Image Creation Based on Jenkins Framework. Zhang, Qiang (Intel Open Source Technology Center)

Getting the Source Code

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Gerrit

Git & Github Fundamental by Rajesh Kumar.

Best Practice for Tizen Platform from Code to Device. Zhang, Qiang Chen, Gui (Intel Open Source Technology Center)

REX-RED Community Android 4.3

Git. Charles J. Geyer School of Statistics University of Minnesota. Stat 8054 Lecture Notes

Version Control with GIT

CS314 Software Engineering Configuration Management

Introduction to Git and Github Repositories

Version Control System - Git. zswu

Software Development I

Git Guide. Meher Krishna Patel. Created on : Octorber, 2017 Last updated : October, More documents are freely available at PythonDSP

Revision Control and GIT

Git Introduction CS 400. February 11, 2018

EECS 470 Lab 4. Version Control System. Friday, 31 st January, 2014

Version Control: Gitting Started

Git. SSE2034: System Software Experiment 3, Fall 2018, Jinkyu Jeong

TangeloHub Documentation

Git: Distributed Version Control

FEEG Applied Programming 3 - Version Control and Git II

Tizen EFL UTC User Guide

Git tutorial. Katie Osterried C2SM. October 22, 2015

GETTING STARTED WITH. Michael Lessard Senior Solutions Architect June 2017

CS 390 Software Engineering Lecture 5 More Git

MOOSE-Based Application Development on GitLab

The Intro. Aaron Bartell Director of IBM i Innovation. Copyright 2015 Aaron Bartell

Tizen * IVI Hands-on Lab

DEAD-SIMPLE VERSION CONTROL FOR YOUR TEAM GIT WITH MATTHEW REIDSMA GRAND VALLEY STATE UNIVERSITY

Introduction to Version Control

Getting the files for the first time...2. Making Changes, Commiting them and Pull Requests:...5. Update your repository from the upstream master...

Basics of Git GitHub

Git: Distributed Version Control

Introduction to Git and Github

Software Engineering

Object Oriented Programming. Week 1 Part 2 Git and egit

Introduction to Git. Database Systems DataLab, CS, NTHU Spring, 2018

Git(Lab) Tutorial and Hands-On

Visualizing Git Workflows. A visual guide to 539 workflows

Review Version Control Concepts

1. Which of these Git client commands creates a copy of the repository and a working directory in the client s workspace. (Choose one.

Version Control. Version Control

Index. Alias syntax, 31 Author and commit attributes, 334

Version Control. Software Carpentry Github s Hello World Git For Ages 4 And Up You need source code control now

CSE 344: Section 1 Git Setup for HW Introduction to SQLite

Version Control Systems

Crash Course in C++ R F L Evans. www-users.york.ac.uk/~rfle500/

Tutorial 2 GitHub Tutorial

Shell Project Part 1 (140 points)

Git Workflows. Sylvain Bouveret, Grégory Mounié, Matthieu Moy

Topics covered. Introduction to Git Git workflows Git key concepts Hands on session Branching models. Git 2

AIS Grid School 2015

CSE 391 Lecture 9. Version control with Git

Lab 01 How to Survive & Introduction to Git. Web Programming DataLab, CS, NTHU

Introduction to distributed version control with git

Version Control. Version Control

git commit --amend git rebase <base> git reflog git checkout -b Create and check out a new branch named <branch>. Drop the -b

FAQ Q: Where/in which branch do I create new code/modify existing code? A: Q: How do I commit new changes? A:

Tizen TCT User Guide

Git for Subversion users

Version control. what is version control? setting up Git simple command-line usage Git basics

2 Initialize a git repository on your machine, add a README file, commit and push

GIT. CS 490MT/5555, Spring 2017, Yongjie Zheng

About SJTUG. SJTU *nix User Group SJTU Joyful Techie User Group

Source Code Management wih git

Software Development. Using GIT. Pr. Olivier Gruber. Laboratoire d'informatique de Grenoble Université de Grenoble-Alpes

How to be a git. Dominic Mitchell

Git. A Distributed Version Control System. Carlos García Campos

Pulp Python Support Documentation

b. Developing multiple versions of a software project in parallel

CSCI 350 Virtual Machine Setup Guide

Versioning with git. Moritz August Git/Bash/Python-Course for MPE. Moritz August Versioning with Git

CSE 344: Section 1 Git Setup for HW Introduction to SQLite. September 28, 2017

(Cloud9) and to the Remote Repository (GitHub)

Tizen.IoTivity.Init. Tizen IoTivity 를시작하기위한환경설정. Geunsun Lee

CS3210: Operating Systems

Tips on how to set up a GitHub account:

Use git rm to remove files from workspace

Setting up a Chaincoin Masternode

John DeDourek Professor Emeritus Faculty of Computer Science University of New Brunswick GIT

Git version control with Eclipse (EGit) Tutorial

Git Magic: Versioning Files Like a Boss. Tommy MacWilliam

Distributed Version Control (with Git)

Distributed Version Control Git

Branching and Merging

Lab Exercise Git: A distributed version control system

Submitting your Work using GIT

WES 237A Project Part 1 Guide

Git. CSCI 5828: Foundations of Software Engineering Lecture 02a 08/27/2015

git the SCM system Jan-Simon Möller training.linuxfoundation.org

GIT VERSION CONTROL TUTORIAL. William Wu 2014 October 7

CS Homework 8. Deadline. Purpose. Problem 1. Problem 2. CS Homework 8 p. 1

Algorithm Engineering

Introduction to GIT. Jordi Blasco 14 Oct 2011

IoTivity Programmer s Guide Resource Encapsulation

Transcription:

1 Tizen Project Guideline

Tizen Project Process 2 Assume that you have done flashing Tizen images. 1. Preparation Install Tizen Development Environments 2. Github 1. Sign in Github 2. Make an Organization and a Repository 3. Upload Initial Source Code 3. Tizen Source Code Workflow 1. Version & Branch Management 2. Package Build 3. Package Install

3 1. Preparation Install Tizen Development Environments

Tizen Development Environment 4 Source Code Management(SCM) Tools Git, Repo, Gerrit Build Tool GBS(Git Build System) Packaging Tools MIC, RPM Tizen Servers Host PC ODROID-U3 Kernel Source Code Kernel Source Code Object File Kernel Image Platform Source Code Clone Source Code Platform Source Code Build Packages Make & Flash Images Platform Images (Git, Repo, Gerrit) (GBS) (MIC, RPM)

Tizen Dev. Environment Install (1/11) 5 1. Git: Install and Configuration 1. Install a git package. 1. $ sudo apt-get install git 2. Configure user information of git. This information will be used for committer information. 1. $ git config --global user.name Your name 2. $ git config --global user.email email@address ex. $ git config --global user.name Gyeonghwan Hong $ git config --global user.email redcarrottt@gmail.com

Tizen Dev. Environment Install (2/11) 6 2. Repo: Install and Configuration 1. Download repo. 1. $ sudo apt-get install curl 2. $ mkdir -p ~/bin 3. $ curl http://commondatastorage.googleapis.com/git-repodownloads/repo > ~/bin/repo 4. $ chmod +x ~/bin/repo 2. Add repo s path to the basic path list. 1. Edit ~/.bashrc 1. $ gedit ~/.bashrc 2. After adding below code to the last line, restart your shell. ~/.bashrc PATH=~/bin:${PATH}

Tizen Dev. Environment Install (3/11) 7 3. GBS, MIC: Install 1. Add Tizen development tool repository to APT repository list. 1. $ sudo gedit /etc/apt/sources.list 2. Add below code 1. XX : Ubuntu s major version (ex. 12, 13, 14) 2. YY : Ubuntu s minor version (ex. 04, 10) deb http://download.tizen.org/tools/latest-release/ubuntu_xx.yy / 3. $ sudo apt-get update 2. Install packages of GBS, MIC. 1. sudo apt-get install gbs mic /etc/apt/sources.list

Tizen Dev. Environment Install (4/11) 8 You should have an access right to review server for accessing Tizen source code. 4. Register a Tizen developer ID 1. Go to developer.tizen.org/ko. 2. You can log in Tizen review server (review.tizen.org).

Tizen Dev. Environment Install (5/11) 9 5. Review Server: Configuration 1. $ gedit ~/.ssh/config Enter your username. Host tizen Hostname review.tizen.org IdentityFile ~/.ssh/id_rsa User username Port 29418 ~/.ssh/config Host review.tizen.org Hostname review.tizen.org IdentityFile ~/.ssh/id_rsa User username Port 29418

Tizen Dev. Environment Install (6/11) 10 5. Review Server: Configuration (Cont d) 2. Run ssh-keygen on a shell. 1. $ ssh-keygen Press enter about every question for using default values. In result, id_rsa, id_rsa.pub files will be created.» id_rsa: private key» id_rsa.pub: public key

Tizen Dev. Environment Install (7/11) 11 5. Review Server: Configuration (Cont d) 3. After log in review.tizen.org, go to settings menu. 4. Enter into SSH Public Keys menu Press Add Key button.

Tizen Dev. Environment Install (8/11) 12 5. Review Server: Configuration (Cont d) 5. Display the contents of public key file. 5. $ cat ~/.ssh/id_rsa.pub 6. Copy the displayed text to below text box. Contents of ~/.ssh/id_rsa.pub

Tizen Dev. Environment Install (9/11) 13 5. Review Server: Configuration (Cont d) 7. Test ssh server connection 1. $ ssh tizen 2. $ ssh review.tizen.org If the connection is successful, below message will be displayed.

Tizen Dev. Environment Install (10/11) 14 Tizen source code is built by pre-built toolchains. 6. Clone Pre-built Toolchain Packages 1. Clone ARM toolchain 1. $ git clone ssh://user@review.tizen.org:29418/pre-built/toolchainarm pre-built/toolchain-arm 2. $ cd pre-built/toolchain-arm 3. $ git checkout origin/tizen_2.2 4. $ cd - 2. Clone x86 toolchain 1. $ git clone ssh://user@review.tizen.org:29418/ pre-built/toolchainx86 pre-built/toolchain-x86 2. $ git pre-built/toolchain-x86 3. $ git checkout origin/tizen_2.2 4. $ cd -

Tizen Dev. Environment Install (11/11) 15 7. Make a GBS configuration file (~/.gbs.conf) Without this file, Tizen source code cannot be built. 1. $ gedit ~/.gbs.conf [general] tmpdir=/var/tmp/ profile=profile.tizen2.2 work_dir=/home/user [repo.tizen2.2] url=http://download.tizen.org/releases/2.2/tizen-2.2/ [repo.tizen2.2_arm] url=${work_dir}/pre-built/toolchain-arm/ [repo.tizen2.2_x86] url=${work_dir}/pre-built/toolchain-x86/ [profile.tizen2.2] repos=repo.tizen2.2_arm, repo.tizen2.2_x86, repo.tizen2.2

16 2. Github 1. Sign in Github 2. Make a New Organization and Repository 3. Upload Initial Source Code

Sign in Github 17 1. Go to http://www.github.com and Sign in.

Create an Organization on Github (1/3) 18 Create one organization by a team on Github. 1. Press + button Click New organization.

Create an Organization on Github (2/3) 19 2. Input organization name and billing email address. Billing email: In the case of private repository, bill will be sent to the address. It will not used in the case of open source repository. 3. Click Create organization button.

Create an Organization on Github (3/3) 20 4. Register IDs of team members. 5. Click Finish button.

Create a Repository on Gitbub (1/2) 21 Make a repository belonged to organization 1. Press + button Click New repository of this organization.

Create a Repository on Gitbub (2/2) 22 2. Input Repository name and specific information.

Upload Initial Source Code (1/7) 23 Initial source code should be uploaded. Case 1. Make a New Git Repository In case that there are no contents at all. In case that there is no.git directory in working directory. Case 2. Use a Existing Git Repository In case that there is.git directory in working directory. In case that you modify existing Tizen platform source code.

Upload Initial Source Code (2/7) 24 Case 1. Make a New Git Repository 1. Make a new Git repository 1. Move to working directory. 2. $ git init 2. Do initial commit 1. $ touch README.md 2. $ git add README.md 3. $ git commit -m initial commit

Upload Initial Source Code (3/7) 25 Case 1. Make a New Git Repository 3. Register Github server s address 3. $ git remote add origin https://github.com/organization/projectname.git ex. $ git remote add origin https://github.com/skku-eslab- Tizen/remote-key-framework-service.git 4. Upload code to Git repository 1. $ git push origin master master branch in local repository is uploaded to master branch in remote repository. 5. Result A new repository with only README.md will be created.

Upload Initial Source Code (4/7) 26 Case 2. Use a Existing Git Repository 1. Clone existing Tizen repository If you have already a repository, skip this process. 1. Log in Tizen review server (review.tizen.org) 2. Enter into Projects List 3. Find a repository that you want to clone Be careful: Packages in Tizen 2.2 and 3.0 are managed in different way, so multiple packages will be displayed on the result. 4. Clone the repository 1. $ git clone ssh://user@review.tizen.or g:29418/project-name

Upload Initial Source Code (5/7) 27 Case 2. Use a Existing Git Repository 1. Clone existing Tizen repository (Cont d) Tizen package repository has several branches by release version. 5. Check branches 1. $ git branch --remote ex. origin/1.0_post origin/2.0alpha origin/head -> origin/master origin/master origin/tizen_2.0 origin/tizen_2.1 origin/tizen_2.2 6. Change branch to target release version 1. $ git checkout <target branch> ex. git checkout origin/tizen_2.2

Upload Initial Source Code (6/7) 28 Case 2. Use a Existing Git Repository 2. Register Github server s address 1. Move to working directory. 2. $ git remote add origin https://github.com/organization/projectname.git ex. $ git remote add origin https://github.com/skku-eslab- Tizen/remote-key-framework-service.git 3. Upload to Git repository 1. $ git push origin master master branch in local repository will be uploaded to master branch in remote repository.

Upload Initial Source Code (7/7) 29 Case 2. Use a Existing Git Repository 4. Result Existing Git repository is uploaded to Github repository. Existing commit log, branch information are preserved.

Clone Github Repository 30 1. Run following command 1. $ git clone https://github.com/organization/project-name.git ex. $ git clone https://github.com/skku-eslab-tizen/remotekey-framework-service.git

31 3. Repository Management and Package Build/Install 1. Version & Branch Management 2. Package Build 3. Package Install

Tizen Source Code Workflow 32 1. Git: manages source code versions 2. GBS: builds source code of git repository makes package file(rpm) 3. Install package file on ODROID-U3 Working Directory hello.c Local PC Github Server (Remote) (Remote) Repository Ver.2 hello.c Ver.1 Push Pull Add Staging Area Commit (Local) Repository Ver.2 hello.c Ver.1 gbs build Package file (rpm) ODROID-U3 Install

Git: Key Concepts 33 Working directory Source code in work add command: adds files/directories to staging area Staging area(index) Source code to be committed commit command: makes a new version in repository Repository(HEAD) Source code already committed Files or directories are stored as content-addressable objects identifiable by hash value. Working Directory hello.c Add Staging Area Commit (Local) Repository Ver.2 hello.c Ver.1

Version Management (1/2) 34 Add a source code, hello.cpp 1. Add hello.c to staging area 1. $ git add hello.c 2. Make a new version 1. $ git commit -m commit message Add all of the source code 1. Add all of the source code 1. $ git add --all 2. Make a new version 1. $ git commit -m commit message Display staging area s status 1. $ git status Working Directory hello.c Add Staging Area Commit (Local) Repository Ver.2 hello.c Ver.1

Version Management (2/2) 35 Display the commit log 1. $ git log Each commit s hash value, author information, date, message commit 783c82ff64eda9f03401834de906eca77d01f691 Author: Gyeonghwan Hong <redcarrottt@gmail.com> Date: Mon Sep 22 10:37:44 2014 +0900 2nd version commit: hello.c is added commit 712943bb31bf85430e1a027abe197e5b88a26110 Author: Gyeonghwan Hong <redcarrottt@gmail.com> Date: Thu Aug 28 12:08:17 2014 +0900 1st version commit: is added Return to a previous version 1. git checkout <commit s hash value> Working Directory hello.c Add Staging Area Commit (Local) Repository Ver.2 hello.c Ver.1 ex. git checkout 712943bb31bf85430e1a027abe197e5b88a26110

Local & Remote Repository (1/2) 36 Commit Make a new version on local repository Push Upload commits in local repository to remote repository Pull Download commits in remote repository to local repository Local PC Working Directory hello.c Add Staging Area Commit (Local) Repository Ver.2 hello.c Ver.1 Push Pull Github Server (Remote) (Remote) Repository Ver.2 hello.c Ver.1

Local & Remote Repository (2/2) 37 Upload to remote repository 1. $ git push <remote name> <remote branch> ex. $ git push origin master Download from remote repository 1. $ git pull Local PC Working Directory hello.c Github Server (Remote) (Remote) Repository Ver.2 hello.c Ver.1 Push Pull Add Staging Area Commit (Local) Repository Ver.2 hello.c Ver.1

Branch Management (1/3) 38 Check the branch list of local repository 1. $ git branch --list Check the branch list of remote repository 1. $ git branch --remote * master feature_x Move to another branch 1. $ git checkout <branch name> ex. $ git checkout feature_x

Branch Management (2/3) 39 Develop a new feature by making a new branch 1. Make a new branch feature_x 1. $ git branch feature_x 2. $ git checkout feature_x 2. Edit and commit source code 3. Merge feature_x branch to original branch 1. $ git checkout master 2. $ git merge feature_x

Branch Management (3/3) 40 Conflict When merging feature_y branch to master branch, in version 2-x and 2-y have different changes each other. This situation is called as conflict. The conflict should be resolved by conflict resolution process. 1. $ git mergetool http://git-scm.com/book/en/v2/git-branching-basic-branching-and- Merging

Required Files in Repository (1/2) 41 Tizen project repository requires following files Red files are files required at least. AUTHORS: Author list LICENSE: License information CMakeLists.txt: cmake configuration file about this directory s build <project-name>.manifest: SMACK manifest file packaging <project-name>.manifest: SMACK manifest file <project-name>.spec: RPM package specification file <sub-directory 1> CMakeLists.txt include Header files src Source code files <sub-directory 2>, <sub-directory 3>,

Required Files in Repository (2/2) 42 ex. Remote Key Framework Service Project (Link) AUTHORS: Author list LICENSE: License information CMakeLists.txt: cmake configuration file about this directory s build remote-key-framework.manifest: SMACK manifest file packaging remote-key-framework.manifest: SMACK manifest file remote-key-framework.spec: RPM package specification file remote-key-framework.service: systemd service configuration file server CMakeLists.txt include common.h: Common header file src main.cpp: Main source code common.cpp: Source code of dlog connector

How to Build Single Tizen Package (1/3) 43 Build the most recent version in Git repository In default, GBS builds the source code of most recent version. 1. Move to the directory of repository. 2. $ gbs build -A armv7l -A <architecture type>: x86, armv7l Local PC Working Directory hello.c Add Staging Area Commit (Local) Repository Ver.2 hello.c Ver.1 gbs build Package file (rpm)

How to Build Single Tizen Package (2/3) 44 Build the working directory Use it in the case of building the source code in work. 1. Move to the directory of repository. 2. $ gbs build -A armv7l --include-all --include-all: option for building working directory Local PC Working Directory hello.c Add Staging Area Commit (Local) Repository Ver.2 hello.c Ver.1 gbs build Package file (rpm)

How to Build Single Tizen Package (3/3) 45 Other GBS Options --threads <# of threads>: the number of build threads --clean: initializes the GBS build root --exclude=<packages>: the list of packages to be excluded Build Result Name: package_name-version.arch.rpm ex. remote-key-framework-1.2.1.armv7l.rpm Located in: ~/GBS-ROOT/local/repos/tizen2.2/armv7l/RPMS/

How to Install Tizen Package (1/2) 46 Install package files(*.rpm) on target board Send package files to target board through SDB Install the packages by RPM tool Local PC Working Directory hello.c Add Staging Area Commit gbs build --include-all Package file (rpm) Install (Local) Repository Ver.2 hello.c Ver.1 gbs build Package file (rpm) ODROID-U3 Install

How to Install Tizen Package (2/2) 1. Connect to ODROID-U3 via USB How to check connection: $ sdb devices Caution: If you are using VMWare, check the connection of removable device 2. Enter to SDB root mode 1. $ sdb root on 3. Send package file to target board through SDB 1. $ sdb push package_name-version.arch.rpm / 4. Install the package 1. $ sdb shell rpm -ivh --nodeps --force package_nameversion.arch.rpm 5. Reboot your target board 1. $ adb shell sync; sdb shell reboot -f