24
TIZEN on ARTIK 소프트웨어센터 | Tizen Platform Lab 박지환 2016. 11. 17

TIZEN on ARTIK - 삼성 오픈소스 컨퍼런스 · Tizen on ARTIK 05 IoT Simple Application on ARTIK Cloud 17 ... High Scalability IoT Connectivity & System I/O ARTIK 5 ARTIK 10

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

Page 1: TIZEN on ARTIK - 삼성 오픈소스 컨퍼런스 · Tizen on ARTIK 05 IoT Simple Application on ARTIK Cloud 17 ... High Scalability IoT Connectivity & System I/O ARTIK 5 ARTIK 10

TIZEN on ARTIK

소프트웨어센터 | Tizen Platform Lab

박지환

2016. 11. 17

Page 2: TIZEN on ARTIK - 삼성 오픈소스 컨퍼런스 · Tizen on ARTIK 05 IoT Simple Application on ARTIK Cloud 17 ... High Scalability IoT Connectivity & System I/O ARTIK 5 ARTIK 10

Tizen Common

Tizen on ARTIK

IoT Simple Application on ARTIK Cloud

Reference

03

05

17

22

목차

Page 3: TIZEN on ARTIK - 삼성 오픈소스 컨퍼런스 · Tizen on ARTIK 05 IoT Simple Application on ARTIK Cloud 17 ... High Scalability IoT Connectivity & System I/O ARTIK 5 ARTIK 10

Tizen Common | Overview

Tizen Profiles

Tizen:Common

• General Purpose

• Keep minimal feature set between profiles

• Support Low-End to High-End Coverage of devices

Tizen:Common on ARTIK

• IoT Development HW Kit

• Product ready platform

Page 4: TIZEN on ARTIK - 삼성 오픈소스 컨퍼런스 · Tizen on ARTIK 05 IoT Simple Application on ARTIK Cloud 17 ... High Scalability IoT Connectivity & System I/O ARTIK 5 ARTIK 10

Tizen Common | Architecture

Packages in Tizen 3.0 Tizen Common

Profile pkgs

Mobile 708

TV 562

Wearable 621

Common 560

Page 5: TIZEN on ARTIK - 삼성 오픈소스 컨퍼런스 · Tizen on ARTIK 05 IoT Simple Application on ARTIK Cloud 17 ... High Scalability IoT Connectivity & System I/O ARTIK 5 ARTIK 10

Tizen on ARTIK | ARTIK board

New target board “ARTIK”

High Scalability

IoT Connectivity & System I/O

ARTIK 5 ARTIK 10 SIZE SIZE 29mm x 25mm 29 x 39 mm CPU / GPU CPU / GPU ARM based Dual Core @1GHz each ARM Mali 400 MP2

ARM based Octa Core [email protected] + [email protected] ARM Mali T628 MP6

MEMORY & STORAGE MEMORY & STORAGE 512MB LPDDR3 + 4GB eMMC 2GB LPDDR3 + 16GB eMMC CONNECTIVITY CONNECTIVITY WiFi/BT/BLE + ZigBee/Thread (802.11 b/g/n)

WiFi/BT/BLE + ZigBee/Thread (802.11 b/g/n)

HW SECURITY HW SECURITY Secure Element, TEE (TrustZone) Secure Element, TEE (TrustZone) HW VIDEO CODECS HW VIDEO CODECS H.263/H264/MPEG-4/VP8 (720p) @30fps and decoding of MPEG-2/VC1/Xvid (720p)@30fps

1080p@120fps H.263/H.264/ MPEG-4/VP8 and decoding of MPEG-2/VC1

I/O header

Page 6: TIZEN on ARTIK - 삼성 오픈소스 컨퍼런스 · Tizen on ARTIK 05 IoT Simple Application on ARTIK Cloud 17 ... High Scalability IoT Connectivity & System I/O ARTIK 5 ARTIK 10

Tizen on ARTIK | Bring-up

Tizen Common Applications

device Status App

3D-Rendering working Test app

B/T working Setting

Wifi working Setting

Camera working Sample app

Video working(mp4) Sample app

Audio working(wav) Sample app

Camera Player GL-Test

Tizen Common Menu screen

Setting App

Wi-Fi 설정

BT 설정

Page 7: TIZEN on ARTIK - 삼성 오픈소스 컨퍼런스 · Tizen on ARTIK 05 IoT Simple Application on ARTIK Cloud 17 ... High Scalability IoT Connectivity & System I/O ARTIK 5 ARTIK 10

Tizen on ARTIK

Tizen Common Porting

Tizen Configuration – model config

Build Configuration – kickstart

Tizen Porting Layer - Display : libtbm / libtdm backend, DDK Plugin

Tizen Porting Layer - BT/WiFi : Chipset Plugin & Kernel Driver

Tizen Porting Layer – AUDIO : Audio Hal

Tizen Kernel Driver - GPU Mali

Tizen:Common Configuration

HW Porting Layer

Plugin

Kernel Driver

※ Without HW porting changes… ???

Page 8: TIZEN on ARTIK - 삼성 오픈소스 컨퍼런스 · Tizen on ARTIK 05 IoT Simple Application on ARTIK Cloud 17 ... High Scalability IoT Connectivity & System I/O ARTIK 5 ARTIK 10

Tizen on ARTIK | Feature Configuration

Model config

Feature enable/disable

Created for each target 1. model-config package 신규 생성 model-config-artik.noarch 0.0.1-2.1 platform/adaptation/artik/model-config-artik 2. Feature enable하기 위한 설정 <key name="tizen.org/feature/network.wifi.tdls" type="bool">false</key> <key name="tizen.org/feature/iot.ocf" type="bool">true</key> <key name="tizen.org/feature/consumer_ir" type="bool">false</key> <key name="tizen.org/feature/network.bluetooth.audio.controller" type="bool">false</key> <key name="tizen.org/feature/network.bluetooth.hid_device" type="bool">false</key> <key name="tizen.org/feature/network.bluetooth.phonebook.client" type="bool">false</key>

Kernel

Tizen Common Platform Binary

ARTIK5

ARTIK odroid

ARTIK7 ARTIK10

Plug-in

ARTIK5 ARTIK7 ARTIK10

u-boot

ARTIK5 ARTIK7 ARTIK10

2 Binaries

Page 9: TIZEN on ARTIK - 삼성 오픈소스 컨퍼런스 · Tizen on ARTIK 05 IoT Simple Application on ARTIK Cloud 17 ... High Scalability IoT Connectivity & System I/O ARTIK 5 ARTIK 10

Image Re-Creation with MIC

1. kistkstart file

2. mic ( Mic Image Creator)

3. local package를 대체 : –local-pkgs-path=[PATH]

4. local의 rpm package를 설치: –local-pkgs-path=[PATH]

5. rootfs.img, system-data.img, user.img

6. e2fsck, resize2fs

Modify created image (download site)

• how to add new rpms

• how to extract existing rpms

Partition

Package repo.

package lists

Tizen on ARTIK | Build Configuration

Page 10: TIZEN on ARTIK - 삼성 오픈소스 컨퍼런스 · Tizen on ARTIK 05 IoT Simple Application on ARTIK Cloud 17 ... High Scalability IoT Connectivity & System I/O ARTIK 5 ARTIK 10

Example in ARTIK10 1. ks파일 copy

$ wget https://download.tizen.org/snapshots/tizen/common/latest/images/arm-wayland/common-wayland-3parts-armv7l-artik/tizen-common_20161107.2_common-wayland-3parts-armv7l-artik.ks

2. ks file edit considering partition volume size part / --fstype="ext4" --size=3500 --ondisk=mmcblk0 --label rootfs --fsoptions=defaults,noatime part /opt --fstype="ext4" --size=512 --ondisk=mmcblk0 --label system-data --fsoptions=defaults,noatime part /opt/usr --fstype="ext4" --size=3500 --ondisk=mmcblk0 --label user --fsoptions=defaults,noatime

3. mic create $ sudo mic create loop tizen-common_20160309.1_common-wayland-3parts-armv7l-artik10.ks --tmpfs rootfs.img, system-data.img, user.img

4. flash image files ARITK10 # run tizen_format (or thordown) in host pc, start writing $ sudo fastboot flash rootfs rootfs.img $ sudo fastboot flash system-data system-data.img $ sudo fastboot flash user user.img

Tizen on ARTIK | Build Configuration

Page 11: TIZEN on ARTIK - 삼성 오픈소스 컨퍼런스 · Tizen on ARTIK 05 IoT Simple Application on ARTIK Cloud 17 ... High Scalability IoT Connectivity & System I/O ARTIK 5 ARTIK 10

Tizen on ARTIK | HW Layer

Porting Layer - Display

Kernel layer – display sub system, input sub system, memory sub system

Display Server

TBM (Buffer

manager)

TDM (Display

manager)

Input manager

EGL Porting Layer

GL

EvasGL CoreGL

TDM Backend TBM Backend

GPU Vender DDK

3D UI Toolkit

Uses

Class

Reused Module

Modified

- libtdm-drm (used) - libtdm-exynos

- libtbm_exynos(used) - libtbm_dumb - libtbm_vigs - libtbm-sprd

- libtpl-egl - libwayland-egl - opengl-es-mali-midgard (ARTIK10) - opengl-es-mali-utgard (ARTIK5) - coregl-0.1.10-02

Page 12: TIZEN on ARTIK - 삼성 오픈소스 컨퍼런스 · Tizen on ARTIK 05 IoT Simple Application on ARTIK Cloud 17 ... High Scalability IoT Connectivity & System I/O ARTIK 5 ARTIK 10

Porting Layer - BT Tizen Native / Web Application

Tizen Bluetooth Service

Kernel

Bluetooth Driver Firmware

Dbus

Socket

BT keyboard

Porting

- BT Broadcom Chip Driver plug-in

bluetooth-firmware-bcm-artik.armv7l

- [kernel] Board dep. GPIO configuration

- [kernel] rfkill and power management for BT

- [chipset] BT Firmware

- Add BT feature to model-config

Opensource Daemon Bluetoothd Obexd

Bluetooth Subsystem

Reused Module

Modified

BT Driver Plug-in

Driver F/W

Tizen on ARTIK | HW Layer

Page 13: TIZEN on ARTIK - 삼성 오픈소스 컨퍼런스 · Tizen on ARTIK 05 IoT Simple Application on ARTIK Cloud 17 ... High Scalability IoT Connectivity & System I/O ARTIK 5 ARTIK 10

Porting Layer – Wi-Fi WIFI Application

Tizen Middleware

Kernel

Hardware

Connman Daemon

Net-config Daemon

Wi-Fi Direct Manager

WPA Supplicant WLAN Driver Plug-in

Netlink Interface

WLAN Host Driver

SDIO Host Driver

Wi-Fi chipset

Porting

- Wi-Fi Broadcom Chip Driver plug-in

wlandrv-plugin-tizen-bcm43xx.armv7l

- [chipset] Wi-Fi Firmware

- Add Wi-Fi feature to model-config

Dbus

Socker

Reused Module

Modified

Driver F/W

Tizen on ARTIK | HW Layer

Page 14: TIZEN on ARTIK - 삼성 오픈소스 컨퍼런스 · Tizen on ARTIK 05 IoT Simple Application on ARTIK Cloud 17 ... High Scalability IoT Connectivity & System I/O ARTIK 5 ARTIK 10

Porting Layer - AUDIO

PCM stream

Device 선택

Volume

Codec Routing

PulseAudio

Audio HAL

ALSA UCM (ak4953) ALSA

Reused Module

Modified Porting

- Audio HAL package 추가

audio-hal-ak4953.armv7l

- Sound codec 용 UCM scenario 추가

alsa-ucm-data-ak4953.noarch

- Add Audio feature to model-config ak4953

Hardware Audio Codec (ak4953) chipset

Kernel AK4953 Driver

Tizen on ARTIK | HW Layer

Page 15: TIZEN on ARTIK - 삼성 오픈소스 컨퍼런스 · Tizen on ARTIK 05 IoT Simple Application on ARTIK Cloud 17 ... High Scalability IoT Connectivity & System I/O ARTIK 5 ARTIK 10

Porting Layer - GPU

Version Before After

ARTIK5 r4p0 r5p2

ARTIK10 r5p0 r12p0

Mali Version Upgrade

Porting (ARTIK10)

Upgrade r5p0_06rel0 → r12p0_04rel0

1. driver\gpu\arm\midgard 폴더에 r5p0_06rel0 폴더를 생성한다.

2. midgard 폴더에 Makefile, Kconfig 파일을 제외한 파일을 r5p0_06rel0로 이동한다.

3. driver\gpu\arm\midgard 폴더에 r12p0_04rel0 파일을 만든다.

4. midgard r12p0_04rel0의 최신 소스를 drvier\gpu\arm\midgard\r12p0_04rel0에 받는다.

5. driver\gpu\arm\midgard의 Makefile, Kconfig 안에 r12p0_04rel0 폴더를 추가해준다.

6. arch\arm\config\artik10_defconfig 파일에 아래와 같이 추가해준다.

- CONFIG_MALI_VER_R12P0_04REL0=y

- CONFIG_MALI_PLATFORM_DEVICETREE=y

Performance Test using GLB2.1 Benchmark

Test Cases ARTIK5 ARTIK10

version r4p0 r5p2 r5p0 r12p0

GLB2.1 2000 10.67 47.70 43.44 54.97

2010 13.85 27.42 190.27 196.22

2100 15.35 55.90 52.29 59.23

2111 27.42 54.56 354.99 398.36

Tizen on ARTIK | HW Layer

Page 16: TIZEN on ARTIK - 삼성 오픈소스 컨퍼런스 · Tizen on ARTIK 05 IoT Simple Application on ARTIK Cloud 17 ... High Scalability IoT Connectivity & System I/O ARTIK 5 ARTIK 10

Graphic Performance

Test Cases ODROID-XU3 - exynos5422 - 1920x1080 GPU : 400MHz CPU0 : 1300000 CPU4: 1800000

ARTIK10 - exynos5422 - 1920x1080 GPU : 400MHz CPU0:1300000 CPU4:1500000

GLB2.1 2000 60.45 54.97

2010 176.51 196.22

2100 107.12 59.23

2111 342.20 398.36

ODROID-XU3 vs ARTIK10 (HWC, r12p0)

Test Cases TW1 - exynos3250 CPU : 200000 GPU : 133MHz

ARTIK5 - exynos3250 - 480x800 CPU : performance GPU : 160MHz

TM1 - sc7730 - 720x1280 CPU : performance GPU : 460MHz

ARTIK5 - exynos3250 - 720x1280 CPU : performance GPU : 160MHz

GLB2.1 2000 58.62 47.70 50.75 27.56

2010 22.72 27.42 62.75 27.44

2100 55.15 55.90 58.71 48.43

2111 45.58 54.56 107.83 54.57

TM1, TW1 vs ARTIK5 (HWC, r5p2)

- CPU Mode : Set “scaling_governor” as “performance” mode

- GPU Clock : 160MHz(Artik5), 400 MHz(Artik10)

- Adaptation no-compositor

Tizen on ARTIK | HW Layer

Page 17: TIZEN on ARTIK - 삼성 오픈소스 컨퍼런스 · Tizen on ARTIK 05 IoT Simple Application on ARTIK Cloud 17 ... High Scalability IoT Connectivity & System I/O ARTIK 5 ARTIK 10

IoT Simple Application on ARTIK Cloud

Demo

Page 18: TIZEN on ARTIK - 삼성 오픈소스 컨퍼런스 · Tizen on ARTIK 05 IoT Simple Application on ARTIK Cloud 17 ... High Scalability IoT Connectivity & System I/O ARTIK 5 ARTIK 10

IoT Simple Application on ARTIK Cloud

Z3

Page 19: TIZEN on ARTIK - 삼성 오픈소스 컨퍼런스 · Tizen on ARTIK 05 IoT Simple Application on ARTIK Cloud 17 ... High Scalability IoT Connectivity & System I/O ARTIK 5 ARTIK 10

IoT Simple Application on ARTIK Cloud

Demo Contents

ARTIK Cloud

system IO

node.js

Native App

Tizen Middleware

system IO Interface

node.js

system IO add-on

JS App

Kernel

I2C GPIO SPI ADC UART PWM

Dbus

Socket

Module

New

ARTIK Cloud Interface

Cloud Rule

sensor actuator

Page 20: TIZEN on ARTIK - 삼성 오픈소스 컨퍼런스 · Tizen on ARTIK 05 IoT Simple Application on ARTIK Cloud 17 ... High Scalability IoT Connectivity & System I/O ARTIK 5 ARTIK 10

IoT Simple Application on ARTIK Cloud

Devices

ARTIK5 : Sensor

Tizen Middleware

system IO Interface

node.js

system IO add-on

JS App

Kernel I2C

sensor

Native App

Tizen Middleware

ARTIK Cloud Interface

Cloud Rule

Z3

ARTIK10 : Actuator

Tizen Middleware

system IO Interface

node.js

system IO add-on

JS App

Kernel PWM

actuator

data action

edit rules

SG-90 Servo-motor GY-30 Light-sensor

Page 21: TIZEN on ARTIK - 삼성 오픈소스 컨퍼런스 · Tizen on ARTIK 05 IoT Simple Application on ARTIK Cloud 17 ... High Scalability IoT Connectivity & System I/O ARTIK 5 ARTIK 10

IoT Simple Application on ARTIK Cloud

System I/O

system IO

Event Handler

HW Interface

Resource Manager

API

HW Configuration

Service Main Loop

module Description

Service Main Loop API request에 대한 main core loop

Resource Manager H/W 상태 관리 및 Resource Capability 속성 관리

Event Handler H/W Data/상태 변화 event에 대한 서비스 제공

HW Interface Bus HW (GPIO, I2C,…)에 대한 functionality 제공

HW Configuration Table 제어 가능한 HW Capability variation 정의

https://github.com/tizen-artik/iotbus https://github.com/tizen-artik/node_iotbus

Page 22: TIZEN on ARTIK - 삼성 오픈소스 컨퍼런스 · Tizen on ARTIK 05 IoT Simple Application on ARTIK Cloud 17 ... High Scalability IoT Connectivity & System I/O ARTIK 5 ARTIK 10

Reference

Deployment wiki Main Page

• https://wiki.tizen.org/wiki/Tizen_On_ARTIK

Binary Repository

• http://download.tizen.org/releases/weekly/tizen/common_artik/latest/images/

User guide

• wiki

https://wiki.tizen.org/wiki/Booting_Tizen_3.0_From_eMMC_On_ARTIK (booting with eMMC)

https://wiki.tizen.org/wiki/Booting_Tizen_3.0_From_microSD_On_ARTIK (booting with SD card)

https://wiki.tizen.org/wiki/Tutorial_for_Hardware_on_ARTIK_with_Tizen (How to use ARTIK HW functionalities with Tizen )

• github

https://github.com/tizen-artik/sdboot (Necessary files for SD card booting)

• How to get HW Plugin Binary

Mali DDK can be downloaded after EULA agreement in http://developer.samsung.com/tizendevice/firmware

BT/Wifi plugin can be shared by CPCex only for development purpose (BRCM policy)

Page 23: TIZEN on ARTIK - 삼성 오픈소스 컨퍼런스 · Tizen on ARTIK 05 IoT Simple Application on ARTIK Cloud 17 ... High Scalability IoT Connectivity & System I/O ARTIK 5 ARTIK 10

Reference

Instruction for Tizen On ARTIK 1. Select your hardware and media

• ARTIK 10 / ARTIK 5

• SD Card / eMMC

2. Download and flash Tizen-ARTIK image

3. Install plugin

• DDK

• BT/Wi-Fi

4. Connect the board to the network

• WiFi

• Ethernet

5. Quick-Run Samples

Download Site

Plug-in

Git-hub

Page 24: TIZEN on ARTIK - 삼성 오픈소스 컨퍼런스 · Tizen on ARTIK 05 IoT Simple Application on ARTIK Cloud 17 ... High Scalability IoT Connectivity & System I/O ARTIK 5 ARTIK 10

Copyright ⓒ 2016 SAMSUNG ELECTRONICS. ALL RIGHTS RESERVED

THANK YOU