From 0aafb6fc043c0aff93ec62e50afe1cc800b08b50 Mon Sep 17 00:00:00 2001 From: yuanruibin Date: Wed, 16 Apr 2025 16:49:13 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9hal=E5=B1=82=E5=BA=93?= =?UTF-8?q?=E4=BB=A5default=E7=BB=93=E5=B0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aosp/vendor/common/products/product_common.mk | 10 +++++----- aosp/vendor/common/products/product_prebuilts.mk | 7 +++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/aosp/vendor/common/products/product_common.mk b/aosp/vendor/common/products/product_common.mk index 725581d86..0f175fccb 100644 --- a/aosp/vendor/common/products/product_common.mk +++ b/aosp/vendor/common/products/product_common.mk @@ -6,11 +6,11 @@ PRODUCT_PACKAGES += \ Launcher3 \ kauditd \ - hwcomposer.huawei \ - audio.primary.$(BUILD_HARDWARE) \ - gralloc.$(BUILD_HARDWARE) \ - gps.$(BUILD_HARDWARE) \ - vibrator.$(BUILD_HARDWARE) \ + hwcomposer.default \ + audio.primary.default \ + gralloc.default \ + gps.default \ + vibrator.default \ libGLES_mesa \ libGLESv1_CM_slow_binding \ libGLESv2_slow_binding \ diff --git a/aosp/vendor/common/products/product_prebuilts.mk b/aosp/vendor/common/products/product_prebuilts.mk index f2756278d..62615a036 100644 --- a/aosp/vendor/common/products/product_prebuilts.mk +++ b/aosp/vendor/common/products/product_prebuilts.mk @@ -18,10 +18,9 @@ PRODUCT_PACKAGES += \ libVmiMediaCommon \ libEncodeEngine \ libVmiDevice \ - audio.primary.$(BUILD_HARDWARE) \ - camera.$(BUILD_HARDWARE) \ - camera.$(BUILD_HARDWARE).jpeg \ - sensors.$(BUILD_HARDWARE) \ + camera.default \ + camera.default.jpeg \ + sensors.default \ sipcserver \ libSipc \ libavcodec \ -- Gitee From 63d9bb75f2fcb8f425bce3b6f3d90eb3f62b40ad Mon Sep 17 00:00:00 2001 From: yuanruibin Date: Mon, 21 Apr 2025 10:11:08 +0800 Subject: [PATCH 2/3] =?UTF-8?q?appctrl=E6=90=AC=E8=BF=81=E5=88=B0vendor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aosp/vendor/common/products/product_common.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aosp/vendor/common/products/product_common.mk b/aosp/vendor/common/products/product_common.mk index 0f175fccb..11be663dd 100644 --- a/aosp/vendor/common/products/product_common.mk +++ b/aosp/vendor/common/products/product_common.mk @@ -26,7 +26,8 @@ PRODUCT_PACKAGES += \ hwcap \ libwifi-hal-auror \ tracepath \ - CphNetworkLocation + CphNetworkLocation \ + appctrl PRODUCT_PROPERTY_OVERRIDES += \ persist.sys.language=zh \ -- Gitee From dd28f2dc7a7668d18c0d7ebdb46110a6411f5c43 Mon Sep 17 00:00:00 2001 From: yuanruibin Date: Mon, 21 Apr 2025 15:47:33 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=BC=80=E6=BA=90hal=E5=B1=82=E6=A8=A1?= =?UTF-8?q?=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../akm/AK8975_FS/libsensors/Android.mk | 43 +++++++++++++ .../libhardware/modules/audio/Android.mk | 62 +++++++++++++++++++ .../libhardware/modules/camera/Android.mk | 45 ++++++++++++++ .../libhardware/modules/gralloc/Android.mk | 36 +++++++++++ .../libhardware/modules/hwcomposer/Android.mk | 28 +++++++++ .../libhardware/modules/vibrator/Android.mk | 30 +++++++++ .../common/products/product_prebuilts.mk | 2 +- 7 files changed, 245 insertions(+), 1 deletion(-) create mode 100644 aosp/hardware/akm/AK8975_FS/libsensors/Android.mk create mode 100644 aosp/hardware/libhardware/modules/audio/Android.mk create mode 100644 aosp/hardware/libhardware/modules/camera/Android.mk create mode 100644 aosp/hardware/libhardware/modules/gralloc/Android.mk create mode 100644 aosp/hardware/libhardware/modules/hwcomposer/Android.mk create mode 100644 aosp/hardware/libhardware/modules/vibrator/Android.mk diff --git a/aosp/hardware/akm/AK8975_FS/libsensors/Android.mk b/aosp/hardware/akm/AK8975_FS/libsensors/Android.mk new file mode 100644 index 000000000..d243d4dca --- /dev/null +++ b/aosp/hardware/akm/AK8975_FS/libsensors/Android.mk @@ -0,0 +1,43 @@ +# Copyright (C) 2008 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) + +# HAL module implemenation, not prelinked, and stored in +# hw/..so +include $(CLEAR_VARS) + +LOCAL_MODULE := sensors_ori.default + +LOCAL_MODULE_RELATIVE_PATH := hw + +LOCAL_MODULE_TAGS := optional + +LOCAL_CFLAGS := -DLOG_TAG=\"Sensors\" \ + -Wall \ + -DSENSORHAL_ACC_ADXL346 +# -DSENSORHAL_ACC_KXTF9 + +LOCAL_SRC_FILES := \ + SensorBase.cpp \ + InputEventReader.cpp \ + AkmSensor.cpp \ + sensors.cpp \ + AdxlSensor.cpp +# KionixSensor.cpp + +LOCAL_SHARED_LIBRARIES := liblog libcutils libdl + +include $(BUILD_SHARED_LIBRARY) diff --git a/aosp/hardware/libhardware/modules/audio/Android.mk b/aosp/hardware/libhardware/modules/audio/Android.mk new file mode 100644 index 000000000..a50d4cba8 --- /dev/null +++ b/aosp/hardware/libhardware/modules/audio/Android.mk @@ -0,0 +1,62 @@ +# 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...so where the only +# required type is 'primary'. Other possibilites are 'a2dp', 'usb', etc. +include $(CLEAR_VARS) + +LOCAL_MODULE := audio_ori.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...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) diff --git a/aosp/hardware/libhardware/modules/camera/Android.mk b/aosp/hardware/libhardware/modules/camera/Android.mk new file mode 100644 index 000000000..0e8552cc7 --- /dev/null +++ b/aosp/hardware/libhardware/modules/camera/Android.mk @@ -0,0 +1,45 @@ +# 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 := camera_ori.default +LOCAL_MODULE_RELATIVE_PATH := hw + +LOCAL_C_INCLUDES += \ + system/core/include \ + system/media/camera/include \ + +LOCAL_SRC_FILES := \ + CameraHAL.cpp \ + Camera.cpp \ + ExampleCamera.cpp \ + Metadata.cpp \ + Stream.cpp \ + VendorTags.cpp \ + +LOCAL_SHARED_LIBRARIES := \ + libcamera_metadata \ + libcutils \ + liblog \ + libsync \ + libutils \ + +LOCAL_CFLAGS += -Wall -Wextra -fvisibility=hidden + +LOCAL_MODULE_TAGS := optional + +include $(BUILD_SHARED_LIBRARY) diff --git a/aosp/hardware/libhardware/modules/gralloc/Android.mk b/aosp/hardware/libhardware/modules/gralloc/Android.mk new file mode 100644 index 000000000..bc4b0490d --- /dev/null +++ b/aosp/hardware/libhardware/modules/gralloc/Android.mk @@ -0,0 +1,36 @@ +# Copyright (C) 2008 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) + +# HAL module implemenation stored in +# hw/..so +include $(CLEAR_VARS) + +LOCAL_MODULE_RELATIVE_PATH := hw +LOCAL_SHARED_LIBRARIES := liblog libcutils + +LOCAL_SRC_FILES := \ + gralloc.cpp \ + framebuffer.cpp \ + mapper.cpp + +LOCAL_MODULE := gralloc_ori.default +LOCAL_CFLAGS:= -DLOG_TAG=\"gralloc\" -Wno-missing-field-initializers +ifeq ($(TARGET_USE_PAN_DISPLAY),true) +LOCAL_CFLAGS += -DUSE_PAN_DISPLAY=1 +endif + +include $(BUILD_SHARED_LIBRARY) diff --git a/aosp/hardware/libhardware/modules/hwcomposer/Android.mk b/aosp/hardware/libhardware/modules/hwcomposer/Android.mk new file mode 100644 index 000000000..ee72492c6 --- /dev/null +++ b/aosp/hardware/libhardware/modules/hwcomposer/Android.mk @@ -0,0 +1,28 @@ +# Copyright (C) 2008 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) + +# HAL module implemenation stored in +# hw/..so +include $(CLEAR_VARS) + +LOCAL_MODULE_RELATIVE_PATH := hw +LOCAL_SHARED_LIBRARIES := liblog libEGL +LOCAL_SRC_FILES := hwcomposer.cpp +LOCAL_MODULE := hwcomposer_ori.default +LOCAL_CFLAGS:= -DLOG_TAG=\"hwcomposer\" +LOCAL_MODULE_TAGS := optional +include $(BUILD_SHARED_LIBRARY) diff --git a/aosp/hardware/libhardware/modules/vibrator/Android.mk b/aosp/hardware/libhardware/modules/vibrator/Android.mk new file mode 100644 index 000000000..d06638290 --- /dev/null +++ b/aosp/hardware/libhardware/modules/vibrator/Android.mk @@ -0,0 +1,30 @@ +# 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_ori.default + +# HAL module implementation stored in +# hw/.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) + diff --git a/aosp/vendor/common/products/product_prebuilts.mk b/aosp/vendor/common/products/product_prebuilts.mk index 62615a036..02119504e 100644 --- a/aosp/vendor/common/products/product_prebuilts.mk +++ b/aosp/vendor/common/products/product_prebuilts.mk @@ -19,7 +19,7 @@ PRODUCT_PACKAGES += \ libEncodeEngine \ libVmiDevice \ camera.default \ - camera.default.jpeg \ + camera.$(BUILD_HARDWARE).jpeg \ sensors.default \ sipcserver \ libSipc \ -- Gitee