Anatomy of machine.conf

From AsteroidOS

Machine.conf is likely the first file you'll edit when making a new port. This page describes what the different lines do. Below is the machine.conf from Bass.

#@TYPE: Machine
#@NAME: LG Watch Urbane
#@DESCRIPTION: Machine configuration for the LG Watch Urbane

require conf/machine/include/arm/armv7a/tune-cortexa7.inc
DEFAULTTUNE = "armv7vehf-neon"
require conf/machine/include/hybris-watch.inc

MACHINE_DISPLAY_ROUND = "true"
MACHINE_HAS_WLAN = "true"

PREFERRED_VERSION_android = "marshmallow"

PREFERRED_PROVIDER_virtual/kernel = "linux-bass"
PREFERRED_VERSION_linux = "3.10+lollipop"

IMAGE_INSTALL += "sensorfw-hybris-hal-plugins msm-fb-refresher brcm-patchram-plus iproute2 wpa-supplicant underclock asteroid-compass asteroid-hrm"
#@TYPE: Machine

#@NAME: LG Watch Urbane

#@DESCRIPTION: Machine configuration for the LG Watch Urbane

Modify the NAME and DESCRIPTION line to match the common name of your device.

require conf/machine/include/arm/armv7a/tune-cortexa7.inc

DEFAULTTUNE = "armv7vehf-neon"

The 'tune' is a variant of a device architecture that specifies additional features. In this case, hf (hard float) and neon are floating point extensions.

The 'require' keyword is used to include a file, which makes available a selection of armv7 tunes. The 'DEFAULTTUNE' variable selects one of them.

DEFAULTTUNE is used by bitbake to decide the device's overall architecture, selecting both the compiler architecture and compiler tuning options.

require conf/machine/include/hybris-watch.inc

This line includes hybris packages.

MACHINE_DISPLAY_ROUND = "true"

MACHINE_HAS_WLAN = "true"

These variables are packaged into a file which is accessible from the watch's userspace and used to behave the default behaviour of the launcher and applications.

PREFERRED_VERSION_android = "marshmallow"

PREFERRED_PROVIDER_virtual/kernel = "linux-bass"

PREFERRED_VERSION_linux = "3.10+lollipop"

For packages such as kernels and android library packages, there are multiple variants available. This selects the kernel variant and version, and the android library packages which are necessary for this device

IMAGE_INSTALL += "sensorfw-hybris-hal-plugins msm-fb-refresher brcm-patchram-plus iproute2 wpa-supplicant underclock asteroid-compass asteroid-hrm"

This adds additional packages which should be shipped in the asteroidos installation image. The last two are apps, which are installed by default on this device because it has a compass and heartrate sensor.