RK3288适配PN5XX-NFC模块

diff --git a/device/rockchip/common/device.mk b/device/rockchip/common/device.mk
index fb3b9c9..c9a8e4b 100755
--- a/device/rockchip/common/device.mk
+++ b/device/rockchip/common/device.mk
@@ -495,40 +495,26 @@ endif
 #PRODUCT_COPY_FILES += \
 #    $(LOCAL_PATH)/init.usbstorage.rc:root/init.usbstorage.rc
 #endif
-
-ifeq ($(strip $(BOARD_CONNECTIVITY_MODULE)), ap6xxx_nfc)
-#NFC packages
 PRODUCT_PACKAGES += \
-    nfc_nci.$(TARGET_BOARD_HARDWARE) \
+    libnfc-nci \
+    libnfc_nci_jni \
+    nfc_nci.pn54x.default \
     NfcNci \
     Tag \
+    com.gsma.services.nfc \
     com.android.nfc_extras
 
-# NFCEE access control
-ifeq ($(TARGET_BUILD_VARIANT),user)
-NFCEE_ACCESS_PATH := $(LOCAL_PATH)/nfc/nfcee_access.xml
-else
-NFCEE_ACCESS_PATH := $(LOCAL_PATH)/nfc/nfcee_access_debug.xml
-endif
 
-copyNfcFirmware = $(subst XXXX,$(strip $(1)),hardware/broadcom/nfc/firmware/XXXX:/system/vendor/firmware/XXXX)
-# NFC access control + feature files + configuration
 PRODUCT_COPY_FILES += \
-    $(NFCEE_ACCESS_PATH):system/etc/nfcee_access.xml \
+    device/rockchip/common/nfc/nfcee_access.xml:system/etc/nfcee_access.xml \
+    RKTools/libpn548ad_fw.so:/system/etc/libpn548ad_fw.so \
+    external/libnfc-nci/halimpl/pn54x/libnfc-nxp.conf:/system/etc/libnfc-nxp.conf \
+    external/libnfc-nci/halimpl/pn54x/libnfc-brcm.conf:/system/etc/libnfc-brcm.conf \
+    frameworks/native/data/etc/com.nxp.mifare.xml:system/etc/permissions/com.nxp.mifare.xml \
     frameworks/native/data/etc/com.android.nfc_extras.xml:system/etc/permissions/com.android.nfc_extras.xml \
     frameworks/native/data/etc/android.hardware.nfc.xml:system/etc/permissions/android.hardware.nfc.xml \
-    frameworks/native/data/etc/android.hardware.nfc.hce.xml:system/etc/permissions/android.hardware.nfc.hce.xml \
-    $(LOCAL_PATH)/nfc/libnfc-brcm.conf:system/etc/libnfc-brcm.conf \
-    $(LOCAL_PATH)/nfc/libnfc-brcm-20791b03.conf:system/etc/libnfc-brcm-20791b03.conf \
-    $(LOCAL_PATH)/nfc/libnfc-brcm-20791b04.conf:system/etc/libnfc-brcm-20791b04.conf \
-    $(LOCAL_PATH)/nfc/libnfc-brcm-20791b05.conf:system/etc/libnfc-brcm-20791b05.conf \
-    $(LOCAL_PATH)/nfc/libnfc-brcm-43341b00.conf:system/etc/libnfc-brcm-43341b00.conf \
-    $(call copyNfcFirmware, BCM20791B3_002.004.010.0161.0000_Generic_I2CLite_NCD_Signed_configdata.ncd) \
-    $(call copyNfcFirmware, BCM20791B3_002.004.010.0161.0000_Generic_PreI2C_NCD_Signed_configdata.ncd) \
-    $(call copyNfcFirmware, BCM20791B5_002.006.013.0011.0000_Generic_I2C_NCD_Unsigned_configdata.ncd) \
-    $(call copyNfcFirmware, BCM43341NFCB0_002.001.009.0021.0000_Generic_I2C_NCD_Signed_configdata.ncd) \
-    $(call copyNfcFirmware, BCM43341NFCB0_002.001.009.0021.0000_Generic_PreI2C_NCD_Signed_configdata.ncd)
-endif
+    frameworks/native/data/etc/android.hardware.nfc.hce.xml:system/etc/permissions/android.hardware.nfc.hce.xml
+
diff --git a/frameworks/base/Android.mk b/frameworks/base/Android.mk
index ad4ad99..f6949ed 100755
--- a/frameworks/base/Android.mk
+++ b/frameworks/base/Android.mk
@@ -213,11 +213,21 @@ LOCAL_SRC_FILES += \
        core/java/android/net/INetworkStatsSession.aidl \
        core/java/android/net/nsd/INsdManager.aidl \
        core/java/android/nfc/IAppCallback.aidl \
+       core/java/com/nxp/nfc/gsma/internal/INxpNfcController.aidl \
+       core/java/com/nxp/nfc/INxpNfcAdapter.aidl \
+       core/java/com/nxp/nfc/INxpNfcAdapterExtras.aidl \
+       core/java/com/nxp/nfc/INfcVzw.aidl \
        core/java/android/nfc/INfcAdapter.aidl \
        core/java/android/nfc/INfcAdapterExtras.aidl \
        core/java/android/nfc/INfcTag.aidl \
        core/java/android/nfc/INfcCardEmulation.aidl \
+       core/java/com/nxp/intf/ILoaderService.aidl \
+        core/java/com/nxp/intf/IJcopService.aidl \
+        core/java/com/nxp/intf/INxpExtrasService.aidl \
+       core/java/com/nxp/intf/IeSEClientServicesAdapter.aidl \
        core/java/android/nfc/INfcFCardEmulation.aidl \
+       core/java/com/nxp/nfc/INfcDta.aidl \
+       core/java/com/nxp/nfc/INxpNfcAccessExtras.aidl 

hardware中的nfc.h文件需要更新,否则出现编译错误。

libnfc-nxp.conf中的 i2c通讯 port 需要跟驱动生成的port确认,否则无法开启NFC选项。

使用MELD 对比修改Android.mk 文件,不能出错。

http://59.110.237.183/disk/index.php/s/6DA5idF4j6y5arp


Leave a Reply

Your email address will not be published. Required fields are marked *

曠怡亭口占

流轉知何世,江山尚此亭。

登臨皆曠士,喪亂有遺經。

已識乾坤大,猶憐草木青。

長空送鳥印,留幻與人靈。

Featured Posts