blob: 6af254f98c469740f33a41bb5f86d2cbc0b46386 [file] [log] [blame]
developer9ac79da2022-10-31 14:57:29 +08001DESCRIPTION = "mt76-test"
2SECTION = "applications"
3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://../COPYING;md5=c188eeeb69c0a05d0545816f1458a0c9"
5
6DEPENDS += "libnl-tiny"
7
8inherit pkgconfig cmake
9
10PV = "1.0"
11
12require mt76.inc
13SRC_URI = " \
14 git://git@github.com/openwrt/mt76.git;protocol=https \
15 file://COPYING;subdir=git \
developerddae1502022-11-16 18:00:20 +080016 file://0001-mt76-add-internal-wed_tiny-header-file.patch;apply=no \
developer9ac79da2022-10-31 14:57:29 +080017 "
18
19
developerddae1502022-11-16 18:00:20 +080020
21
developer9ac79da2022-10-31 14:57:29 +080022DEPENDS += "virtual/kernel"
23DEPENDS += "linux-mac80211"
24DEPENDS += "linux-mt76"
25
26FILESEXTRAPATHS_prepend := "${THISDIR}/files/patches:"
27
28
29CFLAGS_append = " -I=${includedir}/libnl-tiny "
30
31S = "${WORKDIR}/git/tools"
32
33SRC_URI += "file://*.patch;apply=no"
34
developer9ac79da2022-10-31 14:57:29 +080035do_mtk_patches() {
36 cd ${S}/../
developerddae1502022-11-16 18:00:20 +080037 DISTRO_FlowBlock_ENABLED="${@bb.utils.contains('DISTRO_FEATURES','flow_offload','true','false',d)}"
38
developer9ac79da2022-10-31 14:57:29 +080039 if [ ! -e mtk_wifi_patch_applied ]; then
developerddae1502022-11-16 18:00:20 +080040 for i in ${WORKDIR}/*.patch
41 do
42 if [ $DISTRO_FlowBlock_ENABLED = 'true' ]; then
43 patch -p1 < $i;
44 else
45 prefix=$(echo -n "${WORKDIR}"|wc -c)
46 patch_number_start=$(expr $prefix + 2)
47 patch_number_end=$(expr $patch_number_start + 3 )
48 patch_number=$(echo "$i" | cut -c"$patch_number_start"-"$patch_number_end")
49
50 if [ "$patch_number" -ge "3000" ]; then
51 continue;
52 else
53 patch -p1 < $i;
54 fi
55 fi
56 done
developer9ac79da2022-10-31 14:57:29 +080057 fi
58 touch mtk_wifi_patch_applied
59}
60addtask mtk_patches after do_patch before do_configure
61
62
63
64
65
66