Commit graph

33 commits

Author SHA1 Message Date
Oystein Eftevaag
2007fd1ee6 Enable Windows host compilation of libhardware-headers
Bug: 261908998
Test: scrypt builds using MinGW
Change-Id: Ica552fe1fb89c94f6ea2210a4c50d1b504929d11
2023-02-06 22:23:28 +00:00
Devin Moore
690e02aa2c Make libhardware host_supported
This requires dropping a header file and avoiding a missing strlcpy API.
Required for host_supported fuzzers that include this lib.

Test: libsensorserviceaidl_fuzzer
Bug: 205764765

Change-Id: Ib1d2851e915ed87ef2936a044e7a72bab3077f40
2022-11-17 17:47:52 +00:00
William Escande
4db625386f [Bluetooth apex] Use new apex name
The Bluetooth apex name is now called com.android.btservices

Bug: 243054261
Test: Build
Change-Id: Ie016fa354f5c9516b2f9a671f2235787f92da37d
2022-08-22 11:27:59 -07:00
Treehugger Robot
db72a6dfe4 Merge "Remove explicit dependency on libdl" am: 2cac8b9f81
Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware/+/2123559

Change-Id: Ib0c0faf87d987634a7923be276033cc1b5eb13a1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-28 20:17:48 +00:00
Liz Kammer
3e805478fb Remove explicit dependency on libdl
A dependency to libdl is added by default by the build system based on
system_dynamic_libs property.

Test: m libhardware
Change-Id: I4bc1a7cb4af2c49d6f1343843cf86c436294bed7
2022-06-13 17:52:48 +00:00
Ray Essick
dd45428ffa drop no-longer-needed apex_available clause on libhardware
codec2/vndk referenced, but did not use, libhardware. Now that
the reference is cleaned, we don't need to to export to apex's.

Bug: 221444002
Test: build, boot
Change-Id: I43bff5cab71d53d8c7422c13265f129b26ca0430
2022-03-01 15:45:33 -08:00
Ray Essick
0a0dd5f489 Make apex_available explicit
Move the implicit allowing by modules from a list in the build
tools to explicit lines in the relevant module's Android.bp

Bug: 215589022
Test: build
Change-Id: I17f93210f027cb8189e92b19a46b6d64faef7ed8
2022-02-09 10:14:29 -08:00
Roopa Sattiraju
da4e70bc33 Adding bluetooth apex
Bug: 206121418
Test: Compile
Change-Id: Ib7dcc33843a2173e353ba6e52f7f423cbf445915
2022-02-01 13:37:56 -08:00
Bob Badour
d7984ccf02 [LSC] Add LOCAL_LICENSE_KINDS to hardware/libhardware
Added SPDX-license-identifier-Apache-2.0 to:
  modules/audio/Android.bp
  modules/audio_remote_submix/Android.bp
  modules/audio_remote_submix/tests/Android.bp
  modules/camera/3_0/Android.bp
  modules/consumerir/Android.bp
  modules/fingerprint/Android.bp
  modules/gralloc/Android.mk
  modules/hwcomposer/Android.bp
  modules/input/evdev/Android.bp
  modules/local_time/Android.bp
  modules/nfc-nci/Android.bp
  modules/nfc/Android.bp
  modules/power/Android.bp
  modules/radio/Android.bp
  modules/sensors/Android.bp
  modules/sensors/Android.mk
  modules/sensors/dynamic_sensor/Android.bp
  modules/sensors/dynamic_sensor/HidUtils/Android.bp
  modules/soundtrigger/Android.bp
  modules/thermal/Android.bp
  modules/tv_input/Android.bp
  modules/usbaudio/Android.bp
  modules/usbcamera/Android.bp
  modules/vibrator/Android.bp
  modules/vr/Android.bp
  tests/camera3/Android.bp
  tests/fingerprint/Android.bp
  tests/hardware/Android.bp
  tests/hwc/Android.bp
  tests/input/evdev/Android.bp
  tests/nusensors/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to:
  Android.bp
  modules/camera/3_4/Android.mk

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I28924363e6c478f5d0b465b63534c4efd041c770
2021-02-12 20:51:13 -08:00
Victor Khimenko
e22d90cc0a Make libhardware_headers available for native_bridge
Bug: http://b/153609531

Test: m libRSDriver.native_bridge

Change-Id: I05220635027635ff12a7d5201b5c716ca4fda5ea
2020-06-30 22:56:22 +02:00
A. Cody Schuffelen
e8ee2fcbae Add host_supported to libhardware_headers.
This will allow building PureSoftKeymaster on the host.

Bug: 155328339
Test: Compiles
Change-Id: If4474fc3da715a49f2c8649a61968cdda9b1086f
2020-04-29 14:46:38 -07:00
Jooyung Han
b1e43a9005 Set min_sdk_version to be part of mainline modules
Modules contributing mainline modules (APK/APEX) should set
min_sdk_version as well as apex_available.

For now setting min_sdk_version doesn't change build outputs.
But build-time checks will be added soon.

Bug: 152655956
Test: m
Change-Id: Iab1437027fcbe4b7876207ec7605a765ba667b52
2020-04-16 18:48:32 +09:00
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