SAMSUNG ELECTRONICS CO LTD. Tizen Porting Guide. Tizen the True Open Platform 9/10/ PDF

Please download to get full document.

View again

of 120
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Information Report
Category:

Small Business & Entrepreneurship

Published:

Views: 10 | Pages: 120

Extension: PDF | Download: 0

Share
Related documents
Description
SAMSUNG ELECTRONICS CO LTD. Tizen Prting Guide Tizen the True Open Platfrm 9/10/2012 This dcument acts as a guide fr prting and bringing up the Tizen OS n a new hardware platfrm. Tizen Prting Guide Revisin
Transcript
SAMSUNG ELECTRONICS CO LTD. Tizen Prting Guide Tizen the True Open Platfrm 9/10/2012 This dcument acts as a guide fr prting and bringing up the Tizen OS n a new hardware platfrm. Tizen Prting Guide Revisin Histry Versin Date Cmments /13/2012 Tizen Prting Guide Initial versin 2.0-α 09/10/2012 Overall dcument update c 2012 SAMSUNG Electrnics C., Ltd. Prprietary Page 1 f 143 Tizen Prting Guide Cntents CONTENTS... 2 INTRODUCTION... 6 Abut Tizen... 6 Purpse f this dcument... 6 TIZEN ARCHITECTURE... 7 The Applicatin Layer... 8 The Cre Layer... 8 The Kernel Layer... 9 DEVELOPMENT ENVIRONMENT SETUP Tizen OS Develpment Setup Intrductin t OBS OBS Light OBS Light server Appliance OBS Light Client Appliance Installatin f SDK GETTING SOURCE CODE & BUILD Platfrm Build Kernel Build TIZEN BOOTUP OVERVIEW Kernel Btup Platfrm Btup BSP CUSTOMIZATION Btlader Fundamentals Btlader Setup and Build c 2012 SAMSUNG Electrnics C., Ltd. Prprietary Page 2 f 143 Tizen Prting Guide Btlader Cmmands Supprt Btlader Kernel Parameters KERNEL FUNDAMENTALS Kernel Cnfiguratins Tizen File System Virtual Filesystem (VFS ) Tizen Partitin Layut File-system Hierarchy Standard in Tizen Cnfiguratin Reference MMC Descriptin Reference SYSTEM System Framewrk Descriptin Prting OAL Interface Cnfiguratin Reference Sensr Framewrk Descriptin Prting OAL Interface Cnfiguratin Reference GRAPHICS AND UI OpenGL D Graphics Library EGL (Embedded-System Graphics Library) Prting OpenGL ES X server Input Driver Descriptin: Prting OAL Interface: Cnfiguratin Vide Driver Descriptin: Prting OAL Interface: c 2012 SAMSUNG Electrnics C., Ltd. Prprietary Page 3 f 143 Tizen Prting Guide Cnfiguratin References MULTIMEDIA Camcrder Descriptin Prting OAL Interface Cnfiguratin References Radi Descriptin Prting OAL Interface Cnfiguratin References Audi Descriptin Prting OAL Interface Cnfiguratin References Player Descriptin Prting OAL Interface Cnfiguratin References Cdec Descriptin Prting OAL Interface Cnfiguratin References CONNECTIVITY Bluetth Descriptin Prting OAL Interface Cnfiguratin References WLAN Descriptin: Prting OAL Interface: Cnfiguratin: References: NFC Descriptin c 2012 SAMSUNG Electrnics C., Ltd. Prprietary Page 4 f 143 Tizen Prting Guide Prting OAL Interface Cnfiguratin Reference LOCATION Descriptin Prting OAL Interface Cnfiguratin References TELEPHONY Descriptin Prting OAL Interface Cnfiguratin APPENDIX Sensr Prcessr Plugin APIs NFC OAL API c 2012 SAMSUNG Electrnics C., Ltd. Prprietary Page 5 f 143 Tizen Prting Guide Intrductin Abut Tizen Tizen is an pen surce standards-based sftware platfrm, targeted twards multiple device segments, including smart phnes, tablets, netbks, in-vehicle inftainment devices, smart TVs, and mre. Purpse f this dcument The intent f this dcument is t prvide infrmatin and instructin t bt Tizen n new hardware and create prducts based n the Tizen OS. The Tizen prting guide takes yu thrugh the prting prcess by elabrating the Tizen architecture, the tls needed, the develpment envirnment setup, as well as creating a Tizen Image and demnstrating the mdificatins needed acrss varius functinal areas. c 2012 SAMSUNG Electrnics C., Ltd. Prprietary Page 6 f 143 Tizen Prting Guide Tizen Architecture The figure belw illustrates the Tizen architecture fr smartphne and tablet devices. c 2012 SAMSUNG Electrnics C., Ltd. Prprietary Page 7 f 143 Tizen Prting Guide The Applicatin Layer Tizen supprts web applicatins. Tizen web applicatins leverage the full pwer f the platfrm, just like native applicatins. The Cre Layer The Cre layer cnsists f the Tizen API and Tizen Cre Service. Tizen API Tizen web applicatins can be develped using the Tizen Web API. The Tizen Web API is a cllectin f W3C (HTML5 and mre), Khrns WebGL, and newly defined device APIs. Tizen Cre Services Applicatin Framewrk The Applicatin Framewrk prvides applicatin management, including launching ther applicatins using the package name, URI, r MIME type. It als launches pre-defined services, such as the system dialer applicatin. The Applicatin Framewrk als ntifies applicatins f cmmn events, such as lw memry events, lw battery, changes in screen rientatin, and push ntificatin. Base Base cntains Linux* base essential system libraries that prvide key features, such as database supprt, internatinalizatin, and XML parsing. Cnnectivity Cnnectivity cnsists f all netwrk- and cnnectivity-related functinalities, such as 3G, Wi-Fi, Bluetth, HTTP, and NFC (Near Field Cmmunicatin). Data netwrk is based n CnnMan (Cnnectin manager), which prvides 3G and Wi-Fi based netwrk cnnectin management. Graphics and UI Graphics and UI cnsist f the system graphic and UI stacks, which includes the EFL (Enlightenment Fundatin Libraries), an X11-based windw management system, input methds, and OpenGL ES*. The heart f the Graphics cmpnent, the EFL, is a suite f libraries. It is fr creating rich graphics with ease, fr all UI reslutins. The libraries build UIs in layers, allwing fr 3D transfrmatins and mre. The EFL includes the Evas canvas API library and the elementary widget library. Lcatin Lcatin prvides lcatin based services (LBS), including psitin infrmatin, gecding, satellite infrmatin, and GPS status. It is based n GeClue, which delivers lcatin infrmatin frm varius psitining surces, such as GPS, WPS (Wi-Fi Psitining System), Cell ID, and sensrs. Messaging Messaging cnsists f SMS, MMS, , and IM. Multimedia Multimedia is based n GStreamer. It prvides supprt fr media, including vide, audi, imaging, and VIP. It als prvides media cntent management fr managing media file metadata infrmatin. c 2012 SAMSUNG Electrnics C., Ltd. Prprietary Page 8 f 143 Tizen Prting Guide PIM (Persnal Infrmatin Management) PIM enables managing user data n the device, including managing calendar, cntacts, tasks, and retrieving data abut the device cntext (such as device psitin and cable status). Security Security is respnsible fr security deplyment acrss the system. It cnsists f platfrm security enablers, such as access cntrl, certificate management, and secure applicatin distributin. System System cnsists f system and device management features, including: Interfaces fr accessing devices, such as sensrs, display, r vibratr. Pwer management, such as LCD display backlight dimming/ff and applicatin prcessr sleep. Mnitring devices and handling events, such as USB, MMC, charger, and ear jack events. System upgrade. Mbile device management. Telephny Telephny cnsists f cellular functinalities cmmunicating with the mdem: Managing call-related and nn-call-related infrmatin and services fr UMTS and CDMA. Managing packet service and netwrk status infrmatin fr UMTS and CDMA. Managing SMS-related services fr UMTS and CDMA. Managing SIM files, phne bk, and security. Managing SIM Applicatin Tlkit services fr UMTS. Web Web prvides a cmplete implementatin f the Tizen Web API ptimized fr lw pwer devices. It includes WebKit, which is a layut engine designed t allw web brwsers t render web pages. It als prvides web runtimes fr web applicatins. The Kernel Layer The Kernel layer includes Linux kernel and device drivers. c 2012 SAMSUNG Electrnics C., Ltd. Prprietary Page 9 f 143 Tizen Prting Guide Develpment Envirnment Setup This sectin prvides a brief verview abut setting up yur develpment envirnment n yur hst system, such as yur Ubuntu* system. The belw figure briefly describes the Tizen develpment envirnment setup. Fllw the steps belw t set up the develpment envirnment n yur Ubuntu system. Tizen OS Develpment Setup Please refer t the fllwing links t set up the Tizen OS Develpment envirnment and t btain infmatin regarding devlpment. http://surce.tizen.rg/s-develpment 1. Wrk Flw This sectin explains GIT/Gerrit based surce cde management and review prcess, package creatin using Open Build Service(OBS), and cde submissin methds, including develpment and upstream branches. 2. Develper Guide This sectin describes registratin and infrmatin n a develpment envirnment c 2012 SAMSUNG Electrnics C., Ltd. Prprietary Page 10 f 143 Tizen Prting Guide setup fr GIT/Gerrit, SSH, GIT Build system, Image creatr, and install tls. It includes the cde and package submissin using GIT and OBS buildsystem and the cmplete develpment flw. 3. Git Build System The GBS(Git-Build-System) is a custm cmmand line tl that supprts Tizen package develpment. This sectin explains abut aut-generating tarballs based n git repsitries, perfrming lcal and reprt builds, and OBS cde submissin. This sectin als has prcedure t mnitr remte build lg and status. 4. MIC Image Creatr This tls is used t create images fr Tizen. This sectin prvides detailed explainatins f image creatin, cnversin and chrting int image prcedure. As is explained in the abve URLs, Tizen develpment requires Open(SuSE) Build system and the required cmpnents. In the fllwing sectins, we will briefly intrduce varius such build requirements. Intrductin t OBS The Open Build Service (OBS) is an pen and cmplete distributin develpment platfrm that prvides a transparent infrastructure fr develpment f Linux distributins, used by pensuse, MeeG, and ther distributins. (Supprting als Fedra, Debian, Ubuntu, RedHat, and ther Linux distributins). OBS prvides the develpers an easy way f using web-based and cmmand based interface t achieve develpment activities. OBS maintains a cnsistent build envirnment, which each develper can rely n fr varius Linux distributins. Fr mre infrmatin n OBS, yu can refer t this link: http://build.tizen.rg/ OBS can be set up lcally r we can refer any available OBS services. rducts/draft/obs/bs-best-practices_draft/cha.bs.best-practices.lcalsetup.html is ne f th e links that talks abut setting up OBS server lcally. T make use f any available OBS servers, user credentials are required. Each OBS implemetiatin can have mre custmized tls t achi eve the build servies. Yu can find infrmatin n Tizen OBS and its custmized build tl, nam ed git-build-system(gbs), in this link http://surce.tizen.rg/s-develpment/git-build-system/ OBS Light OBS Light is an OBS base develpment prcess, but which is lighter t use. It creates an encapsulatin f OBS and presents a lighter face f OBS. c 2012 SAMSUNG Electrnics C., Ltd. Prprietary Page 11 f 143 Tizen Prting Guide OBS Light server Appliance This is a ready-t-use OBS fr MeeG and Tizen. pensuse Build Service(OBS) The pensuse Build Service appliance cntains the cmplete OBS stack, including a Wrker, the Backend, API, Webclient, and sc, the cmmand line client. FakeOBS is an added utility, thrugh which we can achieve private OBS Builds. OBS Light Client Appliance OBS Client Appliance cnsists f a cmmand line (bslight) and a graphical user interface GUI (bslightgui). OBS Client includes MIC t create a btable image. Installatin f SDK The Tizen SDK is a cmprehensive set f tls fr develping Tizen web applicatins. It cnsists f Web IDE, Emulatr, tl chain, sample cde, and dcumentatin. The beta release f the Tizen SDK runs n Windws*, as well as Ubuntu. Tizen Web applicatins may be develped withut relying n an fficial Tizen IDE, as lng as the applicatin cmplies with Tizen packaging rules. Use the link belw t dwnlad the Tizen SDK. http://develper.tizen.rg/sdk c 2012 SAMSUNG Electrnics C., Ltd. Prprietary Page 12 f 143 Tizen Prting Guide Getting Surce Cde & Build Fllw this link t dwnlad the full surce cde fr yur Tizen platfrm and kernel http://review.tizen.rg/git/ Refer t belw link fr mre infrmatin Srurce cde Management n Tizen releases: GIT/Gerrit: http://review.tizen.rg/gerrit Tizen Build setup OBS: http://build.tizen.rg/ Tizen Bug Tracking system Jira: http://bugs.tizen.rg/jira Dwnlad URL: Platfrm Build Fllw the link belw t get learn hw t add smething like belw: http://surce.tizen.rg/s-develpment/develper-guide Fllw the link belw t build the surce cde by using git build system. http://surce.tizen.rg/s-develpment/git-build-system Kernel Build Fllw the steps belw steps t build the Tizen kernel. Install and set up the sc, OBS client tls n yur system. Get the kernel surce package and spec file frm OBS. Yu can see kernel tar.gz and kernel.spec file. $ sc c TIZEN:2.0:System kernel Createdefcnfig kernel cnfiguratin file as per the target requirement. The cnfiguratin files available under arch/arm/cnfigs/ can be mdified by adding and remvking kernel cnfiguratin ptins t create a custmized default cnfig, file like xyz_defcnfig. Cpy the new cnfig file (such as xyz_defcnfig) int the arch/arm/cnfigs/ flder inside the kernel surce directry. This step can be skipped t use the existing defcnfig file. c 2012 SAMSUNG Electrnics C., Ltd. Prprietary Page 13 f 143 Tizen Prting Guide The fllwing cmmand is used t apply the custm cnfig file such as xyz_defcnfig fr the target, this cmmand can be updated within the spec file t specify the custm defcnfig file. make xyz_defcnfig The fllwing cmmand is used t build the kernel RPM package inside the kernel directry. $ sc build armv7el n-verify --clean Once the build is successful, the RPM kernel package is created under/var/tmp/buildrt/abuild/rpmbuild/rpms/armv7l/kernel armv7l.rpm. The kernel RPM package is dwnladed n t the target and installed, as belw # rpm Uvh kernel armv7l.rpm Instead f using the RPM kernel package, the kernel uimage can als be dwnladed t the target. The uimage is created under /var/tmp/build-rt/hme/abuild/rmpbuild/build /kernel /arch/arm/bt/uimage after the successful build. Create a tarball t dwnlad the kernel t yur target. $ cd /var/tmp/build-rt/hme/abuild/rpmbuild/build/kernel /arch/arm/bt/ $ tar cvf tizen-kernel.tar uimage c 2012 SAMSUNG Electrnics C., Ltd. Prprietary Page 14 f 143 Tizen Prting Guide Tizen Btup Overview This sectin prvides a brief verview f the typical bting sequence, starting frm bt lader t the kernel and the platfrm. Kernel Btup The Tizen btup prcess is the same as any ther Linux kernel. We just need t make sure that the crrect machine ID and the bt arguments are passed frm the bt lader. Platfrm Btup The system-plugin-slp is an OAL plugin fr bting the Tizen platfrm. Thisplugin shall be mdified as per the platfrm btup sequence requirements frm the vendr. The platfrm btup, using the OAL plugin (system-plugin-slp), is mentined belw and is applicable fr Tizen SDK Btup. c 2012 SAMSUNG Electrnics C., Ltd. Prprietary Page 15 f 143 Tizen Prting Guide Special file-systems like /prc, /tmp, /var, /sys and /dev are munted during munt *1+'. Make device nde abut NULL device. Run htplug daemn f Linux. Script checks fr special bting mde. Fr example, in charging mde r during FOTA (Firmware upgrade On The Air), it runs scripts frm /etc/rc.d/rc2.d. This directry shuld have the scripts fr the special bting mde. After exiting special bting mde, the target will be restarted. Fr the first time bting after dwnlading, resize all ext4 partitins befre munting them and cnfigure the device infrmatin. General file-systems fr Tizen like /pt, /pt/media are munted during munt *2+'. Set device nde permissins fr security. Start mdem bting. Run scripts in /etc/rc.d/rc3.d. Detailed sequence f rc3.d scripts are described in the next chapter. The fllwing sectin prvides an verview n the init script sequence fr the Tizen platfrm. c 2012 SAMSUNG Electrnics C., Ltd. Prprietary Page 16 f 143 Tizen Prting Guide In the Tizen SDK, rc.sysinit runs every scripts n rc3.d in the rder indicated abve. Fr example: S05dlg is run fr dlg. S10sqlfs-munt and S12vcnf-init is run fr vcnf which is cnfiguratin system fr Tizen. S20xserver is fr xserver - Xrg, and windw manager - enlightenment. Others are run fr each mdule. The scripts, which are nt imprtant fr bringing up the menu screen, are launched after the S46menudaemn script. In S46menudaemn script, register /pt/share/applicatins/*.desktp files, change the VCONFKEY_START value t 1, and then run the menu-screen. The Tizen Git repsitry fr the system-plugin-slp is http://review.tizen.rg/git/adaptatin/system-plugin-slp.git;a=summary The rpm package installatin f this plugin is: #zypper install system-plugin-slp Nte: Verify that the installatin cmmand is crrect. c 2012 SAMSUNG Electrnics C., Ltd. Prprietary Page 17 f 143 Tizen Prting Guide BSP Custmizatin This sectin cvers the basic cnfiguratin, set up, and build prcedure required fr building the bt lader and the kernel image. Btlader Fundamentals Bt lader is a small piece f sftware that is required t perfrm the basic hardware and peripheral initializatin and lad the kernel t RAM. Fr the Tizen platfrm, the bt lader cmes in tw parts. The first part is the primary bt lader and the secnd part is the secndary bt lader. The primary bt lader is the Samsung prprietary bt lader and is als called s-bt. The secndary bt lader is the pen surce bt lader u-bt, which is custmized further fr the Tizen platfrm. If yur platfrm is already laded with the cmpatible bt lader sftware, then yu can skip this sectin and mve directly t the kernel sectin. Btlader Setup and Build Fllw the steps t build the Tizen bt lader SSet up OBS (Open Build Service) n the hst system. Get btlader surce frm OBS, as shwn belw: $ sc c TIZEN:2.0:System u-bt Execute cmmand t build the bt lader image: $ sc build armv7el --n-verify --clean Once the build is successful, the btlader RPM package is created under /var/tmp/build-rt/hme/abuild/rpmbuild/ Create a btlader tarball t dwnlad the bt lader nt the target $ cd /var/tmp/build-rt/hme/abuild/rpmbuild/build/u-bt $ tar cvf btlader.tar u-bt.bin Btlader Cmmands Supprt The Tizen bt lader supprts varius cmmands, which are used with u-bt prmpt befre lading the kernel. Belw are sme examples f the cmmands used in bt lader. Example: usb reset printenv c 2012 SAMSUNG Electrnics C., Ltd. Prprietary Page 18 f 143 Tizen Prting Guide setenv saveenv ramdump pit help Yu can find the details abut each cmmand using the help cmmand fllwed by the cmmand name. Example: u-bt prmpt help ramdump ramdump - Kernel lckup/panic lgger Usage: ramdump shw klg/dlg - lg print n cnsle ramdump shw blg index[-1(default), 0] - lg print n cnsle ramdump save ram/klg/dlg/blg/fb - lg save as file n UMS ramdump lg - draw lg ramdump check - check header inf Btlader Kernel Parameters The cmmand line parameters can be passed frm bt lader t the kernel. Here are sme example cmmand line parameters. Example: cnsle=ttysac2,115200n8 csa=/dev/mmcblk0p1 c 2012 SAMSUNG Electrnics C., Ltd. Prprietary Page 19 f 143 Tizen Prting Guide Kernel Fundamentals The kernel is the perating system that drives the platfrm. Here the kernel refers t the pen surce Linux kernel that is custmized fr the Tizen platfrm. The fllwing sectin will give a brief verview abut the Tizen kernel setup, cnfiguratin, and the build prcedure fr building a Linux kernel fr yur Tizen platfrm. The utput f the kernel binary will be a uimage that is suitable nly fr u-bt bt lader. If yu have chsen fr a secure bting cnfiguratin in yur bt lader, then this uimage shuld be cmpatible with yur bt lader. Kernel Cnfiguratins T dwnlad the Tizen kernel surce package, refer t Getting Surce cde and Build sectin in this dcument. Set up r mdify yur kernel cnfiguratin, use the apprpriate defcnfig file frm arch/arm/cnfigs/. Fr mre detailed infrmatin abut Tizen kernel cnfiguratin and kernel building, refer t the sectin Kernel Build under Getting Surce cde and Build in this dcument. Nte: Tizen uses INOTIFY and des nt use DNOTIFY. S, yu shuld disable DNOTIFY frm yur kernel cnfiguratin. If yu want t use initramfs, yu can use these cnfiguratins: CONFIG_INITRAMFS_SOURCE CONFIG_INITRAMFS_ROOT_UID CONFIG_INITRAMFS_ROOT_GID CONFIG_INITRAMFS_COMPRESSION_NONE/GZIP/BZIP2/LZNA/LZO c 2012 SAMSUNG Electrnics C., Ltd. Prprietary Page 20 f 143 Tizen Prting Guide Tizen File System Virtual Filesystem (VFS ) The virtual file system (VFS) is an interesting aspect f the Linux kernel because it prvides a cmmn interface abstractin fr file systems (ext2, jfs, ext4, etc...). The VFS prvides a switching layer between the SCI (System call interface) and the file systems supprted by the kernel, as shwn in 7.1 Figure 7.1 At the tp f the VFS is a cm
Recommended
View more...
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks