resolve merge conflicts of 69ed5d9 to stage-aosp-master

am: d269bf4328

Change-Id: I1db9a613f52dcaaef3d7f50d2cb797be7cfd82e0
This commit is contained in:
Dan Willemsen 2016-07-13 19:23:17 +00:00 committed by android-build-merger
commit c1965c958c
27 changed files with 309 additions and 345 deletions

18
Android.bp Normal file
View file

@ -0,0 +1,18 @@
// Copyright 2006 The Android Open Source Project
cc_library_shared {
name: "libhardware",
srcs: ["hardware.c"],
shared_libs: [
"libcutils",
"liblog",
"libdl",
],
cflags: ["-DQEMU_HARDWARE"],
}
subdirs = [
"modules/*",
"tests/*",
]

View file

@ -1,24 +1,3 @@
# Copyright 2006 The Android Open Source Project # Copyright 2006 The Android Open Source Project
# Setting LOCAL_PATH will mess up all-subdir-makefiles, so do it beforehand. include $(call all-named-subdir-makefiles,modules tests)
SUBDIR_MAKEFILES := $(call all-named-subdir-makefiles,modules tests)
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SHARED_LIBRARIES := libcutils liblog
LOCAL_INCLUDES += $(LOCAL_PATH)
LOCAL_CFLAGS += -DQEMU_HARDWARE
QEMU_HARDWARE := true
LOCAL_SHARED_LIBRARIES += libdl
LOCAL_SRC_FILES += hardware.c
LOCAL_MODULE:= libhardware
include $(BUILD_SHARED_LIBRARY)
include $(SUBDIR_MAKEFILES)

View file

@ -1,4 +1,4 @@
hardware_modules := gralloc hwcomposer audio nfc nfc-nci local_time \ hardware_modules := gralloc hwcomposer \
power usbaudio audio_remote_submix camera usbcamera consumerir sensors vibrator \ usbaudio audio_remote_submix camera usbcamera sensors \
tv_input fingerprint input vehicle thermal vr input vehicle thermal vr
include $(call all-named-subdir-makefiles,$(hardware_modules)) include $(call all-named-subdir-makefiles,$(hardware_modules))

60
modules/audio/Android.bp Normal file
View file

@ -0,0 +1,60 @@
// Copyright (C) 2011 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// The default audio HAL module, which is a stub, that is loaded if no other
// device specific modules are present. The exact load order can be seen in
// libhardware/hardware.c
//
// The format of the name is audio.<type>.<hardware/etc>.so where the only
// required type is 'primary'. Other possibilites are 'a2dp', 'usb', etc.
cc_library_shared {
name: "audio.primary.default",
relative_install_path: "hw",
srcs: ["audio_hw.c"],
shared_libs: [
"liblog",
"libcutils",
],
cflags: ["-Wno-unused-parameter"],
}
// The stub audio HAL module, identical to the default audio hal, but with
// different name to be loaded concurrently with other audio HALs if necessary.
// This can also be used as skeleton for new implementations
//
// The format of the name is audio.<type>.<hardware/etc>.so where the only
// required type is 'primary'. Other possibilites are 'a2dp', 'usb', etc.
cc_library_shared {
name: "audio.stub.default",
relative_install_path: "hw",
srcs: ["audio_hw.c"],
shared_libs: [
"liblog",
"libcutils",
],
cflags: ["-Wno-unused-parameter"],
}
// The stub audio policy HAL module that can be used as a skeleton for
// new implementations.
cc_library_shared {
name: "audio_policy.stub",
relative_install_path: "hw",
srcs: ["audio_policy.c"],
shared_libs: [
"liblog",
"libcutils",
],
cflags: ["-Wno-unused-parameter"],
}

View file

@ -1,62 +0,0 @@
# Copyright (C) 2011 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
LOCAL_PATH := $(call my-dir)
# The default audio HAL module, which is a stub, that is loaded if no other
# device specific modules are present. The exact load order can be seen in
# libhardware/hardware.c
#
# The format of the name is audio.<type>.<hardware/etc>.so where the only
# required type is 'primary'. Other possibilites are 'a2dp', 'usb', etc.
include $(CLEAR_VARS)
LOCAL_MODULE := audio.primary.default
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_SRC_FILES := audio_hw.c
LOCAL_SHARED_LIBRARIES := liblog libcutils
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS := -Wno-unused-parameter
include $(BUILD_SHARED_LIBRARY)
# The stub audio HAL module, identical to the default audio hal, but with
# different name to be loaded concurrently with other audio HALs if necessary.
# This can also be used as skeleton for new implementations
#
# The format of the name is audio.<type>.<hardware/etc>.so where the only
# required type is 'primary'. Other possibilites are 'a2dp', 'usb', etc.
include $(CLEAR_VARS)
LOCAL_MODULE := audio.stub.default
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_SRC_FILES := audio_hw.c
LOCAL_SHARED_LIBRARIES := liblog libcutils
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS := -Wno-unused-parameter
include $(BUILD_SHARED_LIBRARY)
# The stub audio policy HAL module that can be used as a skeleton for
# new implementations.
include $(CLEAR_VARS)
LOCAL_MODULE := audio_policy.stub
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_SRC_FILES := audio_policy.c
LOCAL_SHARED_LIBRARIES := liblog libcutils
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS := -Wno-unused-parameter
include $(BUILD_SHARED_LIBRARY)

View file

@ -0,0 +1,23 @@
// Copyright (C) 2013 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
cc_library_shared {
name: "consumerir.default",
relative_install_path: "hw",
srcs: ["consumerir.c"],
shared_libs: [
"liblog",
"libcutils",
],
}

View file

@ -1,25 +0,0 @@
# Copyright (C) 2013 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := consumerir.default
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_SRC_FILES := consumerir.c
LOCAL_SHARED_LIBRARIES := liblog libcutils
LOCAL_MODULE_TAGS := optional
include $(BUILD_SHARED_LIBRARY)

View file

@ -0,0 +1,20 @@
// Copyright (C) 2013 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
cc_library_shared {
name: "fingerprint.default",
relative_install_path: "hw",
srcs: ["fingerprint.c"],
shared_libs: ["liblog"],
}

View file

@ -1,25 +0,0 @@
# Copyright (C) 2013 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := fingerprint.default
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_SRC_FILES := fingerprint.c
LOCAL_SHARED_LIBRARIES := liblog
LOCAL_MODULE_TAGS := optional
include $(BUILD_SHARED_LIBRARY)

View file

@ -0,0 +1,32 @@
// Copyright (C) 2011 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// The default local time HAL module. The default module simply uses the
// system's clock_gettime(CLOCK_MONOTONIC) and does not support HW slewing.
// Devices which use the default implementation should take care to ensure that
// the oscillator backing the CLOCK_MONOTONIC implementation is phase locked to
// the audio and video output hardware. This default implementation is loaded
// if no other device specific modules are present. The exact load order can be
// seen in libhardware/hardware.c
//
// The format of the name is local_time.<hardware>.so
cc_library_shared {
name: "local_time.default",
relative_install_path: "hw",
srcs: ["local_time_hw.c"],
shared_libs: [
"liblog",
"libcutils",
],
}

View file

@ -1,34 +0,0 @@
# Copyright (C) 2011 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
LOCAL_PATH := $(call my-dir)
# The default local time HAL module. The default module simply uses the
# system's clock_gettime(CLOCK_MONOTONIC) and does not support HW slewing.
# Devices which use the default implementation should take care to ensure that
# the oscillator backing the CLOCK_MONOTONIC implementation is phase locked to
# the audio and video output hardware. This default implementation is loaded
# if no other device specific modules are present. The exact load order can be
# seen in libhardware/hardware.c
#
# The format of the name is local_time.<hardware>.so
include $(CLEAR_VARS)
LOCAL_MODULE := local_time.default
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_SRC_FILES := local_time_hw.c
LOCAL_SHARED_LIBRARIES := liblog libcutils
LOCAL_MODULE_TAGS := optional
include $(BUILD_SHARED_LIBRARY)

View file

@ -0,0 +1,23 @@
// Copyright (C) 2011 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
cc_library_shared {
name: "nfc_nci.default",
relative_install_path: "hw",
srcs: ["nfc_nci_example.c"],
shared_libs: [
"liblog",
"libcutils",
],
}

View file

@ -1,25 +0,0 @@
# Copyright (C) 2011 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := nfc_nci.default
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_SRC_FILES := nfc_nci_example.c
LOCAL_SHARED_LIBRARIES := liblog libcutils
LOCAL_MODULE_TAGS := optional
include $(BUILD_SHARED_LIBRARY)

23
modules/nfc/Android.bp Normal file
View file

@ -0,0 +1,23 @@
// Copyright (C) 2011 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
cc_library_shared {
name: "nfc.default",
relative_install_path: "hw",
srcs: ["nfc_pn544_example.c"],
shared_libs: [
"liblog",
"libcutils",
],
}

View file

@ -1,25 +0,0 @@
# Copyright (C) 2011 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := nfc.default
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_SRC_FILES := nfc_pn544_example.c
LOCAL_SHARED_LIBRARIES := liblog libcutils
LOCAL_MODULE_TAGS := optional
include $(BUILD_SHARED_LIBRARY)

20
modules/power/Android.bp Normal file
View file

@ -0,0 +1,20 @@
// Copyright (C) 2011 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
cc_library_shared {
name: "power.default",
relative_install_path: "hw",
srcs: ["power.c"],
shared_libs: ["liblog"],
}

View file

@ -1,25 +0,0 @@
# Copyright (C) 2011 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := power.default
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_SRC_FILES := power.c
LOCAL_SHARED_LIBRARIES := liblog
LOCAL_MODULE_TAGS := optional
include $(BUILD_SHARED_LIBRARY)

View file

@ -0,0 +1,23 @@
// Copyright (C) 2014 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
cc_library_shared {
name: "tv_input.default",
relative_install_path: "hw",
shared_libs: [
"libcutils",
"liblog",
],
srcs: ["tv_input.cpp"],
}

View file

@ -1,24 +0,0 @@
# Copyright (C) 2014 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_SHARED_LIBRARIES := libcutils liblog
LOCAL_SRC_FILES := tv_input.cpp
LOCAL_MODULE := tv_input.default
LOCAL_MODULE_TAGS := optional
include $(BUILD_SHARED_LIBRARY)

View file

@ -0,0 +1,24 @@
// Copyright (C) 2012 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
cc_library_shared {
name: "vibrator.default",
// HAL module implementation stored in
// hw/<VIBRATOR_HARDWARE_MODULE_ID>.default.so
relative_install_path: "hw",
include_dirs: ["hardware/libhardware"],
srcs: ["vibrator.c"],
shared_libs: ["liblog"],
}

View file

@ -1,30 +0,0 @@
# Copyright (C) 2012 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := vibrator.default
# HAL module implementation stored in
# hw/<VIBRATOR_HARDWARE_MODULE_ID>.default.so
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_C_INCLUDES := hardware/libhardware
LOCAL_SRC_FILES := vibrator.c
LOCAL_SHARED_LIBRARIES := liblog
LOCAL_MODULE_TAGS := optional
include $(BUILD_SHARED_LIBRARY)

View file

@ -0,0 +1,14 @@
cc_test {
name: "fingerprint_tests",
srcs: ["fingerprint_tests.cpp"],
shared_libs: [
"liblog",
"libhardware",
],
cflags: [
"-Wall",
"-Wextra",
],
}

View file

@ -1,19 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
fingerprint_tests.cpp \
LOCAL_SHARED_LIBRARIES := \
liblog \
libhardware \
#LOCAL_C_INCLUDES += \
# system/media/camera/include \
LOCAL_CFLAGS += -Wall -Wextra
LOCAL_MODULE:= fingerprint_tests
LOCAL_MODULE_TAGS := tests
include $(BUILD_NATIVE_TEST)

15
tests/hardware/Android.bp Normal file
View file

@ -0,0 +1,15 @@
cc_library_static {
name: "static-hal-check",
srcs: [
"struct-size.cpp",
"struct-offset.cpp",
"struct-last.cpp",
],
shared_libs: ["libhardware"],
cflags: [
"-std=gnu++11",
"-O0",
],
include_dirs: ["system/media/camera/include"],
}

View file

@ -1,12 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := static-hal-check
LOCAL_SRC_FILES := struct-size.cpp struct-offset.cpp struct-last.cpp
LOCAL_SHARED_LIBRARIES := libhardware
LOCAL_CFLAGS := -std=gnu++11 -O0
LOCAL_C_INCLUDES += \
system/media/camera/include
include $(BUILD_STATIC_LIBRARY)

View file

@ -0,0 +1,10 @@
cc_binary {
name: "test-nusensors",
srcs: ["nusensors.cpp"],
shared_libs: [
"libcutils",
"libhardware",
],
}

View file

@ -1,14 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
nusensors.cpp
LOCAL_SHARED_LIBRARIES := \
libcutils libhardware
LOCAL_MODULE:= test-nusensors
LOCAL_MODULE_TAGS := optional
include $(BUILD_EXECUTABLE)