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 | |
developer | 5ece98b | 2024-11-04 17:15:01 +0800 | [diff] [blame^] | 15 | # There is dependency issue in this package. |
| 16 | # For now, we jsut disable parallel building as a workaround. |
| 17 | PARALLEL_MAKE = "" |
| 18 | BB_NUMBER_THREADS = "1" |
| 19 | |
developer | 953cd0a | 2024-08-19 17:53:40 +0800 | [diff] [blame] | 20 | do_configure[noexec] = "1" |
| 21 | |
| 22 | # Include Paths |
| 23 | INCLUDE_FLAGS_ALL=" \ |
| 24 | -I${S}/ddk/inc \ |
| 25 | -I${S}/ddk/inc/crypto-eip/ddk \ |
| 26 | -I${S}/ddk/inc/crypto-eip/ddk/configs \ |
developer | 5ece98b | 2024-11-04 17:15:01 +0800 | [diff] [blame^] | 27 | -I${S}/ddk/inc/crypto-eip/ddk/shdevxs \ |
| 28 | -I${S}/ddk/inc/crypto-eip/ddk/umdevxs \ |
developer | 953cd0a | 2024-08-19 17:53:40 +0800 | [diff] [blame] | 29 | -I${S}/ddk/inc/crypto-eip/ddk/device \ |
| 30 | -I${S}/ddk/inc/crypto-eip/ddk/device/lkm \ |
| 31 | -I${S}/ddk/inc/crypto-eip/ddk/device/lkm/of \ |
| 32 | -I${S}/ddk/inc/crypto-eip/ddk/dmares \ |
| 33 | -I${S}/ddk/inc/crypto-eip/ddk/firmware_api \ |
| 34 | -I${S}/ddk/inc/crypto-eip/ddk/kit/builder/sa \ |
| 35 | -I${S}/ddk/inc/crypto-eip/ddk/kit/builder/token \ |
| 36 | -I${S}/ddk/inc/crypto-eip/ddk/kit/eip197 \ |
| 37 | -I${S}/ddk/inc/crypto-eip/ddk/kit/iotoken \ |
| 38 | -I${S}/ddk/inc/crypto-eip/ddk/kit/list \ |
| 39 | -I${S}/ddk/inc/crypto-eip/ddk/kit/ring \ |
| 40 | -I${S}/ddk/inc/crypto-eip/ddk/libc \ |
| 41 | -I${S}/ddk/inc/crypto-eip/ddk/log \ |
developer | 953cd0a | 2024-08-19 17:53:40 +0800 | [diff] [blame] | 42 | -I${S}/ddk/inc/crypto-eip/ddk/slad \ |
| 43 | -I${S}/ddk/inc/crypto-eip/ddk/slad/lkm \ |
| 44 | -I${STAGING_KERNEL_BUILDDIR}/source/drivers/net/ethernet/mediatek/ \ |
| 45 | -I${STAGING_KERNEL_BUILDDIR}/source/include \ |
| 46 | " |
| 47 | |
| 48 | PKG_MAKE_FLAGS = " \ |
| 49 | CONFIG_MTK_CRYPTO_EIP_INLINE=m \ |
| 50 | CONFIG_RAMBUS_DDK=m \ |
| 51 | CONFIG_CRYPTO_XFRM_OFFLOAD_MTK_PCE=y \ |
| 52 | CONFIG_CRYPTO_OFFLOAD_INLINE=y \ |
| 53 | CONFIG_INET_ESP_OFFLOAD=y \ |
| 54 | CONFIG_CRYPTO_HW=y \ |
| 55 | CONFIG_CRYPTO_AUTHENC=y \ |
| 56 | CONFIG_CRYPTO_AES=y \ |
| 57 | CONFIG_CRYPTO_AEAD=y \ |
| 58 | CONFIG_CRYPTO_DES=y \ |
| 59 | CONFIG_CRYPTO_MD5=y \ |
| 60 | CONFIG_CRYPTO_SHA1=y \ |
| 61 | CONFIG_CRYPTO_SHA256=y \ |
| 62 | CONFIG_CRYPTO_SHA512=y \ |
| 63 | CONFIG_CRYPTO_SHA3=y \ |
| 64 | CONFIG_CRYPTO_HMAC=y \ |
| 65 | CONFIG_INET_ESP=y \ |
| 66 | " |
| 67 | |
| 68 | EXTRA_CFLAGS+=" \ |
| 69 | ${INCLUDE_FLAGS_ALL} \ |
| 70 | -DEIP197_BUS_VERSION_AXI3 \ |
| 71 | -DDRIVER_64BIT_HOST \ |
| 72 | -DDRIVER_64BIT_DEVICE \ |
| 73 | -DADAPTER_AUTO_TOKENBUILDER \ |
| 74 | -DCONFIG_XFRM_OFFLOAD \ |
| 75 | -DCONFIG_CRYPTO_XFRM_OFFLOAD_MTK_PCE \ |
| 76 | -DMODULE \ |
| 77 | " |
| 78 | |
| 79 | include ${@bb.utils.contains('DISTRO_FEATURES', 'capwap-dtls', 'files/custom/eip-197-capwap-dtls.inc', '', d)} |
| 80 | |
| 81 | EXTRA_OEMAKE = " \ |
| 82 | -C ${STAGING_KERNEL_BUILDDIR}/ \ |
| 83 | M=${S} \ |
| 84 | ${PKG_MAKE_FLAGS} \ |
| 85 | EXTRA_CFLAGS='${EXTRA_CFLAGS}' \ |
| 86 | modules \ |
| 87 | " |
| 88 | |
| 89 | do_install_append() { |
| 90 | install -d ${D}/${base_libdir}/modules/${KERNEL_VERSION}/extra/ |
| 91 | install -m 0755 ${S}/crypto-eip-inline.ko ${D}/${base_libdir}/modules/${KERNEL_VERSION}/ |
developer | ead0bad | 2024-10-24 10:50:28 +0800 | [diff] [blame] | 92 | install -m 0755 ${S}/ddk/build/ksupport/crypto-eip-ddk-ksupport.ko ${D}/${base_libdir}/modules/${KERNEL_VERSION}/ |
| 93 | install -m 0755 ${S}/ddk/build/ctrl/crypto-eip-ddk-ctrl.ko ${D}/${base_libdir}/modules/${KERNEL_VERSION}/ |
| 94 | install -m 0755 ${S}/ddk/build/app/crypto-eip-ddk-ctrl-app.ko ${D}/${base_libdir}/modules/${KERNEL_VERSION}/ |
| 95 | install -m 0755 ${S}/ddk/build/engine/crypto-eip-ddk-engine.ko ${D}/${base_libdir}/modules/${KERNEL_VERSION}/ |
developer | 953cd0a | 2024-08-19 17:53:40 +0800 | [diff] [blame] | 96 | # copy firmware and install |
| 97 | install -d ${D}/${base_libdir}/firmware |
| 98 | install -m 0755 ${S}/../firmware/bin/firmware_eip207_ifpp.bin ${D}/${base_libdir}/firmware/ |
| 99 | install -m 0755 ${S}/../firmware/bin/firmware_eip207_ipue.bin ${D}/${base_libdir}/firmware/ |
| 100 | install -m 0755 ${S}/../firmware/bin/firmware_eip207_ofpp.bin ${D}/${base_libdir}/firmware/ |
| 101 | install -m 0755 ${S}/../firmware/bin/firmware_eip207_opue.bin ${D}/${base_libdir}/firmware/ |
| 102 | } |
| 103 | |
| 104 | FILES_${PN} += "${base_libdir}/firmware/*" |