[rdkb][common][bsp][Refactor BB files for kirkstone build pass]

[Description]
Refactor BB files for kirkstone build pass

[Release-log]

Change-Id: I35215ebae97282ea7c3439abe5a76d90e4322bf7
diff --git a/conf/distro/include/rdk-filogic.inc b/conf/distro/include/rdk-filogic.inc
index 5dc8039..2757e79 100644
--- a/conf/distro/include/rdk-filogic.inc
+++ b/conf/distro/include/rdk-filogic.inc
@@ -19,11 +19,21 @@
 # RDKB-44824: CoreNetLib move bb file location
 DISTRO_FEATURES_append = " core-net-lib"
 
+# RDKB-48800: Install DHCP Manager service file
+DISTRO_FEATURES_append_broadband = " dhcp_manager"
+
+# Fix MeshAgent build errors
+DISTRO_FEATURES_append_broadband = " WanFailOverSupportEnable"
+
+DISTRO_FEATURES_append_kirkstone = " kirkstone"
+DISTRO_FEATURES_NATIVE_append_kirkstone = " kirkstone"
+
 DISTRO_FEATURES_append = " meshwifi"
 DISTRO_FEATURES_append = " ipv6"
 DISTRO_FEATURES_append = " rdkb_wan_manager"
 DISTRO_FEATURES_append = " filogic"
-WHITELIST_GPL-3.0 += " binutils libbfd"
 #DISTRO_FEATURES_append = " easymesh-controller"
 #DISTRO_FEATURES_append = " emmc"
 #DISTRO_FEATURES_append = " samba"
+HOSTTOOLS += " python"
+
diff --git a/conf/distro/include/whitelist_dunfell.inc b/conf/distro/include/whitelist_dunfell.inc
new file mode 100644
index 0000000..1bc4989
--- /dev/null
+++ b/conf/distro/include/whitelist_dunfell.inc
@@ -0,0 +1 @@
+WHITELIST_GPL-3.0 += " binutils libbfd"
\ No newline at end of file
diff --git a/conf/distro/include/whitelist_kirkstone.inc b/conf/distro/include/whitelist_kirkstone.inc
new file mode 100644
index 0000000..e992dda
--- /dev/null
+++ b/conf/distro/include/whitelist_kirkstone.inc
@@ -0,0 +1 @@
+INCOMPATIBLE_LICENSE_EXCEPTIONS += "binutils:GPL-3.0-only libbfd:GPL-3.0-only libopcodes:GPL-3.0-only"
\ No newline at end of file
diff --git a/conf/include/filogic-bbmasks.inc b/conf/include/filogic-bbmasks.inc
index 62ac076..9da6835 100644
--- a/conf/include/filogic-bbmasks.inc
+++ b/conf/include/filogic-bbmasks.inc
@@ -8,6 +8,8 @@
 
 BBMASK .= "|meta-rdk-ext/recipes-common/rtmessage"
 BBMASK .= "|meta-rdk-ext/recipes-kernel/linux/linux-libc-headers_%.bbappend"
+BBMASK .= "|meta-rdk-ext/recipes-kernel/linux/linux-libc-headers_3.14.bb"
+
 BBMASK .= "|meta-rdk-ext/recipes-connectivity/wpa-supplicant/wpa-supplicant_%.bbappend"
 
 BBMASK .= "|meta-browser/*"
@@ -20,5 +22,7 @@
 #To avoid build warning
 BBMASK .= "|meta-rdk-ext/recipes-support/iksemel/iksemel_1.5.bb"
 BBMASK .= "|meta-cmf-broadband/recipes-core/util-linux/"
-BBMASK_append_dunfell .= "|meta-cmf/recipes-extended/smartmon/"
-BBMASK_append_dunfell .= "|meta-rdk/recipes-common/rtremote/"
\ No newline at end of file
+BBMASK_append .= "|meta-cmf/recipes-extended/smartmon/"
+BBMASK_append .= "|meta-rdk/recipes-common/rtremote/"
+BBMASK_append_dunfell .= "|meta-filogic/recipes-kernel/linux-libc-headers/"
+BBMASK_append_dunfell .= "|meta-filogic/recipes-wifi/lua/"
\ No newline at end of file
diff --git a/conf/layer.conf b/conf/layer.conf
index 4b88da4..ac9be94 100644
--- a/conf/layer.conf
+++ b/conf/layer.conf
@@ -9,7 +9,7 @@
 BBFILE_PATTERN_cmf-filogic = "^${LAYERDIR}/"
 BBFILE_PRIORITY_cmf-filogic = "24"
 
-LAYERSERIES_COMPAT_cmf-filogic = "dunfell"
+LAYERSERIES_COMPAT_cmf-filogic = "dunfell kirkstone"
 
 require conf/distro/include/rdk-filogic.inc
 #require conf/include/rdk-external-src-platform.inc
diff --git a/conf/machine/filogic830.conf b/conf/machine/filogic830.conf
index 8f6685b..c80ace6 100644
--- a/conf/machine/filogic830.conf
+++ b/conf/machine/filogic830.conf
@@ -30,7 +30,7 @@
 PREFERRED_VERSION_wpa-supplicant = "2.10"
 PREFERRED_VERSION_linux-mac80211 = "5.15.%"
 PREFERRED_VERSION_linux-mt76 = "2.%"
-
+PREFERRED_VERSION_lua = "5.3.%"
 #masking files for dunfell build
 require conf/include/filogic-bbmasks.inc
 #require conf/include/rdk-external-src-platform.inc
@@ -50,7 +50,6 @@
 BBMASK .= "|meta-filogic-logan/recipes-wifi/"
 #for sdk support
 INHERIT_append = " uninative"
-BB_SETSCENE_ENFORCE_WHITELIST_append = " %:* *:do_fetch *"
 
 BOOT_SUFFIX = "bin"
 MACHINE_FEATURES = "ext2 ipsec nfs pci smbfs usbgadget usbhost vfat"
diff --git a/conf/machine/filogic880.conf b/conf/machine/filogic880.conf
index 39f4a77..bcd9440 100644
--- a/conf/machine/filogic880.conf
+++ b/conf/machine/filogic880.conf
@@ -25,6 +25,7 @@
 
 PREFERRED_PROVIDER_hal-wifi = "hal-wifi-mt76"
 PREFERRED_VERSION_iw_filogic = "5.%"
+PREFERRED_VERSION_lua = "5.3.%"
 #wifi bsp from openwrt
 #PREFERRED_VERSION_hostapd = "2.11"
 #PREFERRED_VERSION_wpa-supplicant = "2.11"
@@ -56,7 +57,6 @@
 BBMASK .= "|meta-filogic-logan/recipes-wifi/"
 #for sdk support
 INHERIT_append = " uninative"
-BB_SETSCENE_ENFORCE_WHITELIST_append = " %:* *:do_fetch *"
 
 BOOT_SUFFIX = "bin"
 MACHINE_FEATURES = "ext2 ipsec nfs pci smbfs usbgadget usbhost vfat"
diff --git a/recipes-ccsp/ccsp/ccsp-common-library.bbappend b/recipes-ccsp/ccsp/ccsp-common-library.bbappend
index 8e67586..801ad2a 100644
--- a/recipes-ccsp/ccsp/ccsp-common-library.bbappend
+++ b/recipes-ccsp/ccsp/ccsp-common-library.bbappend
@@ -19,12 +19,12 @@
     file://utopia.service \
 "
 
-SRC_URI_remove_dunfell = "file://0001-DBusLoop-SSL_state-TLS_ST_OK.patch"
+SRC_URI_remove = "file://0001-DBusLoop-SSL_state-TLS_ST_OK.patch"
 
 SRC_URI += "file://0003-add-dependency-to-pandm.patch;apply=no"
 SRC_URI += "file://0004-fix-out-of-array-access.patch;apply=no"
 
-SRC_URI_append_dunfell = " file://0001-DBusLoop-SSL_state-TLS_ST_OK.patch;apply=no"
+SRC_URI_append = " file://0001-DBusLoop-SSL_state-TLS_ST_OK.patch;apply=no"
 
 
 # we need to patch to code for Filogic
@@ -34,11 +34,9 @@
         bbnote "Patching 0003-add-dependency-to-pandm.patch"
         patch -p1 < ${WORKDIR}/0003-add-dependency-to-pandm.patch
         patch -p1 < ${WORKDIR}/0004-fix-out-of-array-access.patch
-        if [ "${@bb.utils.contains('DISTRO_CODENAME', 'dunfell', 'dunfell', '', d)}" = "dunfell" ] ; then
-            bbnote "Patching 0001-DBusLoop-SSL_state-TLS_ST_OK.patch"
-            patch -p1 < ${WORKDIR}/0001-DBusLoop-SSL_state-TLS_ST_OK.patch
+        bbnote "Patching 0001-DBusLoop-SSL_state-TLS_ST_OK.patch"
+        patch -p1 < ${WORKDIR}/0001-DBusLoop-SSL_state-TLS_ST_OK.patch
 
-        fi
        touch patch_applied
     fi
 }
diff --git a/recipes-ccsp/ccsp/ccsp-dhcp-mgr.bbappend b/recipes-ccsp/ccsp/ccsp-dhcp-mgr.bbappend
index 890cb5b..1bdf76b 100644
--- a/recipes-ccsp/ccsp/ccsp-dhcp-mgr.bbappend
+++ b/recipes-ccsp/ccsp/ccsp-dhcp-mgr.bbappend
@@ -1,3 +1,4 @@
 require ccsp_common_filogic.inc
 
-EXTRA_OECONF_append  = " --with-ccsp-arch=arm"
\ No newline at end of file
+EXTRA_OECONF_append_dunfell  = " --with-ccsp-arch=arm"
+CFLAGS_append_kirkstone = " -fcommon "
\ No newline at end of file
diff --git a/recipes-ccsp/ccsp/ccsp-dmcli.bbappend b/recipes-ccsp/ccsp/ccsp-dmcli.bbappend
index b50d7f0..f88a620 100644
--- a/recipes-ccsp/ccsp/ccsp-dmcli.bbappend
+++ b/recipes-ccsp/ccsp/ccsp-dmcli.bbappend
@@ -2,6 +2,6 @@
 
 LDFLAGS_append_dunfell = " -lsafec-3.5.1"
 
-do_install_append_filogic () {
+do_install_append () {
     ln -sf ${bindir}/dmcli ${D}${bindir}/ccsp_bus_client_tool
 }
diff --git a/recipes-ccsp/ccsp/ccsp-eth-agent.bbappend b/recipes-ccsp/ccsp/ccsp-eth-agent.bbappend
index 38e81c4..a7ec1c0 100644
--- a/recipes-ccsp/ccsp/ccsp-eth-agent.bbappend
+++ b/recipes-ccsp/ccsp/ccsp-eth-agent.bbappend
@@ -2,7 +2,7 @@
 
 CFLAGS_aarch64_append = " -Werror=format-truncation=1 "
 
-EXTRA_OECONF_append  = " --with-ccsp-arch=arm"
+EXTRA_OECONF_append_dunfell  = " --with-ccsp-arch=arm"
 
 LDFLAGS_append =" \
     -lsyscfg \
diff --git a/recipes-ccsp/ccsp/ccsp-lm-lite.bbappend b/recipes-ccsp/ccsp/ccsp-lm-lite.bbappend
index 8b0b5aa..a046d30 100644
--- a/recipes-ccsp/ccsp/ccsp-lm-lite.bbappend
+++ b/recipes-ccsp/ccsp/ccsp-lm-lite.bbappend
@@ -1,6 +1,6 @@
 require ccsp_common_filogic.inc
 
-EXTRA_OECONF_append  = " --with-ccsp-arch=arm"
+EXTRA_OECONF_append_dunfell  = " --with-ccsp-arch=arm"
 
 LDFLAGS_append = " -Wl,--no-as-needed"
 
diff --git a/recipes-ccsp/ccsp/ccsp-misc.bbappend b/recipes-ccsp/ccsp/ccsp-misc.bbappend
index 495a2fb..2a5bf7d 100644
--- a/recipes-ccsp/ccsp/ccsp-misc.bbappend
+++ b/recipes-ccsp/ccsp/ccsp-misc.bbappend
@@ -4,6 +4,6 @@
 
 LDFLAGS_append_dunfell = " -lsafec-3.5.1"
 
-EXTRA_OECONF_append  = " --with-ccsp-arch=arm"
+EXTRA_OECONF_append_dunfell  = " --with-ccsp-arch=arm"
 
 CFLAGS += " -DDHCPV4_CLIENT_UDHCPC -DDHCPV6_CLIENT_DIBBLER "
diff --git a/recipes-ccsp/ccsp/ccsp-p-and-m.bbappend b/recipes-ccsp/ccsp/ccsp-p-and-m.bbappend
index ab80eea..666fad5 100644
--- a/recipes-ccsp/ccsp/ccsp-p-and-m.bbappend
+++ b/recipes-ccsp/ccsp/ccsp-p-and-m.bbappend
@@ -21,7 +21,7 @@
 
 CFLAGS_remove = "-Werror"
 
-EXTRA_OECONF_append  = " --with-ccsp-arch=arm"
+EXTRA_OECONF_append_dunfell  = " --with-ccsp-arch=arm"
 
 do_configure_prepend () {
    #for WanManager support
@@ -130,6 +130,7 @@
 FILES_${PN}-ccsp += " \
     ${prefix}/ccsp/pam/CcspPandMSsp \
     /fss/gw/usr/sbin/ip \
+    ${prefix}/ccsp/pam/TR181-USGv2.XML \
 "
 
 RDEPENDS_${PN}-ccsp_append_dunfell = " bash"
diff --git a/recipes-ccsp/ccsp/ccsp-wifi-agent.bbappend b/recipes-ccsp/ccsp/ccsp-wifi-agent.bbappend
index bd9d7b0..633bdc7 100644
--- a/recipes-ccsp/ccsp/ccsp-wifi-agent.bbappend
+++ b/recipes-ccsp/ccsp/ccsp-wifi-agent.bbappend
@@ -19,7 +19,8 @@
     file://checkwifi.sh \
     file://radio_param_def.cfg \
     file://synclease.sh \
-    file://*.patch;apply=no \
+    file://handle_mesh-rename-opensync.patch;apply=no \
+    file://avoid_gssidcount_error.patch;apply=no \
 "
 
 # we need to patch to code for ccsp-wifi-agent
@@ -34,7 +35,7 @@
 }
 addtask ccspwifiagent_patches after do_unpack before do_configure
 
-EXTRA_OECONF_append  = " --with-ccsp-arch=arm"
+EXTRA_OECONF_append_dunfell  = " --with-ccsp-arch=arm"
 
 do_install_append(){
     install -m 777 ${D}/usr/bin/CcspWifiSsp -t ${D}/usr/ccsp/wifi/
@@ -52,6 +53,7 @@
     ${prefix}/ccsp/wifi/checkwifi.sh \
     ${prefix}/ccsp/wifi/radio_param_def.cfg \
     ${prefix}/ccsp/wifi/synclease.sh \
+    ${prefix}/bin/wifi_events_consumer \
 "
 
 LDFLAGS_append_dunfell = " -lpthread"
diff --git a/recipes-ccsp/ccsp/ccsp-xdns.bbappend b/recipes-ccsp/ccsp/ccsp-xdns.bbappend
index 78fbef3..60c1ea7 100644
--- a/recipes-ccsp/ccsp/ccsp-xdns.bbappend
+++ b/recipes-ccsp/ccsp/ccsp-xdns.bbappend
@@ -1,5 +1,5 @@
 require ccsp_common_filogic.inc
 
-EXTRA_OECONF_append  = " --with-ccsp-arch=arm"
+EXTRA_OECONF_append_dunfell  = " --with-ccsp-arch=arm"
 
 LDFLAGS_append_dunfell = " -lsafec-3.5.1"
diff --git a/recipes-ccsp/ccsp/rdk-easymesh-controller.bbappend b/recipes-ccsp/ccsp/rdk-easymesh-controller.bbappend
index c2ef352..36893f8 100644
--- a/recipes-ccsp/ccsp/rdk-easymesh-controller.bbappend
+++ b/recipes-ccsp/ccsp/rdk-easymesh-controller.bbappend
@@ -1,7 +1,8 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
 SRC_URI_append = " \
-    file://*.patch;apply=no \
+    file://001-fix-64bit-build-error.patch;apply=no \
+    file://002-change-scan-interface-name-prefix.patch;apply=no \
 "
 
 do_filogic_patches() {
diff --git a/recipes-ccsp/ccsp/rdk-fwupgrade-manager.bbappend b/recipes-ccsp/ccsp/rdk-fwupgrade-manager.bbappend
new file mode 100644
index 0000000..7da90db
--- /dev/null
+++ b/recipes-ccsp/ccsp/rdk-fwupgrade-manager.bbappend
@@ -0,0 +1,6 @@
+CFLAGS_remove = "${@bb.utils.contains('DISTRO_FEATURES','rdkb_wan_manager','',bb.utils.contains('DISTRO_FEATURES', 'fwupgrade_manager', '-DFEATURE_FWUPGRADE_MANAGER', '', d),d)}"
+EXTRA_OECONF_remove_kirkstone = " --with-ccsp-platform=bcm --with-ccsp-arch=arm "
+
+#for kirkstone safec library changed to safeclib
+CFLAGS_append_kirkstone = " ${@bb.utils.contains('DISTRO_FEATURES', 'safec', ' -fPIC -I${STAGING_INCDIR}/safeclib', '-fPIC', d)}"
+
diff --git a/recipes-ccsp/ccsp/rdk-vlanmanager.bbappend b/recipes-ccsp/ccsp/rdk-vlanmanager.bbappend
new file mode 100644
index 0000000..d62f8dc
--- /dev/null
+++ b/recipes-ccsp/ccsp/rdk-vlanmanager.bbappend
@@ -0,0 +1,2 @@
+LDFLAGS_aarch64 += " -lutctx -lprivilege "
+EXTRA_OECONF_remove_kirkstone  = " --with-ccsp-platform=bcm --with-ccsp-arch=arm "
diff --git a/recipes-ccsp/util/test-and-diagnostic.bbappend b/recipes-ccsp/util/test-and-diagnostic.bbappend
index 9b3ec6f..cb4128a 100644
--- a/recipes-ccsp/util/test-and-diagnostic.bbappend
+++ b/recipes-ccsp/util/test-and-diagnostic.bbappend
@@ -3,6 +3,13 @@
 do_install_append () {
     # Test and Diagonastics XML 
        install -m 644 ${S}/config/TestAndDiagnostic_arm.XML ${D}/usr/ccsp/tad/TestAndDiagnostic.XML
+       install -m 644 ${S}/scripts/selfheal_reset_counts.sh ${D}/usr/ccsp/tad/selfheal_reset_counts.sh
+       install -m 0755 ${S}/scripts/selfheal_aggressive.sh ${D}/usr/ccsp/tad
 }
 
-EXTRA_OECONF_append  = " --with-ccsp-arch=arm"
+EXTRA_OECONF_append_dunfell  = " --with-ccsp-arch=arm"
+
+FILES_${PN}-ccsp += " \
+                    ${prefix}/ccsp/tad/* \
+                    /fss/gw/usr/ccsp/tad/* \
+                    "
\ No newline at end of file
diff --git a/recipes-ccsp/util/utopia.bbappend b/recipes-ccsp/util/utopia.bbappend
index 3f011eb..70da4c4 100644
--- a/recipes-ccsp/util/utopia.bbappend
+++ b/recipes-ccsp/util/utopia.bbappend
@@ -4,7 +4,7 @@
 
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
-EXTRA_OECONF_append  = " --with-ccsp-arch=arm"
+EXTRA_OECONF_append_dunfell  = " --with-ccsp-arch=arm"
 EXTRA_OECONF_remove  = "--with-ccsp-platform=bcm"
 
 SRC_URI_append = " \
@@ -14,7 +14,7 @@
     file://0004-enable-sshd-by-default-at-bootup.patch;apply=no \
     file://service_bridge_mtk.sh \
 "
-SRC_URI_append_dunfell = "file://0001-Work-around-for-brlan0-issue.patch;apply=no"
+SRC_URI_append = "file://0001-Work-around-for-brlan0-issue.patch;apply=no"
 
 SRC_URI += "file://posix-gwprovapp.patch;apply=no"
 #This patch will add dummy swctl api which is originally given by brcm for XB3.
@@ -52,7 +52,7 @@
     fi
 }
 
-do_filogic_patches-append_dunfell() {
+do_filogic_patches-append() {
     cd ${S}
     if [ ! -e dunfell_filogic_patch_applied ]; then
 	patch -p1 < ${WORKDIR}/0001-Work-around-for-brlan0-issue.patch
diff --git a/recipes-connectivity/ppp/ppp_2.4.8.bbappend b/recipes-connectivity/ppp/ppp_2.4.8.bbappend
index 23826c4..26526db 100644
--- a/recipes-connectivity/ppp/ppp_2.4.8.bbappend
+++ b/recipes-connectivity/ppp/ppp_2.4.8.bbappend
@@ -1,6 +1,6 @@
 DEPENDS_remove = "virtual/crypt"
 DEPENDS_append = " nanomsg"
-DEPENDS_append_broadband_dunfell = " libxcrypt"
+DEPENDS_append_broadband = " libxcrypt"
 
 SRC_URI_remove = "${@bb.utils.contains('DISTRO_FEATURES', 'rdkb_xdsl_ppp_manager', ' ', 'file://ipc-event.patch', d)}"
 SRC_URI_remove = "${@bb.utils.contains('DISTRO_FEATURES', 'rdkb_xdsl_ppp_manager', ' ', 'file://ppp-remote-local-samelinklocaladdresses-fix.patch', d)}"
diff --git a/recipes-core/busybox/busybox_%.bbappend b/recipes-core/busybox/busybox_%.bbappend
index 2498e52..8469fe2 100644
--- a/recipes-core/busybox/busybox_%.bbappend
+++ b/recipes-core/busybox/busybox_%.bbappend
@@ -5,9 +5,9 @@
             file://rdkb.cfg \
            "
 
-do_install_append_dunfell() {
+do_install_append() {
 	rm ${D}${sysconfdir}/syslog.conf
 }
 
-FILES_${PN}-syslog_remove_dunfell = "${sysconfdir}/syslog.conf"
+FILES_${PN}-syslog_remove = "${sysconfdir}/syslog.conf"
 
diff --git a/recipes-core/glibc/glibc_2.31.bbappend b/recipes-core/glibc/glibc_2.31.bbappend
index 242f47a..325d112 100644
--- a/recipes-core/glibc/glibc_2.31.bbappend
+++ b/recipes-core/glibc/glibc_2.31.bbappend
@@ -1,7 +1,7 @@
 EXTRA_OECONF += " --enable-obsolete-rpc" 
 
 #avoiding the conflicts with libnsl2
-do_install_append_dunfell() {
+do_install_append() {
 rm -rf ${D}/usr/include/rpcsvc
 }
 
diff --git a/recipes-core/images/rdk-generic-broadband-image.bbappend b/recipes-core/images/rdk-generic-broadband-image.bbappend
index cbc3060..74c7ba3 100644
--- a/recipes-core/images/rdk-generic-broadband-image.bbappend
+++ b/recipes-core/images/rdk-generic-broadband-image.bbappend
@@ -29,8 +29,8 @@
     coreutils \
     util-linux-readprofile \    
     iputils \ 
-    bc \ 
-    python-core \
+    bc \
+    ${@bb.utils.contains('DISTRO_FEATURES','kirkstone','','python-core',d)} \ 
     dosfstools \
     pptp-linux \
     rp-pppoe  \  
diff --git a/recipes-core/images/rdk-generic-broadband-tdk-image.bbappend b/recipes-core/images/rdk-generic-broadband-tdk-image.bbappend
index 8275d1f..74ec553 100644
--- a/recipes-core/images/rdk-generic-broadband-tdk-image.bbappend
+++ b/recipes-core/images/rdk-generic-broadband-tdk-image.bbappend
@@ -28,7 +28,7 @@
     util-linux-readprofile \    
     iputils \ 
     bc \ 
-    python-core \
+    ${@bb.utils.contains('DISTRO_FEATURES','kirkstone','','python-core',d)} \
     pptp-linux \
     rp-pppoe  \
     procps \
diff --git a/recipes-core/packagegroups/packagegroup-filogic-mt76.bb b/recipes-core/packagegroups/packagegroup-filogic-mt76.bb
index 4d86c2b..2c96561 100644
--- a/recipes-core/packagegroups/packagegroup-filogic-mt76.bb
+++ b/recipes-core/packagegroups/packagegroup-filogic-mt76.bb
@@ -4,7 +4,6 @@
 
 inherit packagegroup
 
-DEPENDS = "libnl"
 
 PACKAGES = " \
 	  packagegroup-filogic-mt76 \
diff --git a/recipes-core/systemd/systemd_244.%.bbappend b/recipes-core/systemd/systemd_244.%.bbappend
index 04f64b4..edec69b 100644
--- a/recipes-core/systemd/systemd_244.%.bbappend
+++ b/recipes-core/systemd/systemd_244.%.bbappend
@@ -1,5 +1,5 @@
 #set the watch dog timer
-do_install_append_dunfell () {
+do_install_append () {
 sed -i "/RuntimeWatchdogSec/c\RuntimeWatchdogSec=120"  ${D}/${sysconfdir}/systemd/system.conf
 sed -i "/ShutdownWatchdogSec/c\ShutdownWatchdogSec=10min"   ${D}/${sysconfdir}/systemd/system.conf
 }
diff --git a/recipes-core/util-linux/util-linux_%.bbappend b/recipes-core/util-linux/util-linux_%.bbappend
index 2ed1ada..a78b7c2 100644
--- a/recipes-core/util-linux/util-linux_%.bbappend
+++ b/recipes-core/util-linux/util-linux_%.bbappend
@@ -1,5 +1,7 @@
 do_install_append_broadband() {
  rm -rf ${D}${base_sbindir}/hwclock
+ rm -rf ${D}${base_sbindir}/swapon
+ rm -rf ${D}${base_sbindir}/swapoff
  rm -rf ${D}${base_bindir}/more
  rm -rf ${D}${base_bindir}/kill
  rm -rf ${D}${base_bindir}/dmesg
@@ -73,8 +75,3 @@
  rm -rf ${D}${bindir}/uuidparse
  rm -rf ${D}${bindir}/wall
 }
-do_install_append_dunfell_broadband() {
- rm -rf ${D}${base_sbindir}/swapon
- rm -rf ${D}${base_sbindir}/swapoff
-}
-
diff --git a/recipes-devtools/python/python3-pycparser_2.20.bbappend b/recipes-devtools/python/python3-pycparser_2.20.bbappend
index 33f2d93..21c571b 100644
--- a/recipes-devtools/python/python3-pycparser_2.20.bbappend
+++ b/recipes-devtools/python/python3-pycparser_2.20.bbappend
@@ -1 +1 @@
-RDEPENDS_${PN}_class-target_remove_dunfell = " cpp cpp-symlinks"
+RDEPENDS_${PN}_class-target_remove = " cpp cpp-symlinks"
diff --git a/recipes-extended/lighttpd/lighttpd_%.bbappend b/recipes-extended/lighttpd/lighttpd_%.bbappend
index c450aa1..7b9425e 100644
--- a/recipes-extended/lighttpd/lighttpd_%.bbappend
+++ b/recipes-extended/lighttpd/lighttpd_%.bbappend
@@ -18,7 +18,7 @@
 
 FILES_${PN}_append_morty = " /usr/lib/mod_fastcgi.so"
 
-RDEPENDS_${PN}_append_dunfell = " \
+RDEPENDS_${PN}_append = " \
     lighttpd-module-fastcgi \
     lighttpd-module-proxy \
     " 
diff --git a/recipes-extended/tdkb/tdk-b.bbappend b/recipes-extended/tdkb/tdk-b.bbappend
index 7a03e09..92a4e87 100644
--- a/recipes-extended/tdkb/tdk-b.bbappend
+++ b/recipes-extended/tdkb/tdk-b.bbappend
@@ -8,7 +8,12 @@
 
 FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
 
-SRC_URI += "file://*.patch;apply=no \
+SRC_URI += " \
+    file://0001-Fix-GetApAssociatedDeviceRxStatsResult-and-GetApAsso.patch;apply=no \
+    file://0002-Add-tdk-utility-functions.patch;apply=no \
+    file://0003-Add-Set-property-script.patch;apply=no \
+    file://0004-Add-start-sequence-after-uci.patch;apply=no \
+    file://0005-Fix-wifi_getApAssociatedDeviceTidStatsResult-print-a.patch;apply=no \
     file://Set_properties.sh;subdir=git \
 	file://Set_properties_logan.sh;subdir=git \
 "
diff --git a/recipes-networking/openvswitch/openvswitch_git.bbappend b/recipes-networking/openvswitch/openvswitch_git.bbappend
index ccc2920..2a4abc8 100644
--- a/recipes-networking/openvswitch/openvswitch_git.bbappend
+++ b/recipes-networking/openvswitch/openvswitch_git.bbappend
@@ -1,6 +1,6 @@
-DEPENDS_remove_dunfell = "virtual/kernel bridge-utils"
-DEPENDS_append_class-target_dunfell = " virtual/kernel kernel-devsrc"
-DEPENDS_append_class-target_dunfell = " bridge-utils"
+DEPENDS_remove = "virtual/kernel bridge-utils"
+DEPENDS_append_class-target = " virtual/kernel kernel-devsrc"
+DEPENDS_append_class-target = " bridge-utils"
 EXTRA_OECONF += "--enable-ssl"
 
 EXTRA_OECONF_class-target_dunfell += "--with-linux=${STAGING_KERNEL_BUILDDIR} --with-linux-source=${STAGING_KERNEL_DIR} KARCH=${UBOOT_ARCH} PYTHON=python3 PYTHON3=python3 PERL=${bindir}/perl "
diff --git a/recipes-protocols/net-snmp/net-snmp_%.bbappend b/recipes-protocols/net-snmp/net-snmp_%.bbappend
new file mode 100644
index 0000000..160a037
--- /dev/null
+++ b/recipes-protocols/net-snmp/net-snmp_%.bbappend
@@ -0,0 +1,9 @@
+SRC_URI_remove = " \
+    file://CiscoXB3-2774.patch \
+"
+
+do_install_append_broadband() {
+	sed -i "s/ExecStart=\/usr\/sbin\/snmpd \$OPTIONS \-a \-f/#ExecStart=\/usr\/sbin\/snmpd \$OPTIONS \-a \-f/g" ${D}${systemd_unitdir}/system/snmpd.service
+        sed -i "/#ExecStart=\/usr\/sbin\/snmpd \$OPTIONS \-a \-f/a ExecStart=\/usr\/sbin\/snmpd \-f \-C \-c \/usr\/ccsp\/snmp\/snmpd.conf \-M \/usr\/share\/snmp\/mibs \-Le" ${D}${systemd_unitdir}/system/snmpd.service
+	sed -i "/ExecReload/a Restart=always" ${D}${systemd_unitdir}/system/snmpd.service 
+}
diff --git a/recipes-rdkb/sysint-broadband/sysint-broadband.bbappend b/recipes-rdkb/sysint-broadband/sysint-broadband.bbappend
index 001bfdb..35f2eb9 100644
--- a/recipes-rdkb/sysint-broadband/sysint-broadband.bbappend
+++ b/recipes-rdkb/sysint-broadband/sysint-broadband.bbappend
@@ -4,69 +4,118 @@
 SRCREV_sysintdevicerpi = "${AUTOREV}"
 SRCREV_FORMAT = "sysintgeneric_sysintdevicerpi"
 
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-SRCREV_FORMAT = "${AUTOREV}"
-
-SRC_URI_remove = "${CMF_GIT_ROOT}/rdkb/devices/intel-x86-pc/emulator/sysint;module=.;protocol=${CMF_GIT_PROTOCOL};branch=${CMF_GIT_BRANCH};destsuffix=git/device;name=sysintdevice"
-
-SRC_URI += "file://swupdate_utility.sh"
-SRC_URI += "file://swupdate.service"
-SRC_URI += "file://commonUtils.sh \
-            file://dcaSplunkUpload.sh \
-            file://dca_utility.sh \
-            file://interfaceCalls.sh \
-            file://DCMscript.sh \
-            file://logfiles.sh \
-            file://StartDCM.sh \
-            file://uploadSTBLogs.sh \
-            file://getaccountid.sh \
-            file://getpartnerid.sh \
-            file://utils.sh \
-            file://dcm-log.service"
-
-SYSTEMD_SERVICE_${PN} = "swupdate.service"
-SYSTEMD_SERVICE_${PN} = "dcm-log.service"
 
 do_install_append() {
-    echo "BOX_TYPE=turris" >> ${D}${sysconfdir}/device.properties
-    echo "ARM_INTERFACE=erouter0" >> ${D}${sysconfdir}/device.properties
-    install -d ${D}${base_libdir}/rdk
     install -d ${D}${systemd_unitdir}/system
-    install -m 0755 ${WORKDIR}/swupdate_utility.sh ${D}${base_libdir}/rdk
-    install -m 0644 ${WORKDIR}/swupdate.service ${D}${systemd_unitdir}/system
-    echo "CLOUDURL="http://35.155.171.121:9092/xconf/swu/stb?eStbMac="" >> ${D}${sysconfdir}/include.properties
+    install -m 0755 ${S}/device/lib/rdk/* ${D}${base_libdir}/rdk
+    install -m 0755 ${S}/rfc.service ${D}${base_libdir}/rdk
+    install -m 0755 ${S}/utils.sh ${D}${base_libdir}/rdk
+    install -m 0755 ${S}/getpartnerid.sh ${D}${base_libdir}/rdk
+    install -m 0755 ${S}/device/systemd_units/* ${D}${systemd_unitdir}/system/
+    echo "BOX_TYPE=rpi" >> ${D}${sysconfdir}/device.properties
+    echo "ARM_INTERFACE=erouter0" >> ${D}${sysconfdir}/device.properties
+    echo "MODEL_NAME=RPI" >> ${D}${sysconfdir}/device.properties
+    echo "ATOM_INTERFACE=br0" >> ${D}${sysconfdir}/device.properties
+    echo "ATOM_INTERFACE_IP=192.168.101.3" >> ${D}${sysconfdir}/device.properties
+    echo "ATOM_PROXY_SERVER=192.168.101.3" >> ${D}${sysconfdir}/device.properties
+    echo "PARODUS_URL=tcp://127.0.0.1:6666" >> ${D}${sysconfdir}/device.properties
+    echo "WEBPA_CLIENT_URL=tcp://192.168.101.3:6667" >> ${D}${sysconfdir}/device.properties
+    echo "CLOUDURL="https://xconf.rdkcentral.com:19092/xconf/swu/stb?eStbMac="" >> ${D}${sysconfdir}/include.properties
 
+    sed -i -e 's/LOG_SERVER=.*$/LOG_SERVER=xconf.rdkcentral.com/' ${D}${sysconfdir}/dcm.properties
+    sed -i -e 's/DCM_LOG_SERVER=.*$/DCM_LOG_SERVER=https:\/\/xconf.rdkcentral.com\/xconf\/logupload.php/' ${D}${sysconfdir}/dcm.properties
+    sed -i -e 's/DCM_LOG_SERVER_URL=.*$/DCM_LOG_SERVER_URL=https:\/\/xconf.rdkcentral.com:19092\/loguploader\/getSettings/' ${D}${sysconfdir}/dcm.properties
+    sed -i -e 's/DCM_SCP_SERVER=.*$/DCM_SCP_SERVER=xconf.rdkcentral.com/' ${D}${sysconfdir}/dcm.properties
+    sed -i -e 's/HTTP_UPLOAD_LINK=.*$/HTTP_UPLOAD_LINK=https:\/\/xconf.rdkcentral.com\/xconf\/telemetry_upload.php/' ${D}${sysconfdir}/dcm.properties
+    sed -i -e 's/DCA_UPLOAD_URL=.*$/DCA_UPLOAD_URL=xconf.rdkcentral.com/' ${D}${sysconfdir}/dcm.properties
+    echo "DCM_HTTP_SERVER_URL="https://xconf.rdkcentral.com/xconf/telemetry_upload.php"" >> ${D}${sysconfdir}/dcm.properties
+    echo "DCM_LA_SERVER_URL="https://xconf.rdkcentral.com/xconf/logupload.php"" >> ${D}${sysconfdir}/dcm.properties
+    #For rfc Support
+    sed -i '/DEVICE_TYPE/c\DEVICE_TYPE=broadband' ${D}${sysconfdir}/device.properties
+    sed -i '/LOG_PATH/c\LOG_PATH=/rdklogs/logs/' ${D}${sysconfdir}/device.properties
+    #Erouter0 info
+    sed -i "/f11/c\       mac=\`ifconfig \$WANINTERFACE | grep HWaddr | cut -d \" \" -f7\`" ${D}${base_libdir}/rdk/utils.sh
+    sed -i '/Device.X_CISCO_COM_CableModem.MACAddress/{n;s/.*/    elif [ "$BOX_TYPE" = "XF3" ]; then/}' ${D}${base_libdir}/rdk/utils.sh
     #DCM simulator Support
-    install -m 0644 ${S}/dcmlogservers.txt   ${D}/rdklogger/
-    install -m 0755 ${WORKDIR}/StartDCM.sh ${D}${base_libdir}/rdk
-    install -m 0755 ${WORKDIR}/DCMscript.sh ${D}${base_libdir}/rdk
-    install -m 0755 ${WORKDIR}/uploadSTBLogs.sh ${D}${base_libdir}/rdk
-    install -m 0755 ${WORKDIR}/dcaSplunkUpload.sh ${D}${base_libdir}/rdk
-    install -m 0755 ${WORKDIR}/dca_utility.sh ${D}${base_libdir}/rdk
-    install -m 0755 ${WORKDIR}/interfaceCalls.sh ${D}${base_libdir}/rdk
-    install -m 0755 ${WORKDIR}/commonUtils.sh ${D}${base_libdir}/rdk
-    install -m 0755 ${WORKDIR}/logfiles.sh ${D}${base_libdir}/rdk
-    install -m 0755 ${WORKDIR}/getaccountid.sh ${D}${base_libdir}/rdk
-    install -m 0755 ${WORKDIR}/getpartnerid.sh ${D}${base_libdir}/rdk
-    install -m 0755 ${WORKDIR}/utils.sh ${D}${base_libdir}/rdk
-    install -m 0755 ${WORKDIR}/dcm-log.service ${D}${systemd_unitdir}/system
-    echo "DCM_LOG_SERVER_URL="http://35.155.171.121:9092/loguploader/getSettings"" >> ${D}${sysconfdir}/dcm.properties
-    echo "DCM_HTTP_SERVER_URL="http://35.155.171.121/xconf/telemetry_upload.php"" >> ${D}${sysconfdir}/dcm.properties
-    echo "DCM_LA_SERVER_URL="http://35.155.171.121/xconf/logupload.php"" >> ${D}${sysconfdir}/dcm.properties
-    echo "TFTP_SERVER_IP=35.155.171.121" >> ${D}${sysconfdir}/device.properties
-    echo "MODEL_NAME=Filogic" >> ${D}${sysconfdir}/device.properties
+    install -m 0755 ${S}/devicerpi/lib/rdk/StartDCM.sh ${D}${base_libdir}/rdk
+    install -m 0755 ${S}/devicerpi/lib/rdk/DCMscript.sh ${D}${base_libdir}/rdk
+    install -m 0755 ${S}/devicerpi/lib/rdk/uploadSTBLogs.sh ${D}${base_libdir}/rdk
+    install -m 0755 ${S}/devicerpi/lib/rdk/interfaceCalls.sh ${D}${base_libdir}/rdk
+    install -m 0755 ${S}/devicerpi/lib/rdk/commonUtils.sh ${D}${base_libdir}/rdk
+    install -m 0755 ${S}/devicerpi/lib/rdk/logfiles.sh ${D}${base_libdir}/rdk
+    install -m 0755 ${S}/devicerpi/lib/rdk/backupLogs.sh ${D}${base_libdir}/rdk
+    install -m 0755 ${S}/devicerpi/lib/rdk/bank_image_switch.sh ${D}${base_libdir}/rdk
+    install -m 0755 ${S}/devicerpi/lib/rdk/deviceInitiatedFWDnld.sh ${D}${base_libdir}/rdk
+    install -m 0755 ${S}/devicerpi/lib/rdk/imageFlasher.sh ${D}${base_libdir}/rdk
+    install -m 0755 ${S}/devicerpi/lib/rdk/rpi_sw_install.sh ${D}${base_libdir}/rdk
+    install -m 0755 ${S}/devicerpi/lib/rdk/rpi_sw_install1.sh ${D}${base_libdir}/rdk
+    install -m 0755 ${S}/devicerpi/lib/rdk/snmpUtils.sh ${D}${base_libdir}/rdk
+    install -m 0755 ${S}/devicerpi/lib/rdk/rpi_image_Flasher.sh ${D}${base_libdir}/rdk
+    install -m 0755 ${S}/devicerpi/lib/rdk/swupdate_utility.sh ${D}${base_libdir}/rdk
+    install -m 0755 ${S}/devicerpi/lib/rdk/dcaSplunkUpload.sh ${D}${base_libdir}/rdk
+    install -m 0755 ${S}/devicerpi/lib/rdk/dca_utility.sh ${D}${base_libdir}/rdk
+    install -m 0755 ${S}/devicerpi/systemd_units/previous-log-backup.service ${D}${systemd_unitdir}/system
+    install -m 0755 ${S}/devicerpi/systemd_units/swupdate.service ${D}${systemd_unitdir}/system
+    install -m 0644 ${S}/devicerpi/systemd_units/hostapd_backup_check.service ${D}${systemd_unitdir}/system
+    rm ${D}${systemd_unitdir}/system/dcm-log.service
+
+    #NTPD 
+    install -m 0644 ${S}/devicerpi/systemd_units/ntpd.service ${D}${systemd_unitdir}/system
+ 
+    # Factory Reset Support
+    install -d ${D}/fss/gw/rdklogger
+    install -m 0755 ${S}/backupLogs.sh ${D}/fss/gw/rdklogger
+    sed -i "s/RDK_LOGGER_PATH=\"\/rdklogger/RDK_LOGGER_PATH=\"\/lib\/rdk/g" ${D}/fss/gw/rdklogger/backupLogs.sh
+    sed -i "/lib\/rdk/a LOG_BACK_UP_REBOOT=\"\/nvram\/logbackupreboot\"" ${D}/fss/gw/rdklogger/backupLogs.sh
 
     #Log Rotate Support
-    sed -i "/if \[ \! -f \/usr\/bin\/GetConfigFile \]\;then/,+4d" ${D}/rdklogger/logfiles.sh
+    install -m 0644 ${S}/logFiles.properties ${D}${sysconfdir}/
+    echo "NVRAM2_SUPPORTED=yes" >> ${D}${sysconfdir}/device.properties
+    # Commenting below line for proper working of telemetry cron job
+    # install -m 0755 ${S}/dca_utility.sh   ${D}${base_libdir}/rdk
+    install -m 0755 ${S}/getaccountid.sh   ${D}${base_libdir}/rdk
+    install -m 0644 ${S}/dcmlogservers.txt   ${D}/rdklogger/
+    sed -i "/if \[ \! -f \/usr\/bin\/GetConfigFile \]\;then/,+4d" ${D}/rdklogger/logfiles.sh 
     sed -i "/uploadRDKBLogs.sh/a \ \t \t  \t  uploading_rdklogs" ${D}/rdklogger/rdkbLogMonitor.sh
     sed -i "/uploadRDKBLogs.sh/d " ${D}/rdklogger/rdkbLogMonitor.sh
-    sed -i "/upload_nvram2_logs()/i uploading_rdklogs() \n { \n \ \t \t TFTP_RULE_COUNT=\`iptables -t raw -L -n | grep tftp | wc -l\` \n \ \t \t if [ \"\$TFTP_RULE_COUNT\" == 0 ] \n \t \t then \n \ \t \t \t iptables -t raw -I OUTPUT -j CT -p udp -m udp --dport 69 --helper tftp \n \ \t \t \t sleep 2 \n \ \t \t fi \n \ \t \t cd /nvram/logbackup \n \ \t \t FILENAME=\`ls *.tgz\` \n \ \t \t tftp -p -r \$FILENAME \$TFTP_SERVER_IP \n } " ${D}/rdklogger/rdkbLogMonitor.sh
+    sed -i "/upload_nvram2_logs()/i uploading_rdklogs() \n { \n \ \t \t TFTP_RULE_COUNT=\`iptables -t raw -L -n | grep tftp | wc -l\` \n \ \t \t if [ \"\$TFTP_RULE_COUNT\" == 0 ] \n \t \t then \n \ \t \t \t iptables -t raw -I OUTPUT -j CT -p udp -m udp --dport 69 --helper tftp \n \ \t \t \t sleep 2 \n \ \t \t fi \n \ \t \t cd /nvram2/logs \n \ \t \t FILENAME=\`ls *.tgz\` \n \ \t \t tftp -p -r \$FILENAME \$TFTP_SERVER_IP \n } " ${D}/rdklogger/rdkbLogMonitor.sh
+    echo "TFTP_SERVER_IP=35.161.239.220" >> ${D}${sysconfdir}/device.properties
+
+    #self heal support
+    install -d ${D}/usr/ccsp/tad
+    install -m 0755 ${S}/devicerpi/lib/rdk/corrective_action.sh ${D}/usr/ccsp/tad
+    install -m 0755 ${S}/devicerpi/lib/rdk/self_heal_connectivity_test.sh ${D}/usr/ccsp/tad
+    install -m 0755 ${S}/devicerpi/lib/rdk/resource_monitor.sh ${D}/usr/ccsp/tad
+    install -m 0755 ${S}/devicerpi/lib/rdk/task_health_monitor.sh ${D}/usr/ccsp/tad
+    install -m 0644 ${S}/devicerpi/systemd_units/disable_systemd_restart_param.service ${D}${systemd_unitdir}/system
+    install -m 0755 ${S}/devicerpi/lib/rdk/disable_systemd_restart_param.sh ${D}${base_libdir}/rdk
 
-    install -m 0755 ${S}/devicerpi/lib/rdk/run_rm_key.sh   ${D}${base_libdir}/rdk
+    #Firmware Upgrade support
+    echo "PART_SIZE_OFFSET=4194304" >> ${D}${sysconfdir}/device.properties
+
+    #Remote Management Support
+    install -m 0755 ${S}/devicerpi/lib/rdk/run_rm_key.sh   ${D}${base_libdir}/rdk 	
+
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'webconfig_bin', 'true', 'false', d)}; then
+        echo "WEBCONFIG_INTERFACE=erouter0" >> ${D}${sysconfdir}/device.properties
+    fi
 }
 
-FILES_${PN} += "${systemd_unitdir}/system/swupdate.service"
-FILES_${PN} += "${systemd_unitdir}/system/dcm-log.service"
+do_install_append_broadband-dev() {
+install -m 0755 ${S}/devicerpi/lib/rdk/build_component_script.sh ${D}${base_libdir}/rdk
+}
+do_install_append_bootbroadband() {
+    install -m 0755 ${S}/devicerpi/lib/rdk/flash.sh ${D}${base_libdir}/rdk
+    install -m 0755 ${S}/devicerpi/lib/rdk/vm-to-image.sh ${D}${base_libdir}/rdk
+    install -m 0755 ${S}/devicerpi/lib/rdk/curl-upload.sh ${D}${base_libdir}/rdk
+    install -m 0755 ${S}/devicerpi/lib/rdk/monitor-upload.sh ${D}${base_libdir}/rdk
+    install -m 0755 ${S}/devicerpi/systemd_units/boot-time-upload.service ${D}${systemd_unitdir}/system
+    install -m 0755 ${S}/devicerpi/systemd_units/monitor-upload.service ${D}${systemd_unitdir}/system
+}
+
+SYSTEMD_SERVICE_${PN}_append = " dropbear.service disable_systemd_restart_param.service ntpd.service swupdate.service "
+SYSTEMD_SERVICE_${PN}_remove_broadband = "dropbear.service"
+SYSTEMD_SERVICE_${PN}_append_bootbroadband += " boot-time-upload.service monitor-upload.service"
 
-RDEPENDS_${PN}_append_dunfell = " bash"
+FILES_${PN}_append = " ${systemd_unitdir}/system/* /fss/gw/rdklogger/* /usr/ccsp/tad/*"
+FILES_${PN}_append_bootbroadband = " ${systemd_unitdir}/system/*"
diff --git a/recipes-support/ecryptfs-utils/ecryptfs-utils_106.bbappend b/recipes-support/ecryptfs-utils/ecryptfs-utils_106.bbappend
new file mode 100644
index 0000000..f5721c5
--- /dev/null
+++ b/recipes-support/ecryptfs-utils/ecryptfs-utils_106.bbappend
@@ -0,0 +1,4 @@
+SRC_URI_append_kirkstone = "\
+           file://0001-ecryptfs-patch-for-openssl-1.x.patch \
+           "
+
diff --git a/setup-environment b/setup-environment
index 68a0d42..b881e8f 100755
--- a/setup-environment
+++ b/setup-environment
@@ -58,7 +58,7 @@
 # Add meta-rdk-opensync only if not already present.
 if [[ $(grep '^BBLAYERS' conf/bblayers.conf | grep -c 'meta-rdk-opensync') -eq 0 ]] && [[ -d  ../meta-rdk-opensync ]]
 then
-    echo 'LAYERSERIES_COMPAT_opensync = "dunfell"' >> ../meta-rdk-opensync/conf/layer.conf
+    echo 'LAYERSERIES_COMPAT_opensync = "dunfell kirkstone"' >> ../meta-rdk-opensync/conf/layer.conf
     cat >> conf/bblayers.conf <<EOF
 BBLAYERS =+ "\${RDKROOT}/meta-rdk-opensync"
 EOF
@@ -93,3 +93,37 @@
         echo "FAILED to copy auto.conf"
     fi
 fi
+
+
+case "$(sed -n 's/^__version__ = "\(.*\)"/\1/p' ${TOP_DIR}/openembedded-core/bitbake/bin/bitbake)"
+in
+    2.0.*) YOCTO_CODENAME="kirkstone" ;;
+    2.2.*) YOCTO_CODENAME="kirkstone" ;;
+    1.46.*) YOCTO_CODENAME="dunfell" ;;
+    1.37.*|1.38.*) YOCTO_CODENAME="sumo" ;;
+    1.35.*|1.36.*) YOCTO_CODENAME="rocko" ;;
+    1.34.*) YOCTO_CODENAME="pyro" ;;
+    1.32.*) YOCTO_CODENAME="morty" ;;
+    1.30.*) YOCTO_CODENAME="krogoth" ;;
+    *)      YOCTO_CODENAME="daisy" ;;
+esac
+
+if [ $(grep -c 'tune-cortexa53' $TOP_DIR/meta-filogic/conf/machine/filogic.conf) -eq 0 ]; then
+    if [ ${YOCTO_CODENAME} == "kirkstone" ]; then
+        echo "${YOCTO_CODENAME} tune-cortexa53.inc"
+        echo "require conf/machine/include/arm/armv8a/tune-cortexa53.inc" >> $TOP_DIR/meta-filogic/conf/machine/filogic.conf
+    else
+        echo "${YOCTO_CODENAME} tune-cortexa53.inc"
+        echo "require conf/machine/include/tune-cortexa53.inc" >> $TOP_DIR/meta-filogic/conf/machine/filogic.conf
+    fi
+fi
+
+if [ $(grep -c 'whitelist' $TOP_DIR/meta-cmf-filogic/conf/distro/include/rdk-filogic.inc) -eq 0 ]; then
+    if [ ${YOCTO_CODENAME} == "kirkstone" ]; then
+        echo "${YOCTO_CODENAME} whitelist.inc"
+        echo "require conf/distro/include/whitelist_kirkstone.inc" >> $TOP_DIR/meta-cmf-filogic/conf/distro/include/rdk-filogic.inc
+    else
+        echo "${YOCTO_CODENAME} whitelist.inc"
+        echo "require conf/distro/include/whitelist_dunfell.inc" >> $TOP_DIR/meta-cmf-filogic/conf/distro/include/rdk-filogic.inc
+    fi
+fi
\ No newline at end of file