User Tools

Site Tools


building_custom_system_images

Building custom system images allows you to customize Tizen IVI to your product configuration.

Modifying existing components

If you need to modify existing components, for example ffmpeg (which is built with a very minimal feature configuration), you need to clone the component's source from source.tizen.org into your local git repository. Do the changes, build and test, and when you are satisfied, you can push your changes to be reviewed and approved.

First, you need to create a SSH identity and register it to review.tizen.org for your developer account. Select Settings from the top right corner, then SSH Public Keys from the left-hand side menu. Press the Add key button, and upload your SSH public key.

Check the Tizen Developer Guide for instructions.

To generate a new SSH key, issue this command in your developer workstation:

$ ssh-keygen -t rsa -C "Your Name <your@email.address>"

The public key that you need to upload to review.tizen.org is generated to the file ~/.ssh/id_rsa.pub.

You can find a list of all Tizen components from review.tizen.org Admin/Projects view. Select Admin from the top left corner, then Projects from the line directly below it.

To clone a component repository for local editing:

$ git clone review.tizen.org:framework/multimedia/ffmpeg

The component path, in this example framework/multimedia/ffmpeg, was found from the review.tizen.org Admin/Projects listing.

Perform your changes, and build the software with gbs:

$ gbs build -A i586 --include-all

Note that you either need to commit your changes to your local git repository using git commit, or you can use the –include-all option for gbs to include also uncommitted changes in the build.

After the build you get installable rpms in ~/GBS-ROOT/local/repos/tizen. You can install the packages to your target device and test them.

When you are happy with the changes, you can submit your modifications for review and approval:

$ gbs submit -m "Message describing your fixes"

Creating your own components

Building Tizen packages from your own software components follows the same pattern as modifying existing packages, above. First, you need to have a git repository containing your source code. Then, you need to create a spec file describing your package. That is all you need to be able to build your software exactly as described above.

If your existing software is available in a .tar file, you can use gbs import to import the code into your repository:

$ mkdir mycomponent
$ cd mycomponent
$ git init .
$ gbs import ~/source/mycomponent-1.0.tar.gz

Or, if your code is already available in your own git repository, simply use git clone to get the sources.

If your component does not already have a spec file, you need to create one for it:

$ mkdir packaging
$ echo Name: mycomponent > packaging/mycomponent.spec
$ git add packaging/mycomponent.spec
$ git commit -m "Initial spec file"

You do of course need to add the rest of the spec file contents before the package can be built successfully. You can use existing components' spec files as examples.

When your spec file is complete, you can build your component simply with:

$ gbs build -A i586 --include-all

Again, your code changes either need to be committed to your local git, or you need to use the –include-all flag for gbs.

Creating your own system image

System image creation from binary packages is performed with the mic tool. The mic tool requires a kickstart file (.ks) as a build recipe. A good starting point is to download the ivi-min-auto image kickstart files from download.tizen.org, and modify that file.

Start by downloading the file, and changing the repo references from file:/srv/ to http://download.tizen.org/''. Then you can build your own image with command: $ sudo mic create raw my-customized.ks # Enter password for sudo This generates the file mic-output/imagename.sdb.raw, which is the raw disk image we have been working with in the installation instructions of this document. Once you have verified that you can build the image, you can start changing the image contents by e.g. adding your own components into the configuration. ==== Adapting the system to your hardware ==== When you want to move from reference hardware to your production system, you will most likely need to do some hardware adaptation work to customize the BSP and system configuration for your target system. The Tizen porting guide is a draft document and does not yet address automotive specific aspects, but it is a reasonable starting point.

building_custom_system_images.txt · Last modified: 2013/01/24 09:05 by jsmoeller