developer | 15a4331 | 2022-04-12 11:23:23 +0800 | [diff] [blame] | 1 | EXTRA_OECONF_append = " --enable-ert --enable-platform" |
| 2 | |
developer | 9481024 | 2024-08-26 11:20:58 +0800 | [diff] [blame] | 3 | SRC_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)}" |
developer | 15a4331 | 2022-04-12 11:23:23 +0800 | [diff] [blame] | 6 | |
developer | 9481024 | 2024-08-26 11:20:58 +0800 | [diff] [blame] | 7 | SRCREV_tdkturris = "${AUTOREV}" |
| 8 | SRCREV_tdkbraspberrypi = "${AUTOREV}" |
| 9 | do_fetch[vardeps] += "${@bb.utils.contains('DISTRO_FEATURES','2022q3_support','SRCREV_tdkbturris','SRCREV_tdkbraspberrypi',d)}" |
| 10 | SRCREV_FORMAT = "${@bb.utils.contains('DISTRO_FEATURES','2022q3_support','tdk_tdkbturris','tdk_tdkbraspberrypi',d)}" |
developer | 15a4331 | 2022-04-12 11:23:23 +0800 | [diff] [blame] | 11 | |
developer | 84bc359 | 2022-10-31 15:53:09 +0800 | [diff] [blame] | 12 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" |
developer | fb68818 | 2022-06-08 14:48:19 +0800 | [diff] [blame] | 13 | |
developer | 783a8a6 | 2024-01-17 12:34:31 +0800 | [diff] [blame] | 14 | SRC_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 \ |
developer | 84bc359 | 2022-10-31 15:53:09 +0800 | [diff] [blame] | 20 | file://Set_properties.sh;subdir=git \ |
developer | 50e7466 | 2023-05-16 20:28:32 +0800 | [diff] [blame] | 21 | file://Set_properties_logan.sh;subdir=git \ |
developer | 84bc359 | 2022-10-31 15:53:09 +0800 | [diff] [blame] | 22 | " |
developer | fb68818 | 2022-06-08 14:48:19 +0800 | [diff] [blame] | 23 | |
| 24 | do_mtk_patches() { |
| 25 | cd ${S} |
| 26 | if [ ! -e mtk_wifi_patch_applied ]; then |
developer | 50e7466 | 2023-05-16 20:28:32 +0800 | [diff] [blame] | 27 | 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 |
developer | fb68818 | 2022-06-08 14:48:19 +0800 | [diff] [blame] | 34 | fi |
| 35 | touch mtk_wifi_patch_applied |
| 36 | } |
| 37 | addtask mtk_patches after do_unpack before do_compile |
| 38 | |
developer | 15a4331 | 2022-04-12 11:23:23 +0800 | [diff] [blame] | 39 | do_install_append () { |
| 40 | install -d ${D}${tdkdir} |
| 41 | install -d ${D}/etc |
developer | 9481024 | 2024-08-26 11:20:58 +0800 | [diff] [blame] | 42 | 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 |
developer | 84bc359 | 2022-10-31 15:53:09 +0800 | [diff] [blame] | 49 | install -p -m 755 ${S}/Set_properties.sh ${D}${tdkdir} |
developer | 50e7466 | 2023-05-16 20:28:32 +0800 | [diff] [blame] | 50 | install -p -m 755 ${S}/Set_properties_logan.sh ${D}${tdkdir} |
developer | 15a4331 | 2022-04-12 11:23:23 +0800 | [diff] [blame] | 51 | } |
| 52 | |
| 53 | FILES_${PN} += "${prefix}/ccsp/" |
| 54 | FILES_${PN} += "/etc/*" |
| 55 | FILES_${PN} += "${tdkdir}/*" |
| 56 | |
developer | 2ba4ebd | 2023-01-10 10:00:34 +0800 | [diff] [blame] | 57 | CXXFLAGS_append = " -DWIFI_HAL_VERSION_3 " |
| 58 | |