developer | 953cd0a | 2024-08-19 17:53:40 +0800 | [diff] [blame^] | 1 | SUMMARY = "Mediatek EIP-197 Driver" |
| 2 | LICENSE = "GPL-2.0" |
| 3 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" |
| 4 | |
| 5 | inherit module |
| 6 | |
| 7 | SRC_URI = "git://gerrit.mediatek.inc/openwrt/feeds/mtk_openwrt_feeds;protocol=https;branch=master;destsuffix=git" |
| 8 | SRCREV = "${AUTOREV}" |
| 9 | |
| 10 | S = "${WORKDIR}/git/feed/kernel/crypto-eip/src" |
| 11 | |
| 12 | DEPENDS += "pce" |
| 13 | DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'capwap-dtls', 'tops', '', d)}" |
| 14 | |
| 15 | do_configure[noexec] = "1" |
| 16 | |
| 17 | # Include Paths |
| 18 | INCLUDE_FLAGS_ALL=" \ |
| 19 | -I${S}/ddk/inc \ |
| 20 | -I${S}/ddk/inc/crypto-eip/ddk \ |
| 21 | -I${S}/ddk/inc/crypto-eip/ddk/configs \ |
| 22 | -I${S}/ddk/inc/crypto-eip/ddk/device \ |
| 23 | -I${S}/ddk/inc/crypto-eip/ddk/device/lkm \ |
| 24 | -I${S}/ddk/inc/crypto-eip/ddk/device/lkm/of \ |
| 25 | -I${S}/ddk/inc/crypto-eip/ddk/dmares \ |
| 26 | -I${S}/ddk/inc/crypto-eip/ddk/firmware_api \ |
| 27 | -I${S}/ddk/inc/crypto-eip/ddk/kit/builder/sa \ |
| 28 | -I${S}/ddk/inc/crypto-eip/ddk/kit/builder/token \ |
| 29 | -I${S}/ddk/inc/crypto-eip/ddk/kit/eip197 \ |
| 30 | -I${S}/ddk/inc/crypto-eip/ddk/kit/iotoken \ |
| 31 | -I${S}/ddk/inc/crypto-eip/ddk/kit/list \ |
| 32 | -I${S}/ddk/inc/crypto-eip/ddk/kit/ring \ |
| 33 | -I${S}/ddk/inc/crypto-eip/ddk/libc \ |
| 34 | -I${S}/ddk/inc/crypto-eip/ddk/log \ |
| 35 | -I${S}/ddk/inc/crypto-eip/ddk/shdevxs \ |
| 36 | -I${S}/ddk/inc/crypto-eip/ddk/slad \ |
| 37 | -I${S}/ddk/inc/crypto-eip/ddk/slad/lkm \ |
| 38 | -I${STAGING_KERNEL_BUILDDIR}/source/drivers/net/ethernet/mediatek/ \ |
| 39 | -I${STAGING_KERNEL_BUILDDIR}/source/include \ |
| 40 | " |
| 41 | |
| 42 | PKG_MAKE_FLAGS = " \ |
| 43 | CONFIG_MTK_CRYPTO_EIP_INLINE=m \ |
| 44 | CONFIG_RAMBUS_DDK=m \ |
| 45 | CONFIG_CRYPTO_XFRM_OFFLOAD_MTK_PCE=y \ |
| 46 | CONFIG_CRYPTO_OFFLOAD_INLINE=y \ |
| 47 | CONFIG_INET_ESP_OFFLOAD=y \ |
| 48 | CONFIG_CRYPTO_HW=y \ |
| 49 | CONFIG_CRYPTO_AUTHENC=y \ |
| 50 | CONFIG_CRYPTO_AES=y \ |
| 51 | CONFIG_CRYPTO_AEAD=y \ |
| 52 | CONFIG_CRYPTO_DES=y \ |
| 53 | CONFIG_CRYPTO_MD5=y \ |
| 54 | CONFIG_CRYPTO_SHA1=y \ |
| 55 | CONFIG_CRYPTO_SHA256=y \ |
| 56 | CONFIG_CRYPTO_SHA512=y \ |
| 57 | CONFIG_CRYPTO_SHA3=y \ |
| 58 | CONFIG_CRYPTO_HMAC=y \ |
| 59 | CONFIG_INET_ESP=y \ |
| 60 | " |
| 61 | |
| 62 | EXTRA_CFLAGS+=" \ |
| 63 | ${INCLUDE_FLAGS_ALL} \ |
| 64 | -DEIP197_BUS_VERSION_AXI3 \ |
| 65 | -DDRIVER_64BIT_HOST \ |
| 66 | -DDRIVER_64BIT_DEVICE \ |
| 67 | -DADAPTER_AUTO_TOKENBUILDER \ |
| 68 | -DCONFIG_XFRM_OFFLOAD \ |
| 69 | -DCONFIG_CRYPTO_XFRM_OFFLOAD_MTK_PCE \ |
| 70 | -DMODULE \ |
| 71 | " |
| 72 | |
| 73 | include ${@bb.utils.contains('DISTRO_FEATURES', 'capwap-dtls', 'files/custom/eip-197-capwap-dtls.inc', '', d)} |
| 74 | |
| 75 | EXTRA_OEMAKE = " \ |
| 76 | -C ${STAGING_KERNEL_BUILDDIR}/ \ |
| 77 | M=${S} \ |
| 78 | ${PKG_MAKE_FLAGS} \ |
| 79 | EXTRA_CFLAGS='${EXTRA_CFLAGS}' \ |
| 80 | modules \ |
| 81 | " |
| 82 | |
| 83 | do_install_append() { |
| 84 | install -d ${D}/${base_libdir}/modules/${KERNEL_VERSION}/extra/ |
| 85 | install -m 0755 ${S}/crypto-eip-inline.ko ${D}/${base_libdir}/modules/${KERNEL_VERSION}/ |
| 86 | install -m 0755 ${S}/ddk/crypto-eip-ddk.ko ${D}/${base_libdir}/modules/${KERNEL_VERSION}/ |
| 87 | # copy firmware and install |
| 88 | install -d ${D}/${base_libdir}/firmware |
| 89 | install -m 0755 ${S}/../firmware/bin/firmware_eip207_ifpp.bin ${D}/${base_libdir}/firmware/ |
| 90 | install -m 0755 ${S}/../firmware/bin/firmware_eip207_ipue.bin ${D}/${base_libdir}/firmware/ |
| 91 | install -m 0755 ${S}/../firmware/bin/firmware_eip207_ofpp.bin ${D}/${base_libdir}/firmware/ |
| 92 | install -m 0755 ${S}/../firmware/bin/firmware_eip207_opue.bin ${D}/${base_libdir}/firmware/ |
| 93 | } |
| 94 | |
| 95 | FILES_${PN} += "${base_libdir}/firmware/*" |