Getting Started With Development

From WebOS-Ports
Revision as of 08:57, 25 October 2014 by Elvispre (talk | contribs) (Create a Getting Started for development. Aiming to provide an overview of the processes involved.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Help Develop LuneOS

Build and Install LuneOS

For an easy life, develop on Linux. Ubuntu 12.04 LTS 64-bit works well.

The source code is on GitHub so you need a copy of git for a start.

Instructions for building (or just downloading) and installing an image can be reached by selecting a target device from the Devices page. Notice that there is a LuneOS VirtualBox Emulator which you can use instead of a target device.

Build System Overview

I assume that the build system is based on the Open webOS one.

Set-up is automated

$ wget https://raw.github.com/webOS-ports/webos-ports-setup/testing/Makefile
$ make setup-webos-ports

(but do follow the proper instructions for your device).

The build itself is based on the OpenEmbedded (oe) build framework for embedded Linux and is driven by the BitBake (bb) build engine (rather than make).

You bitbake a "recipe". This is a simple text file of metadata with the extension .bb indicating how to fetch, build and install something. The system is very modular. One recipe depends on another and there are hundreds of recipes involved in our build.

The particularly interesting recipes for our purposes, such as webos-ports-dev-package, are in webos-ports/meta-webos-ports/recipes-core/images.

Repository Layout might make some sense to you now!

The Porting Guide sheds quite a lot of light on this too.

Develop!

So let's say you have built webos-ports-dev-package, installed it on a device and had a play around with it. How can you change it?

Start with a browse around the meta-webos-ports layer folder (on your build machine). Its conf/layer.conf is interesting. This is where we pick up Open webOS from LG and then customise it. The luneos "distro platform codename" gets set in the file webos.inc for example. webos-repositories.inc looks pretty interesting too.

You could change something in there and bitbake again to see what happens. (Will your change be incorporated or overwritten?) If you have made a worthwhile change, our Submitting Contributions instructions tell you how to get it pulled into the main line.

Help Develop the Core LuneOS Applications

If you are looking to improve the bundled apps (or add new ones), the recipes are in recipes-webos/apps. Make some sense of those and you will definitely be winning. Can you find the fetched source code? Do you understand why it is where it is?

Is there a good (read, more convenient) environment to test apps without installing on a device?

Develop Applications to Run on LuneOS

Ought to say something useful about this.