50
1 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
Dongkun Shin Embedded Software Lab., Sungkyunkwan Univ. dongkun.shin@gmail.com, http://nyx.skku.ac.kr
Porting Tizen to Odroid-U3 & Tizen Training Course Dongkun Shin - - PowerPoint PPT Presentation
1 50 Porting Tizen to Odroid-U3 & Tizen Training Course Dongkun Shin Embedded Software Lab., Sungkyunkwan Univ. dongkun.shin@gmail.com, http://nyx.skku.ac.kr KOREA LINUX Dongkun Shin (dongkun.shin@gmail.com) FORUM 2014 Tizen Reference
50
1 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
Dongkun Shin Embedded Software Lab., Sungkyunkwan Univ. dongkun.shin@gmail.com, http://nyx.skku.ac.kr
50
2 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
KOREA LINUX FORUM 2014
http://seoz.egloos.com/viewer/3940983 Exynos 4412 Exynos 4210
50
3 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
KOREA LINUX FORUM 2014
http://linuxgizmos.com/top-10-hacker-sbcs-survey-results/ BCM2835 AM3358 Exynos4412
50
4 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
KOREA LINUX FORUM 2014
Odroid U3 Specification
50
5 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
KOREA LINUX FORUM 2014
RD-PQ Reference Tizen Phone Odroid-U3
No GPS, Sensors, LCD, Speaker, Battery, and Keys USB-type WiFi/Bluetooth, HDMI
50
6 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
KOREA LINUX FORUM 2014
– How to Build and Load Tizen on Odroid U3 (https://wiki.tizen.org/wiki/How_to_Build_and_Load_Tizen_on_Odroid_U3) – Tizen Porting Guide (https://wiki.tizen.org/wiki/Porting_Guide) – Creating Tizen Images with MIC in Tizen Developer Guide (https://source.tizen.org/ko/documentation/developer-guide)
50
7 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
KOREA LINUX FORUM 2014
bl1.bin bl2.bin u-boot.bin
From Hardkernel From Tizen $ git clone ssh://your_id@review.tizen.org:29418/platform/kernel/u-boot.git u-boot-tizen $ cd u-boot-tizen $ git checkout -b tizen origin/tizen
tzsw.bin
50
8 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
KOREA LINUX FORUM 2014
$ git clone ssh://your_id@review.tizen.org:29418/platform/kernel/linux-3.10.git kernel-tizen $ cd kernel-tizen $ git checkout -b tizen origin/tizen
– You need tizen.org account
50
9 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
KOREA LINUX FORUM 2014
– defconfig & dtb
(menuconfig)
– Enable RF switch subsystem support – Enable usb WiFi modules driver – Enable Bluetooth device
– Include initramfs & dtb – See https://wiki.tizen.org/wiki/How_to_Build_and_Load_Tizen_on_Od roid_U3
50
10 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
KOREA LINUX FORUM 2014
– Git, Repo, Gerrit
– GBS(Git Build System)
– MIC, RPM
50
11 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
KOREA LINUX FORUM 2014
Need new profile for ODROID-U3
50
12 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
KOREA LINUX FORUM 2014
– Defines the features of target device (usually hardware features) – Used for making platform image – There are only profiles for Tizen reference phones, emulators!
– No 3G/LTE modem, on-board Bluetooth, on-board GPS, camera,
– However it has a touch screen, USB host ports …
50
13 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
KOREA LINUX FORUM 2014
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <model-config version="2.2.0" model="ODROID-U3-REF"> <platform> <!-- Model Name, Platform Name/Version, Processor Name --> <key name="tizen.org/system/model_name" type="string">ODROID-U3</key> <key name="tizen.org/system/platform.name" type="string">Tizen</key> <key name="tizen.org/feature/platform.version" type="string">2.2</key> <key name="tizen.org/system/platform.processor" type="string">exynos4412</key> <!-- Specification of Features --> <key name="tizen.org/feature/camera" type="bool">false</key> <key name="tizen.org/feature/camera.back" type="bool">false</key> … </platform> <custom> </custom> </model-config>
~/tizen-platform/profile/mobile/model/config-odroid-u3/ model-config.xml ~/tizen-platform/profile/mobile/model/config-odroid-u3/ model-config.xml
50
14 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
KOREA LINUX FORUM 2014
Partition Mount Point Option Description
/dev/mmcblk0p1 /csa RW
Configuration Saved Area
/dev/mmcblk0p2 /boot RO
Boot, Kernel image
/dev/mmcblk0p3
/dev/mmcblk0p4 /mnt/csc RW
Customer Software Configuration , store customer’s software configuration
/dev/mmcblk0p5 / RO
Platform, root director
/dev/mmcblk0p6 /opt RW
Data, applications, libraries of applications, and the platform database
/dev/mmcblk0p7 /opt/media RW
UMS, default (media) contents.
50
15 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
KOREA LINUX FORUM 2014
Based on 8GB SD Card
Bootloader U-boot Boot zImage Platform Platform.img Data data.img UMS ums.img
50
16 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
KOREA LINUX FORUM 2014
AC Adapter Odroid VU Touch HDMI AC Adapter WiFI or Bluetooth Modules U-ART SD Card USB
Odroid U3
50
17 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
KOREA LINUX FORUM 2014
… Change mount option!!
50
18 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
KOREA LINUX FORUM 2014
– Remove module image mount (only for reference phone)
Edit Edit Edit
50
19 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
KOREA LINUX FORUM 2014
after a few seconds Enter sleep mode Freeze u-art connection
50
20 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
KOREA LINUX FORUM 2014
– Control the power states – Four states: Normal / LCD Dim / LCD Off / Sleep
– Modify pm_core.c
State 0 State 1 State 2 State 3 Normal LCD Dim LCD Off Sleep State 0 State 1 State 2 State 3 Normal LCD Dim LCD Off LCD Off
Don’t enter sleep mode
50
21 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
KOREA LINUX FORUM 2014
– The default DDX connection in Tizen is LCD(LVDS) – exynos_drv.so
Display
Default Connection LVDS → HDMI
Modify
50
22 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
KOREA LINUX FORUM 2014
Touch coordinate error Non working WiFi / Bluetooth No exist hardware key (Home/Menu/ Back) Battery low error No sound No openGL support
50
23 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
KOREA LINUX FORUM 2014
– Calculate calibration value using xinput_calibrator
Touch Error
50
24 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
KOREA LINUX FORUM 2014
RD-PQ Tizen Reference Phone
Menu Home Back
Only one key (Power) No key
50
25 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
KOREA LINUX FORUM 2014
– Edit /etc/X11/Xmodmap (Key mapping table)
keycode 67 = XF86AudioRaiseVolume keycode 68 = XF86AudioLowerVolume keycode 69 = Cancel keycode 70 = XF86Send (Menu) keycode 71 = XF86Phone (Home) keycode 72 = XF86Stop (Back) keycode 73 = XF86Search
50
26 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
KOREA LINUX FORUM 2014
– use ifconfig wlan0 up/down
– /lib/modules/
/usr/bin/wlan.sh
Device enable / disable
Firmware load for each working
Run shell script
IFACE_NAME=wlan0 start() { /sbin/ifconfig ${IFACE_NAME} up } stop() { /sbin/ifconfig ${IFACE_NAME} down }
50
27 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
KOREA LINUX FORUM 2014
/usr/etc
Device enable / disable Bluetooth env reset
Four shell script
Run shell script
/usr/sbin/hciconfig hci0 up /usr/sbin/bluetoothd -d /usr/bin/bluetooth-share & /usr/sbin/hciconfig hci0 down killall bluetooth-share killall bluetoothd
bt-stack-up.sh bt-stack-down.sh
50
28 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
KOREA LINUX FORUM 2014
– System can’t get battery info – Some apps are not launched
Error
No battery info
50
29 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
KOREA LINUX FORUM 2014
Tizen F/W OAL Kernel Battery always return 100 %
50
30 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
KOREA LINUX FORUM 2014
– /etc/pulse/system.pa
RD-PQ Reference Tizen Phone
Speker Earphone jack Only Earphone jack
Odroid U3
50
31 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
KOREA LINUX FORUM 2014
50
32 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
KOREA LINUX FORUM 2014
– For mali400 GPU in Exynos4412 – Three packages (for kernel 3.10)
– Source code is under the standard ARM commercial license to Mali GPU customers
Just install !
50
33 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
KOREA LINUX FORUM 2014
YouTube: http://www.youtube.com/watch?v=IrZK37pNRPM
50
34 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com) Acid3
http://acid3.acidtests.org/
HTML5 Benchmark
http://html5-benchmark.com/
Browsermark
http://browsermark.rightware.com/
Sunspider
https://www.webkit.org/perf/sunsp ider/sunspider.html
WebGL Bench
https://webgl-bench.appspot.com/
V8 Benchmark Suite
http://v8.googlecode.com/svn/ data/benchmarks/v7/run.html
HTML5TEST
http://html5test.com/
50
35 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
benchmark RD-PQ Odroid-U3 Comment HTML5 Test 465 465 Higher is better Acid 3 100 100 Total: 100 HTML5-Benchmark 1152 1490 Higher is better Browsermark
Higher is better Sunspider 1088.8ms 1087.8ms Lower is better V8 Benchmark Suite 1556 1551 Higher is better webgl-bench
50
36 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
50
37 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
50
38 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
– “Professional Tizen Application Development”
– Tizen Dev Guide – https://source.tizen.org/ko/documentation/developer-guide
– Tizen Developer Conference 2012~2014
Introductions
features)
system
50
39 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
50
40 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
Week Topic Week Topic 1 Introduction on Tizen 8 Graphics & UI F/W (EFL, X) 2 Tizen SDK and App Development 9 Multimedia F/W (Gstreamer) 3 Tizen Kernel & Booting Platform Dev. Environment
10 Web F/W (Webkit, WRT, Device API) 4 Building Platform & Kernel 11 Future of Tizen
5 Porting Tizen into Odroid-U3 Project Example 12 Invited Talk – Understanding Open Source 6 Project Proposal 13 Project Demo 7 Base, App & System F/W 14 Final Exam
50
41 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
50
42 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
– Tizen Virtual Key Device Driver
– Tizen Remote Key Server Service
– Android Client Application
50
43 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
– Profiling system calls in VFS – Register profile results at App Info. DB – AUL daemon prefetch data – Need to understand Application framework
Prefetch Info
50
44 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
– Virtualize remote sensor as internal sensor – Abstract the connection of remote sensor
– Need to understand Sensor framework
Android Smartphone ODROID-U3 ODROID-VU callback
50
45 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
– Get temperature and humidity information from Oduino device
– Adjust display color – Need to understand on UI & graphics framework
ODUINO One DHT11
50
46 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
– Profile runtime, CPU time and I/O time (storage, network) – Service daemon collects power consumption info. from system- server, devman (device manager), and power manager – Need to understand the interface between platform and kernel
50
47 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
– “GemDroid: A Framework to Evaluate Mobile Platforms”, ACM SIGMETRICS, 2014. – GEM5: Cycle accurate core simulator – Capture instruction-level trace from QEMU and replay with GEM5 – Can be used to conduct various studies: core, memory, individual IPs, system-level performance/power
GEM5
– Evaluate the CPU and memory behavior of Tizen – Compare HTML5-based Web App vs. C++-based native App – Need to understand Tizen emulator architecture
50
48 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
50
49 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
– Full open-development (anyone can contribute to Tizen platform) – Students are able to contribute to the Tizen platform via this course. – Need Tizen 3.0 porting to Odroid-U3
50
50 KOREA LINUX FORUM 2014
Dongkun Shin (dongkun.shin@gmail.com)
Hyukjoong Kim Yeonghoon Kim Gyeonghwan Hong Daejong Kim Minji Kim Eunsoo Park