blob: cd2a9b10b34f0613c34c020fcf060641532b809a [file] [log] [blame]
developer15a43312022-04-12 11:23:23 +08001EXTRA_OECONF_append = " --enable-ert --enable-platform"
2
developer94810242024-08-26 11:20:58 +08003SRC_URI_append= " \
4 ${@bb.utils.contains('DISTRO_FEATURES','2022q3_support','${CMF_GIT_ROOT}/rdkb/devices/turris/tdkb;protocol=${CMF_GIT_PROTOCOL};branch=${CMF_GIT_BRANCH};destsuffix=git/platform/turris;name=tdkbturris', \
5 '${CMF_GIT_ROOT}/rdkb/devices/raspberrypi/tdkb;protocol=${CMF_GIT_PROTOCOL};branch=${CMF_GIT_BRANCH};destsuffix=git/platform/raspberrypi;name=tdkbraspberrypi',d)}"
developer15a43312022-04-12 11:23:23 +08006
developer94810242024-08-26 11:20:58 +08007SRCREV_tdkturris = "${AUTOREV}"
8SRCREV_tdkbraspberrypi = "${AUTOREV}"
9do_fetch[vardeps] += "${@bb.utils.contains('DISTRO_FEATURES','2022q3_support','SRCREV_tdkbturris','SRCREV_tdkbraspberrypi',d)}"
10SRCREV_FORMAT = "${@bb.utils.contains('DISTRO_FEATURES','2022q3_support','tdk_tdkbturris','tdk_tdkbraspberrypi',d)}"
developer15a43312022-04-12 11:23:23 +080011
developer84bc3592022-10-31 15:53:09 +080012FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
developerfb688182022-06-08 14:48:19 +080013
developer783a8a62024-01-17 12:34:31 +080014SRC_URI += " \
15 file://0001-Fix-GetApAssociatedDeviceRxStatsResult-and-GetApAsso.patch;apply=no \
16 file://0002-Add-tdk-utility-functions.patch;apply=no \
17 file://0003-Add-Set-property-script.patch;apply=no \
18 file://0004-Add-start-sequence-after-uci.patch;apply=no \
19 file://0005-Fix-wifi_getApAssociatedDeviceTidStatsResult-print-a.patch;apply=no \
developer84bc3592022-10-31 15:53:09 +080020 file://Set_properties.sh;subdir=git \
developer50e74662023-05-16 20:28:32 +080021 file://Set_properties_logan.sh;subdir=git \
developer84bc3592022-10-31 15:53:09 +080022"
developerfb688182022-06-08 14:48:19 +080023
24do_mtk_patches() {
25 cd ${S}
26 if [ ! -e mtk_wifi_patch_applied ]; then
developer50e74662023-05-16 20:28:32 +080027 patch -p1 < ${WORKDIR}/0001-Fix-GetApAssociatedDeviceRxStatsResult-and-GetApAsso.patch
28 patch -p1 < ${WORKDIR}/0002-Add-tdk-utility-functions.patch
29 patch -p1 < ${WORKDIR}/0003-Add-Set-property-script.patch
30 if ${@bb.utils.contains( 'DISTRO_FEATURES', 'logan', 'false', 'true', d)}; then
31 patch -p1 < ${WORKDIR}/0004-Add-start-sequence-after-uci.patch
32 fi
33 patch -p1 < ${WORKDIR}/0005-Fix-wifi_getApAssociatedDeviceTidStatsResult-print-a.patch
developerfb688182022-06-08 14:48:19 +080034 fi
35 touch mtk_wifi_patch_applied
36}
37addtask mtk_patches after do_unpack before do_compile
38
developer15a43312022-04-12 11:23:23 +080039do_install_append () {
40 install -d ${D}${tdkdir}
41 install -d ${D}/etc
developer94810242024-08-26 11:20:58 +080042 if ${@bb.utils.contains( 'DISTRO_FEATURES', '2022q3_support', 'true', 'false', d)}; then
43 install -p -m 755 ${S}/platform/turris/agent/scripts/*.sh ${D}${tdkdir}
44 install -p -m 755 ${S}/platform/turris/agent/scripts/tdk_platform.properties ${D}/etc/
45 else
46 install -p -m 755 ${S}/platform/raspberrypi/agent/scripts/*.sh ${D}${tdkdir}
47 install -p -m 755 ${S}/platform/raspberrypi/agent/scripts/tdk_platform.properties ${D}/etc/
48 fi
developer84bc3592022-10-31 15:53:09 +080049 install -p -m 755 ${S}/Set_properties.sh ${D}${tdkdir}
developer50e74662023-05-16 20:28:32 +080050 install -p -m 755 ${S}/Set_properties_logan.sh ${D}${tdkdir}
developer15a43312022-04-12 11:23:23 +080051}
52
53FILES_${PN} += "${prefix}/ccsp/"
54FILES_${PN} += "/etc/*"
55FILES_${PN} += "${tdkdir}/*"
56
developer2ba4ebd2023-01-10 10:00:34 +080057CXXFLAGS_append = " -DWIFI_HAL_VERSION_3 "
58