Merge "[rdkb][common][release][Update release note for Filogic 880/860 MLO Beta release]"
diff --git a/recipes-extended/tdkb/tdk-b.bbappend b/recipes-extended/tdkb/tdk-b.bbappend
index 4276ef4..cd2a9b1 100644
--- a/recipes-extended/tdkb/tdk-b.bbappend
+++ b/recipes-extended/tdkb/tdk-b.bbappend
@@ -1,12 +1,13 @@
 EXTRA_OECONF_append = " --enable-ert --enable-platform"
 
-SRC_URI_append = " \
-   ${CMF_GIT_ROOT}/rdkb/devices/raspberrypi/tdkb;protocol=${CMF_GIT_PROTOCOL};branch=${CMF_GIT_BRANCH};destsuffix=git/platform/raspberrypi;name=tdkbraspberrypi \
-"
-SRCREV_tdkbraspberrypi = "${AUTOREV}"
-do_fetch[vardeps] += "SRCREV_tdkbraspberrypi"
-SRCREV_FORMAT = "tdk_tdkbraspberrypi"
+SRC_URI_append= " \
+    ${@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', \
+    '${CMF_GIT_ROOT}/rdkb/devices/raspberrypi/tdkb;protocol=${CMF_GIT_PROTOCOL};branch=${CMF_GIT_BRANCH};destsuffix=git/platform/raspberrypi;name=tdkbraspberrypi',d)}"
 
+SRCREV_tdkturris = "${AUTOREV}"
+SRCREV_tdkbraspberrypi = "${AUTOREV}"
+do_fetch[vardeps] += "${@bb.utils.contains('DISTRO_FEATURES','2022q3_support','SRCREV_tdkbturris','SRCREV_tdkbraspberrypi',d)}"
+SRCREV_FORMAT = "${@bb.utils.contains('DISTRO_FEATURES','2022q3_support','tdk_tdkbturris','tdk_tdkbraspberrypi',d)}"
 
 FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
 
@@ -38,8 +39,13 @@
 do_install_append () {
     install -d ${D}${tdkdir}
     install -d ${D}/etc
-    install -p -m 755 ${S}/platform/raspberrypi/agent/scripts/*.sh ${D}${tdkdir}
-    install -p -m 755 ${S}/platform/raspberrypi/agent/scripts/tdk_platform.properties ${D}/etc/
+    if ${@bb.utils.contains( 'DISTRO_FEATURES', '2022q3_support', 'true', 'false', d)}; then
+        install -p -m 755 ${S}/platform/turris/agent/scripts/*.sh ${D}${tdkdir}
+        install -p -m 755 ${S}/platform/turris/agent/scripts/tdk_platform.properties ${D}/etc/
+    else
+        install -p -m 755 ${S}/platform/raspberrypi/agent/scripts/*.sh ${D}${tdkdir}
+        install -p -m 755 ${S}/platform/raspberrypi/agent/scripts/tdk_platform.properties ${D}/etc/
+    fi
     install -p -m 755 ${S}/Set_properties.sh ${D}${tdkdir}
     install -p -m 755 ${S}/Set_properties_logan.sh ${D}${tdkdir}
 }