Fix errors in OSInfo device type

[GF-2504] nyx-modules: Finish implementation of OSInfo module

Open-webOS-DCO-1.0-Signed-off-by: Pekka Ropo <pekka.ropo@palm.com>

Change-Id: I9d0c0e6b926e762bdc6448876abb1197003f95f7
Reviewed-on: https://g2g.palm.com/1721
Reviewed-by: Build Verification
Tested-by: Pekka Ropo <pekka.ropo@palm.com>
Reviewed-by: Keith Derrick <keith.derrick@lge.com>
Add defaults for build-related settings in OSInfo

They will end up being used when doing a standalone build.

[GF-2777] nyx-modules: Support new build-related bitbake variables

Open-webOS-DCO-1.0-Signed-off-by: Pekka Ropo <pekka.ropo@palm.com>
Open-webOS-DCO-1.0-Signed-off-by: Keith Derrick <keith.derrick@lge.com>

Change-Id: I6b8513a2f4cfa380e54fa38487a602a4493f1af6
Reviewed-on: https://g2g.palm.com/1777
Reviewed-by: Build Verification
Reviewed-by: Herb Kuta <herb.kuta@lge.com>
Tested-by: Herb Kuta <herb.kuta@lge.com>
Reviewed-by: Gayathri Srinivasan <gayathri.srinivasan@lge.com>
Reviewed-by: Keith Derrick <keith.derrick@lge.com>
Rename WEBOS_DISTRO_BUILD_INFO to WEBOS_DISTRO_BUILD_ID

- An optionally prefixed build number is better described as a "build
  ID" than as "build info".
- Tweak the descriptions of the build-related variables.

[GF-2613] Invent build variable with build number and Jenkins job name

Open-webOS-DCO-1.0-Signed-off-by: Herb Kuta <herb.kuta@lge.com>
Change-Id: I8ebc2a9df42318095a920518303459b5467b0986
Reviewed-on: https://g2g.palm.com/1847
Reviewed-by: Build Verification
Tested-by: Herb Kuta <herb.kuta@lge.com>
Reviewed-by: Pekka Ropo <pekka.ropo@palm.com>
Reviewed-by: Keith Derrick <keith.derrick@lge.com>
Implement new query method to DeviceInfo device type

- Add 'device_info_query' method
- Mark 'device_info_get_info' as deprecated
- Set version to 5.1.0

[GF-2648] nyx-modules: Implement new "modern" query routine added to device_info device type API

Open-webOS-DCO-1.0-Signed-off-by: Pekka Ropo <pekka.ropo@palm.com>

Change-Id: Idfd4a6b826c6883b2348ae2d27e19c2f38f70016
Reviewed-on: https://g2g.palm.com/1824
Reviewed-by: Build Verification
Reviewed-by: Pekka Ropo <pekka.ropo@palm.com>
Tested-by: Pekka Ropo <pekka.ropo@palm.com>
Reviewed-by: Keith Derrick <keith.derrick@lge.com>
Implement WiFi and BT addr queries

[GF-3632] nyx-modules: Default implementation for WiFi and BT addr queries

Open-webOS-DCO-1.0-Signed-off-by: Pekka Ropo <pekka.ropo@palm.com>

Change-Id: Ib4e919bd43fa1fbe89fe6956fcf71a651c8c4cb2
Reviewed-on: https://g2g.palm.com/1914
Reviewed-by: Build Verification
Reviewed-by: Pekka Ropo <pekka.ropo@palm.com>
Tested-by: Pekka Ropo <pekka.ropo@palm.com>
Reviewed-by: Keith Derrick <keith.derrick@lge.com>
Implement NYX_OS_INFO_CORE_OS_KERNEL_* queries

[GF-3209] Implement NYX_OS_INFO_CORE_OS_KERNEL_*

Open-webOS-DCO-1.0-Signed-off-by: Pekka Ropo <pekka.ropo@palm.com>

Change-Id: I8130636cb13a8645b38273833a0ab1c0f80cd187
Reviewed-on: https://g2g.palm.com/1913
Reviewed-by: Build Verification
Reviewed-by: Pekka Ropo <pekka.ropo@palm.com>
Tested-by: Pekka Ropo <pekka.ropo@palm.com>
Reviewed-by: Keith Derrick <keith.derrick@lge.com>
Support multiline replies in OSInfo

[GF-3209] Implement NYX_OS_INFO_CORE_OS_KERNEL_*

Open-webOS-DCO-1.0-Signed-off-by: Pekka Ropo <pekka.ropo@palm.com>

Change-Id: I80886dd196dc01ef31a5990698cb221fc4acf418
Reviewed-on: https://g2g.palm.com/1922
Reviewed-by: Build Verification
Reviewed-by: Pekka Ropo <pekka.ropo@palm.com>
Tested-by: Pekka Ropo <pekka.ropo@palm.com>
Reviewed-by: Keith Derrick <keith.derrick@lge.com>
Take NYX_OS_INFO_WEBOS_BUILD_ID into use

- Replace 'NYX_OS_INFO_WEBOS_BUILD' usage with 'NYX_OS_INFO_WEBOS_BUILD_ID'

Note: Needs nyx-lib submission 66 to work

[GF-3773] Take NYX_OS_INFO_WEBOS_BUILD_ID into use

Open-webOS-DCO-1.0-Signed-off-by: Pekka Ropo <pekka.ropo@palm.com>

Change-Id: Id63bc31c0f07dfcc6bde12cce19da57cf5427127
Reviewed-on: https://g2g.palm.com/1929
Reviewed-by: Build Verification
Reviewed-by: Pekka Ropo <pekka.ropo@palm.com>
Tested-by: Pekka Ropo <pekka.ropo@palm.com>
Add handling of NYX_SYSTEM_EMERG_SHUTDOWN

[GF-3190] reboot command is not working as expected

Open-webOS-DCO-1.0-Signed-off-by: Janne Hurskainen <janne.hurskainen@palm.com>

Change-Id: I260de315857150dff52098d470c1cd50b389dff6
Reviewed-on: https://g2g.palm.com/1948
Reviewed-by: Build Verification
Reviewed-by: Janne Hurskainen <janne.hurskainen@palm.com>
Tested-by: Janne Hurskainen <janne.hurskainen@palm.com>
Reviewed-by: Keith Derrick <keith.derrick@lge.com>
Harmonize responses to different queries

- Remove unnecessary new line character to harmonize responses
- Update format of Copyright headers to be consistent
- Use getdelim instead of getline to support multiline responses

[GF-3818] nyx-modules: Remove unnecessary new line character

Open-webOS-DCO-1.0-Signed-off-by: Pekka Ropo <pekka.ropo@palm.com>

Change-Id: I1585e67272e2763e35bbf9efe2cb893bb2e59219
Reviewed-on: https://g2g.palm.com/1947
Reviewed-by: Build Verification
Tested-by: Pekka Ropo <pekka.ropo@palm.com>
Reviewed-by: Keith Derrick <keith.derrick@lge.com>
keys: split out common key handling code from emulator module

It makes no sense to have the same code in more than one module so we're splitting out the
common input device handling code and just put the specific key handling into module
specific code section.

Open-webOS-DCO-1.0-Signed-off-by: Simon Busch <morphis@gravedo.de>
keys: add device specific implementation

For real target devices there is only a small subset of keys we're able to use. This is
known handled and mapped within a device specific implementation which is separated from
the emulator one.

Open-webOS-DCO-1.0-Signed-off-by: Simon Busch <morphis@gravedo.de>
touchpanel: make emulator implementation common for every device

Open-webOS-DCO-1.0-Signed-off-by: Simon Busch <morphis@gravedo.de>
touchpanel: build module for every device when selected

Open-webOS-DCO-1.0-Signed-off-by: Simon Busch <morphis@gravedo.de>
system: use a flat directory structure to have same code for all machines

If there need to be specific implementations for different machines then this should be
separated from the main module code which should mostly be the same for all needed
implementations.

Open-webOS-DCO-1.0-Signed-off-by: Simon Busch <morphis@gravedo.de>
battery: split out common file handling methods into separate source file

Having common functionality separated from the specific ones makes it easier to implement
for a target device which is not the emulator. Both can still share the same common
functionality.

Open-webOS-DCO-1.0-Signed-off-by: Simon Busch <morphis@gravedo.de>
battery: add a device specific implementation

The implementation is based on the common linux power supply interface and is detected
changes to the current status with processing uevents due to the use of libudev.

Open-webOS-DCO-1.0-Signed-off-by: Simon Busch <morphis@gravedo.de>
charger: split out common module functionality

With splitting out common module functionality we're now able to add different
implementations for the charger module. For target emulator machines this is still the
same dummy implementation as before.

Open-webOS-DCO-1.0-Signed-off-by: Simon Busch <morphis@gravedo.de>
charger: add a device implementation for charger status detection

The device implementation is based on the common linux power supply interface and is per
default enabled to detect changes for AC and USB chargers. It's using libudev to detect
a changed charger status.

Open-webOS-DCO-1.0-Signed-off-by: Simon Busch <morphis@gravedo.de>
machine: add support for the tuna machine

Open-webOS-DCO-1.0-Signed-off-by: Simon Busch <morphis@gravedo.de>