To rapidly support a wide range of devices, our architecture reuses some of the drivers and hardware enablement available for Android.
As a consequence, at the current images you'll find some of the Android services running at the device next to the webOS services.
For quick reference, these are the current components used from Android:
- Linux Kernel (stock Android kernel provided by the vendor, with a few changes to support some extra features needed by Ubuntu)
- OpenGL ES2.0 HAL and drivers
- Audio/Media HAL and services, to re-use the hardware video decoders
- RILD for modem support
Other than the very basic services (needed to re-use the binary blobs already available), the rest is just pure webOS goodness .
Porting webOS ports to another target device consists of several steps:
- Building the Android pieces
- Kernel modifications
- Creating an OpenEmbedded machine layer
- Integration with several webOS components
All in all you should try to make each part of your work available for other people and easily to reproduce so other people can start helping with the port.
Building the Android pieces
Please refer to the Ubuntu Touch porting guide and the chapter Building the Android pieces for details.
The used kernel is directly based on an Android device kernel without any extra modifications. We will create a recipe in the OpenEmbedded machine layer later.
As a requirement from the webOS userspace, we need to add a few extra kernel configs that are usually not enabled by default for Android.
- # CONFIG_ANDROID_PARANOID_NETWORK is not set
Creating an OpenEmbedded machine layer
To build webOS with OpenEmbedded you need to create machine layer for it (also called board support package (BSP)). There are already some available in the meta-smartphone layer which can be used as reference. A very good guide on how to create a machine layer is available here from the Yocto Project.
Integration with several webOS components
To integrate an Android based propably with webOS ports some components need to be modified.
The nyx module are responsible within webOS to support certain hardware features in a device independet manner. We already modified the Open webOS standard implementation so it should work with most Android device. The only thing which need to be done for a need porting device is to add a device configuration file to the repository (or as patch in your OE machine layer).
The machine configuration file needs to be placed within the src/machine directory of the nyx-modules repository and should look like this:
set(MODULE_SYSTEM_WEBOS_LINUX YES) set(MODULE_KEYS_WEBOS_LINUX YES) set(MODULE_TOUCHPANEL_WEBOS_LINUX YES) set(MODULE_LED_CONTROLLER_WEBOS_LINUX YES) set(MODULE_HAPTICS_TIMEDOUTPUT_WEBOS_LINUX YES) add_definitions(-DKEYPAD_INPUT_DEVICE=\"/dev/input/event2\") add_definitions(-DBATTERY_SYSFS_PATH=\"/sys/class/power_supply/battery/\")
The last two lines needs to be adjusted to fit your porting device. If you need further assistance you can also look at the already existing configuration files for other machines at .
You have to create a machine specific configuration file within the luna-sysmgr repository (see https://github.com/webOS-ports/luna-sysmgr). The file must have the name luna-<machine>.conf and needs to be placed within the conf directory. The file should have the following content: