From 124e7bffe87cda4d869dd94ca114737368256df7 Mon Sep 17 00:00:00 2001 From: Arian Date: Sat, 21 Sep 2019 13:06:40 +0200 Subject: shinano-common: Build nfc_nci.msm8974 Change-Id: I3d5ace9ad0661e89b00741e92190a88dd04272b4 --- pn54x/Android.bp | 0 pn54x/Android.mk | 95 ++++++++++++++++----------------------------------- proprietary-files.txt | 1 - shinano.mk | 8 +++-- 4 files changed, 34 insertions(+), 70 deletions(-) delete mode 100644 pn54x/Android.bp diff --git a/pn54x/Android.bp b/pn54x/Android.bp deleted file mode 100644 index e69de29..0000000 diff --git a/pn54x/Android.mk b/pn54x/Android.mk index 21d4f19..dea7fc1 100644 --- a/pn54x/Android.mk +++ b/pn54x/Android.mk @@ -1,4 +1,6 @@ +# # Copyright (C) 2011 The Android Open Source Project +# 2019 The LineageOS Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,63 +13,13 @@ # 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. - -#variables for NFC_NXP_CHIP_TYPE -PN547C2 := 1 -PN548C2 := 2 -PN551 := 3 -PN553 := 4 -NQ110 := $PN547C2 -NQ120 := $PN547C2 -NQ210 := $PN548C2 -NQ220 := $PN548C2 -#NXP PN547 Enable -ifeq ($(PN547C2),1) -D_CFLAGS += -DPN547C2=1 -endif -ifeq ($(PN548C2),2) -D_CFLAGS += -DPN548C2=2 -endif -ifeq ($(PN551),3) -D_CFLAGS += -DPN551=3 -endif -ifeq ($(PN553),4) -D_CFLAGS += -DPN553=4 -endif - -#### Select the CHIP #### -ifneq ($(filter pn547 nq110 nq120,$(BOARD_NFC_CHIPSET)),) -NXP_CHIP_TYPE := $(PN547C2) -else ifneq ($(filter pn548 nq210 nq220,$(BOARD_NFC_CHIPSET)),) -NXP_CHIP_TYPE := $(PN548C2) -else ifeq ($(BOARD_NFC_CHIPSET),pn551) -NXP_CHIP_TYPE := $(PN551) -else ifeq ($(BOARD_NFC_CHIPSET),pn553) -NXP_CHIP_TYPE := $(PN553) -endif - -ifeq ($(NXP_CHIP_TYPE),$(PN547C2)) -D_CFLAGS += -DNFC_NXP_CHIP_TYPE=PN547C2 -else ifeq ($(NXP_CHIP_TYPE),$(PN548C2)) -D_CFLAGS += -DNFC_NXP_CHIP_TYPE=PN548C2 -else ifeq ($(NXP_CHIP_TYPE),$(PN551)) -D_CFLAGS += -DNFC_NXP_CHIP_TYPE=PN551 -else ifeq ($(NXP_CHIP_TYPE),$(PN553)) -D_CFLAGS += -DNFC_NXP_CHIP_TYPE=PN553 -else -D_CFLAGS += -DNFC_NXP_CHIP_TYPE=PN553 -endif - -ifneq ($(BOARD_NFC_HAL_SUFFIX),) - HAL_SUFFIX := $(BOARD_NFC_HAL_SUFFIX) -else - HAL_SUFFIX := $(TARGET_DEVICE) -endif +# LOCAL_PATH := $(call my-dir) + include $(CLEAR_VARS) -LOCAL_MODULE := nfc_nci.$(HAL_SUFFIX) -LOCAL_PROPRIETARY_MODULE := true +LOCAL_MODULE := nfc_nci.msm8974 +LOCAL_VENDOR_MODULE := true LOCAL_MODULE_RELATIVE_PATH := hw LOCAL_SRC_FILES := \ $(call all-c-files-under, common) \ @@ -82,24 +34,35 @@ LOCAL_SRC_FILES := \ LOCAL_SHARED_LIBRARIES := liblog libcutils libdl libhardware -LOCAL_CFLAGS := $(D_CFLAGS) LOCAL_C_INCLUDES += \ - $(LOCAL_PATH)/utils \ - $(LOCAL_PATH)/inc \ $(LOCAL_PATH)/common \ $(LOCAL_PATH)/dnld \ $(LOCAL_PATH)/hal \ + $(LOCAL_PATH)/inc \ $(LOCAL_PATH)/log \ - $(LOCAL_PATH)/tml \ $(LOCAL_PATH)/self-test \ + $(LOCAL_PATH)/tml \ + $(LOCAL_PATH)/utils -LOCAL_CFLAGS += -DANDROID \ - -DNXP_UICC_ENABLE -DNXP_HW_SELF_TEST -LOCAL_CFLAGS += -DNFC_NXP_HFO_SETTINGS=FALSE -#LOCAL_CFLAGS += -DFELICA_CLT_ENABLE - +LOCAL_CFLAGS := \ + -DNFC_NXP_CHIP_TYPE=PN547C2 \ + -DNFC_NXP_HFO_SETTINGS=FALSE \ + -DNXP_HW_SELF_TEST -# -# nfc_nci.$(HAL_SUFFIX) -# include $(BUILD_SHARED_LIBRARY) + +include $(CLEAR_VARS) +LOCAL_MODULE := libnfc-nci.conf +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_CLASS := ETC +LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC) +LOCAL_SRC_FILES := $(LOCAL_MODULE) +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_MODULE := libnfc-nxp.conf +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_CLASS := ETC +LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC) +LOCAL_SRC_FILES := $(LOCAL_MODULE) +include $(BUILD_PREBUILT) diff --git a/proprietary-files.txt b/proprietary-files.txt index fd636d1..71c3872 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -258,7 +258,6 @@ vendor/lib/libOmxWmaDec.so # NFC vendor/firmware/libpn547_fw.so:vendor/lib/libpn547_fw.so -vendor/lib/hw/nfc_nci.pn54x.default.so|9175a9714b3e9e27401ea8f51157e5947bb216f3 # Perf vendor/lib/libqc-opt.so diff --git a/shinano.mk b/shinano.mk index 10d0cb6..5a97fdd 100644 --- a/shinano.mk +++ b/shinano.mk @@ -89,11 +89,13 @@ PRODUCT_COPY_FILES += \ PRODUCT_PACKAGES += \ android.hardware.nfc@1.0-impl \ android.hardware.nfc@1.0-service \ + com.android.nfc_extras \ NfcNci \ - com.android.nfc_extras + nfc_nci.msm8974 -PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ - ro.hardware.nfc_nci=pn54x.default +PRODUCT_PACKAGES += \ + libnfc-nci.conf \ + libnfc-nxp.conf PRODUCT_COPY_FILES += \ $(COMMON_PATH)/configs/nfc/nfcee_access.xml:$(TARGET_COPY_OUT_VENDOR)/etc/nfcee_access.xml \ -- cgit v1.2.3