August 15, 2016 - Phil Coval

An Introduction to Tizen Development on ARTIK

This article is a direct follow up of my previous post about booting Tizen on the ARTIK10. Before starting, you should bookmark this wiki page as an entry point for Tizen on ARTIK devices.

At the 2015 Tizen Developer Conference, I had the opportunity to present a tutorial about Tizen platform development; it’s still valid today. This article is very similar but is adapted for ARTIK10 and ARTIK5 configuration.

For some context, check out to the following slide deck along with the recorded video on how to patch Tizen and build with GBS for x86a as well as this page about Tizen:Common on VMware.

tdc2015-strategy-devel-20150916 from Phil C

Tools Setup

If you’re familiar with Tizen you probably know about Git Build System (GBS): a very convenient tool to build packages. It’s adapted from Debian’s git-build-package to support zypper repos.

First, gbs and some other Tizen tools need to be installed on the host machine used for development; On a debian based distro this is trivial: add the proper apt source for your specific OS as listed in the tools folder.

For instance, edit and adapt:

Then, the configuration file ~/.gbs.conf must be created, it should contain something like the following:

By the way, here is my current .gbs.conf, with more profiles:

Hello Tizen Source

Here, is the “helloworld project” and the packaging file needed to create a minimal platform package.

A trivial makefile is needed to install it, as GNU make will guess how to build it (note, tabs are used not spaces) :

Finally write a minimal RPM spec file, like on any RPM based distribution (Red Hat, SUSE, Mer, etc):

Then commit those files into a newly created git project:

Build the Software

The next step is to build it with this single command line:

It will download dependencies and eventually produce an RPM file; the contents can be listed with this command line:

Deploy to Target Device

At this stage, the package can be uploaded using scp, but let’s use an alternate way: Tizen’s Smart debug bridge (sdb) which was installed earlier.

On the target side, the SDB daemon should be already running:

If not, (re)start it:

Take note of the target’s IP address. Back on the host, use the sdb client to connect to it.

Perfect! Now files can be pushed or pulled just like the Tizen SDK IDE, but this has the benefit of providing shell access with su supported:

Now, we’re ready to upload our built RPM and install it with rpm running as root:

It’s not rocket science, but this is enough to validate the Tizen toolchain.

Setting up a private repo

Note: a quick tip for deploying is to setup an HTTP repo on the host machine and pull packages with zypper.

On the host machine, execute the following:

Then, some variables need to be adapted on the target side.

By the way, here are some zypper commands, you will probably use:

What’s Next ?

This should have summed up all that is needed to get into Tizen platform development on ARTIK devices. Now there are many new possibilities open for things like IoT development; let us know about your plans or join existing discussions about hardware support related to things like Graphics, Bluetooth/BLE, or maybe try to compare the results of this with Yocto’s meta-artik or other Operating Systems.

Remember, we also plan to have a quick chat about ARTIK at next Tizen Community Online Meeting, I hope to see you there! As a parting gift, here are some extra hints about packaging new software for the Tizen contrib repo.

Tizen upstream-coop-tdc2014-pcoval from Phil C
Phil Coval

About Phil Coval

Philippe has been involved with the Tizen project since 2012 when he became the co-maintainer on some of the distributions domain's in the Common profile. He now works for the Samsung Open Source Group where he actively supports community contributions by helping others who have an interest in free software and open hardware. In particular, he is actively involved in the Tizen and IoTivity communities.

Embedded Technology / Linux / Tizen / Uncategorized ARTIK / artik10 / gbs / RPM / Tizen / zypper /

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Comments Protected by WP-SpamShield Anti-Spam