Commit graph

21 commits

Author SHA1 Message Date
Jerry Zhang
551e1f7bd9 Allow libhardware to be used in recovery
The default boot ctrl implementation depends
on libhardware.

Bug: 78793464
Test: Compiles, can load bootctrl in recovery
Change-Id: I9c8aa8b00b9b81f11736de13c85973e113056e69
2018-08-10 11:42:44 -07:00
Dan Willemsen
86e247ae89 Convert to Android.bp
See build/soong/README.md for more information

Test: mmma hardware/libhardware
Change-Id: Ibb7e2af9d55f581e951d8996cea5e52cd0766b04
2017-12-27 11:05:29 -08:00
Chih-Hung Hsieh
235942389f Use -Werror in hardware/libhardware
* Remove unused local variables and function.
* Fix unused return value warning.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I269eca76cda2222c7a0176e85e92df0bb0924a0e
2017-10-04 11:09:30 -07:00
Justin Yun
d49aeeed2b Mark the module as VNDK or VNDK-SP in Android.bp
As a VNDK/VNDK-SP module, Android.bp must have 'vndk' tag as well
as 'vendor_available: true'.

For a VNDK module, the 'vndk' tag has 'enabled: true'.
It will be installed system/lib(64)/vndk as a vendor variant.

For a VNDK-SP module, the 'vndk' tag has
'support_system_process: true' as well as 'enabled: true'.
It will be installed system/lib(64)/vndk-sp as a vendor variant.

Bug: 63866913
Test: build and boot with BOARD_VNDK_VERSION=current
Merged-In: I383af9ccc5457afe437c0cd910c11b636e4b6dd5
Change-Id: I383af9ccc5457afe437c0cd910c11b636e4b6dd5
(cherry picked from commit 8d9fa07fe1)
2017-08-23 17:59:56 +09:00
johnshamoon
4a38e2b53a Merge "Fix build by adding bt_types to bluetooth.h (2/2)"
am: 7de0e9ceae

Change-Id: Ic02b634d1e77f2ae73b68b625e4cc9fb2cff8706
2017-07-21 23:17:31 +00:00
johnshamoon
181518b0bf Fix build by adding bt_types to bluetooth.h (2/2)
Allow bt_types to be included as a shared or static library.

Test: Compiles
Change-Id: Idabc1da73f1d735ea874942a08ebfcd655a7833b
2017-07-21 10:45:03 -07:00
Jiyong Park
0934df77a5 Merge "libhardware_headers export headers from libcutils"
am: 4ba2ac5844

Change-Id: I367e5101f46405ac4e105f6c2c7f6a3e1d55c4df
2017-06-27 02:23:17 +00:00
Jiyong Park
9bd43bd4f6 libhardware_headers export headers from libcutils
Some headers of libhardware are using headers from libcutils.

Bug: 33241851
Test: BOARD_VNDK_VERSION=current m -j successful with aosp_arm target
Change-Id: I649056285ced1cd5da4aba6a19b25e22c43c8621
2017-06-26 13:31:52 +09:00
Jiyong Park
375f1a4d32 Load legacy HAL modules from the sphal namespace
'vndk' namespace should not have /vendor/lib/* in its search paths.
However, /vendor/lib/* has been included due to libhardware; it should
be able to load HAL libs in /vendor/lib and /vendor/lib/hw.

Since the HAL libs are not vndk but part of SP-HAL, they are loaded
explicitly from the 'sphal' namespace.

Bug: 37731053
Bug: 37323945
Test: sailfish builds and boots successfuly
Test: BOARD_VNDK_VERSION=current m libhardware.vendor successful
Merged-In: I1e1619de7deaa0e6610180e585bd7775887bc562
Change-Id: I1e1619de7deaa0e6610180e585bd7775887bc562
(cherry picked from commit 4d67d2e13a)
2017-05-15 11:05:44 +09:00
Steven Moreland
bb27c5df92 libhardware: add libaudio_system_headers
hardware/audio.h uses libaudio_system_headers

Test: works with BOARD_VNDK_VERSION := current
Bug: 33241851
(cherry picked from commit d24879050a)
Merged-In: I6042c9903b2bc580ec519b713f0f19d94e1daa2d
Change-Id: I6042c9903b2bc580ec519b713f0f19d94e1daa2d
2017-04-19 10:36:57 -07:00
Steven Moreland
003f740dc3 libhardware: export system headers
libhardware uses system headers in its headers.

Test: links
Test: libraries using libhardware which don't have access to system
headers link when BOARD_VNDK_VERSION := current.
Bug: 33241851
(cherry picked from commit d39335254a)
Merged-In: I33cbd8a4d6188eed69cb8b55acb3b78b0628d82a
Change-Id: I33cbd8a4d6188eed69cb8b55acb3b78b0628d82a
2017-04-19 10:36:50 -07:00
Steven Moreland
d24879050a libhardware: add libaudio_system_headers
hardware/audio.h uses libaudio_system_headers

Test: works with BOARD_VNDK_VERSION := current
Bug: 33241851
Change-Id: I6042c9903b2bc580ec519b713f0f19d94e1daa2d
2017-04-17 16:57:45 -07:00
Steven Moreland
d39335254a libhardware: export system headers
libhardware uses system headers in its headers.

Test: links
Test: libraries using libhardware which don't have access to system
headers link when BOARD_VNDK_VERSION := current.
Bug: 33241851

Change-Id: I33cbd8a4d6188eed69cb8b55acb3b78b0628d82a
2017-04-13 19:32:58 -07:00
TreeHugger Robot
78fed232ae Merge changes Ia4eb5378,I745031b8 into oc-dev
* changes:
  Mark as vendor_available
  Export headers as libhardware_headers
2017-04-13 03:32:58 +00:00
Dan Willemsen
5466d2e150 Mark as vendor_available
By setting vendor_available, the following may become true:

* a prebuilt library from this release may be used at runtime by
  in a later releasse (by vendor code compiled against this release).
  so this library shouldn't depend on runtime state that may change
  in the future.
* this library may be loaded twice into a single process (potentially
  an old version and a newer version). The symbols will be isolated
  using linker namespaces, but this may break assumptions about 1
  library in 1 process (your singletons will run twice).

Background:

This means that these modules may be built and installed twice --
once for the system partition and once for the vendor partition. The
system version will build just like today, and will be used by the
framework components on /system. The vendor version will build
against a reduced set of exports and libraries -- similar to, but
separate from, the NDK. This means that all your dependencies must
also mark vendor_available.

At runtime, /system binaries will load libraries from /system/lib*,
while /vendor binaries will load libraries from /vendor/lib*. There
are some exceptions in both directions -- bionic(libc,etc) and liblog
are always loaded from /system. And SP-HALs (OpenGL, etc) may load
/vendor code into /system processes, but the dependencies of those
libraries will load from /vendor until it reaches a library that's
always on /system. In the SP-HAL case, if both framework and vendor
libraries depend on a library of the same name, both versions will be
loaded, but they will be isolated from each other.

It's possible to compile differently -- reducing your source files,
exporting different include directories, etc. For details see:

https://android-review.googlesource.com/368372

None of this is enabled unless the device opts into the system/vendor
split with BOARD_VNDK_VERSION := current.

Bug: 36426473
Bug: 36079834
Test: Android-aosp_arm.mk is the same before/after
Test: build.ninja is the same before/after
Test: build-aosp_arm.ninja is the same before/after
Test: attempt to compile with BOARD_VNDK_VERSION := current
Merged-In: Ia4eb5378d941033b07673daf682e66051cd3c075
Change-Id: Ia4eb5378d941033b07673daf682e66051cd3c075
2017-04-12 23:00:49 +00:00
Vijay Venkatraman
2ca3ee0a8b Export headers as libhardware_headers
Bug: 33241851
Test: Build sailfish
Merged-In: I745031b8a8099a84610bbc2224ef2b6b6ad2e70d
Change-Id: I745031b8a8099a84610bbc2224ef2b6b6ad2e70d
2017-04-12 03:25:01 +00:00
Dan Willemsen
294c3745d4 Include what you use
This doesn't need utils/Log.h, just log/log.h and some stdlib headers.

Bug: 33241851
Test: m -j libhardware
Merged-In: Id73059f5636af42b0d1680b89f6ca27f466d9ea8
Change-Id: Id73059f5636af42b0d1680b89f6ca27f466d9ea8
2017-04-12 03:24:58 +00:00
Dan Willemsen
5b180070b6 Mark as vendor_available
By setting vendor_available, the following may become true:

* a prebuilt library from this release may be used at runtime by
  in a later releasse (by vendor code compiled against this release).
  so this library shouldn't depend on runtime state that may change
  in the future.
* this library may be loaded twice into a single process (potentially
  an old version and a newer version). The symbols will be isolated
  using linker namespaces, but this may break assumptions about 1
  library in 1 process (your singletons will run twice).

Background:

This means that these modules may be built and installed twice --
once for the system partition and once for the vendor partition. The
system version will build just like today, and will be used by the
framework components on /system. The vendor version will build
against a reduced set of exports and libraries -- similar to, but
separate from, the NDK. This means that all your dependencies must
also mark vendor_available.

At runtime, /system binaries will load libraries from /system/lib*,
while /vendor binaries will load libraries from /vendor/lib*. There
are some exceptions in both directions -- bionic(libc,etc) and liblog
are always loaded from /system. And SP-HALs (OpenGL, etc) may load
/vendor code into /system processes, but the dependencies of those
libraries will load from /vendor until it reaches a library that's
always on /system. In the SP-HAL case, if both framework and vendor
libraries depend on a library of the same name, both versions will be
loaded, but they will be isolated from each other.

It's possible to compile differently -- reducing your source files,
exporting different include directories, etc. For details see:

https://android-review.googlesource.com/368372

None of this is enabled unless the device opts into the system/vendor
split with BOARD_VNDK_VERSION := current.

Bug: 36426473
Bug: 36079834
Test: Android-aosp_arm.mk is the same before/after
Test: build.ninja is the same before/after
Test: build-aosp_arm.ninja is the same before/after
Test: attempt to compile with BOARD_VNDK_VERSION := current
Change-Id: Ia4eb5378d941033b07673daf682e66051cd3c075
2017-04-10 22:19:22 -07:00
Dan Willemsen
4d53a041d3 Include what you use
This doesn't need utils/Log.h, just log/log.h and some stdlib headers.

Bug: 33241851
Test: m -j libhardware
Change-Id: Id73059f5636af42b0d1680b89f6ca27f466d9ea8
2017-04-10 22:16:19 -07:00
Vijay Venkatraman
56c2a6b1ed Export headers as libhardware_headers
Bug: 33241851
Test: Build sailfish
Change-Id: I745031b8a8099a84610bbc2224ef2b6b6ad2e70d
2017-04-04 14:30:19 -07:00
Dan Willemsen
f51bf92061 Begin converting Android.mk to Android.bp
These modules have their dependencies satisfied.

Change-Id: I67986efd7478e477770bedac72ab35a407e3d06a
2016-07-12 23:34:37 -07:00