[Add meta-cmf-filogic sdk cmf for rdkb development]

[Description]
Add meta-cmf-filogic sdk cmf for rdkb development
1. rdkb base on dunfell rdkb-next (> 2022q1)
2. cmf is mostly from meta-turris implementation
3. some 64bit support are port from rp4-64 cmf
4. arm64/arm 32bit bsp both can run on rdkb

[Release-log]
N/A

diff --git a/recipes-kernel/linux-firmware/files/mt76/firmware/mt7915_eeprom.bin b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7915_eeprom.bin
new file mode 100644
index 0000000..007df1b
--- /dev/null
+++ b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7915_eeprom.bin
Binary files differ
diff --git a/recipes-kernel/linux-firmware/files/mt76/firmware/mt7915_eeprom_dbdc.bin b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7915_eeprom_dbdc.bin
new file mode 100644
index 0000000..6c0b64e
--- /dev/null
+++ b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7915_eeprom_dbdc.bin
Binary files differ
diff --git a/recipes-kernel/linux-firmware/files/mt76/firmware/mt7915_rom_patch.bin b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7915_rom_patch.bin
new file mode 100644
index 0000000..1c69d39
--- /dev/null
+++ b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7915_rom_patch.bin
Binary files differ
diff --git a/recipes-kernel/linux-firmware/files/mt76/firmware/mt7915_wa.bin b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7915_wa.bin
new file mode 100644
index 0000000..434e757
--- /dev/null
+++ b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7915_wa.bin
Binary files differ
diff --git a/recipes-kernel/linux-firmware/files/mt76/firmware/mt7915_wm.bin b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7915_wm.bin
new file mode 100644
index 0000000..fef6005
--- /dev/null
+++ b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7915_wm.bin
Binary files differ
diff --git a/recipes-kernel/linux-firmware/files/mt76/firmware/mt7916_eeprom.bin b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7916_eeprom.bin
new file mode 100644
index 0000000..35b287c
--- /dev/null
+++ b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7916_eeprom.bin
Binary files differ
diff --git a/recipes-kernel/linux-firmware/files/mt76/firmware/mt7916_rom_patch.bin b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7916_rom_patch.bin
new file mode 100644
index 0000000..07fe11a
--- /dev/null
+++ b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7916_rom_patch.bin
Binary files differ
diff --git a/recipes-kernel/linux-firmware/files/mt76/firmware/mt7916_wa.bin b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7916_wa.bin
new file mode 100644
index 0000000..27caa00
--- /dev/null
+++ b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7916_wa.bin
Binary files differ
diff --git a/recipes-kernel/linux-firmware/files/mt76/firmware/mt7916_wm.bin b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7916_wm.bin
new file mode 100644
index 0000000..7df01ea
--- /dev/null
+++ b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7916_wm.bin
Binary files differ
diff --git a/recipes-kernel/linux-firmware/files/mt76/firmware/mt7986_eeprom_mt7975_dual.bin b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7986_eeprom_mt7975_dual.bin
new file mode 100644
index 0000000..dfe5376
--- /dev/null
+++ b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7986_eeprom_mt7975_dual.bin
Binary files differ
diff --git a/recipes-kernel/linux-firmware/files/mt76/firmware/mt7986_eeprom_mt7976.bin b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7986_eeprom_mt7976.bin
new file mode 100644
index 0000000..c821f2d
--- /dev/null
+++ b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7986_eeprom_mt7976.bin
Binary files differ
diff --git a/recipes-kernel/linux-firmware/files/mt76/firmware/mt7986_eeprom_mt7976_dbdc.bin b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7986_eeprom_mt7976_dbdc.bin
new file mode 100644
index 0000000..54858b0
--- /dev/null
+++ b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7986_eeprom_mt7976_dbdc.bin
Binary files differ
diff --git a/recipes-kernel/linux-firmware/files/mt76/firmware/mt7986_eeprom_mt7976_dual.bin b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7986_eeprom_mt7976_dual.bin
new file mode 100644
index 0000000..dc0d3e4
--- /dev/null
+++ b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7986_eeprom_mt7976_dual.bin
Binary files differ
diff --git a/recipes-kernel/linux-firmware/files/mt76/firmware/mt7986_rom_patch.bin b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7986_rom_patch.bin
new file mode 100644
index 0000000..c0185c8
--- /dev/null
+++ b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7986_rom_patch.bin
Binary files differ
diff --git a/recipes-kernel/linux-firmware/files/mt76/firmware/mt7986_rom_patch_mt7975.bin b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7986_rom_patch_mt7975.bin
new file mode 100644
index 0000000..936cfe8
--- /dev/null
+++ b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7986_rom_patch_mt7975.bin
Binary files differ
diff --git a/recipes-kernel/linux-firmware/files/mt76/firmware/mt7986_wa.bin b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7986_wa.bin
new file mode 100644
index 0000000..f7914a9
--- /dev/null
+++ b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7986_wa.bin
Binary files differ
diff --git a/recipes-kernel/linux-firmware/files/mt76/firmware/mt7986_wm.bin b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7986_wm.bin
new file mode 100644
index 0000000..11f363f
--- /dev/null
+++ b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7986_wm.bin
Binary files differ
diff --git a/recipes-kernel/linux-firmware/files/mt76/firmware/mt7986_wm_mt7975.bin b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7986_wm_mt7975.bin
new file mode 100644
index 0000000..972926c
--- /dev/null
+++ b/recipes-kernel/linux-firmware/files/mt76/firmware/mt7986_wm_mt7975.bin
Binary files differ
diff --git a/recipes-kernel/linux-firmware/linux-firmware_%.bbappend b/recipes-kernel/linux-firmware/linux-firmware_%.bbappend
new file mode 100644
index 0000000..8d6a831
--- /dev/null
+++ b/recipes-kernel/linux-firmware/linux-firmware_%.bbappend
@@ -0,0 +1,45 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+SRC_URI += " \
+    file://mt76 \
+    "
+
+do_install_append () {
+    install -d ${D}/${base_libdir}/firmware/mediatek/
+
+    install -m 644 ${WORKDIR}/mt76/firmware/mt7915_rom_patch.bin ${D}${base_libdir}/firmware/mediatek/
+    install -m 644 ${WORKDIR}/mt76/firmware/mt7915_wa.bin ${D}${base_libdir}/firmware/mediatek/
+    install -m 644 ${WORKDIR}/mt76/firmware/mt7915_wm.bin ${D}${base_libdir}/firmware/mediatek/
+    install -m 644 ${WORKDIR}/mt76/firmware/mt7915_eeprom.bin ${D}${base_libdir}/firmware/mediatek/
+    install -m 644 ${WORKDIR}/mt76/firmware/mt7915_eeprom_dbdc.bin ${D}${base_libdir}/firmware/mediatek/
+
+    install -m 644 ${WORKDIR}/mt76/firmware/mt7986_rom_patch.bin ${D}${base_libdir}/firmware/mediatek/
+    install -m 644 ${WORKDIR}/mt76/firmware/mt7986_rom_patch_mt7975.bin ${D}${base_libdir}/firmware/mediatek/
+    install -m 644 ${WORKDIR}/mt76/firmware/mt7986_wa.bin ${D}${base_libdir}/firmware/mediatek/
+    install -m 644 ${WORKDIR}/mt76/firmware/mt7986_wm.bin ${D}${base_libdir}/firmware/mediatek/
+    install -m 644 ${WORKDIR}/mt76/firmware/mt7986_wm_mt7975.bin ${D}${base_libdir}/firmware/mediatek/
+    install -m 644 ${WORKDIR}/mt76/firmware/mt7986_eeprom_mt7975_dual.bin ${D}${base_libdir}/firmware/mediatek/
+    install -m 644 ${WORKDIR}/mt76/firmware/mt7986_eeprom_mt7976_dbdc.bin ${D}${base_libdir}/firmware/mediatek/
+    install -m 644 ${WORKDIR}/mt76/firmware/mt7986_eeprom_mt7976.bin  ${D}${base_libdir}/firmware/mediatek/
+    install -m 644 ${WORKDIR}/mt76/firmware/mt7986_eeprom_mt7976_dual.bin ${D}${base_libdir}/firmware/mediatek/
+
+}
+
+PACKAGES =+ "${PN}-mt76"
+
+FILES_${PN}-mt76 += " \
+    ${base_libdir}/firmware/mediatek/mt7915_rom_patch.bin \
+    ${base_libdir}/firmware/mediatek/mt7915_wa.bin \
+    ${base_libdir}/firmware/mediatek/mt7915_wm.bin \
+    ${base_libdir}/firmware/mediatek/mt7915_eeprom.bin \
+    ${base_libdir}/firmware/mediatek/mt7915_eeprom_dbdc.bin \
+    ${base_libdir}/firmware/mediatek/mt7986_rom_patch.bin\
+    ${base_libdir}/firmware/mediatek/mt7986_rom_patch_mt7975.bin \
+    ${base_libdir}/firmware/mediatek/mt7986_wa.bin \
+    ${base_libdir}/firmware/mediatek/mt7986_wm.bin \
+    ${base_libdir}/firmware/mediatek/mt7986_wm_mt7975.bin \
+    ${base_libdir}/firmware/mediatek/mt7986_eeprom_mt7975_dual.bin \
+    ${base_libdir}/firmware/mediatek/mt7986_eeprom_mt7976_dbdc.bin \
+    ${base_libdir}/firmware/mediatek/mt7986_eeprom_mt7976.bin \
+    ${base_libdir}/firmware/mediatek/mt7986_eeprom_mt7976_dual.bin \
+    "
diff --git a/recipes-kernel/linux/linux-mediatek_%.bbappend b/recipes-kernel/linux/linux-mediatek_%.bbappend
new file mode 100644
index 0000000..b2311a1
--- /dev/null
+++ b/recipes-kernel/linux/linux-mediatek_%.bbappend
@@ -0,0 +1,16 @@
+do_install_append() {
+    cp -Rfp ${B}/scripts/ ${STAGING_KERNEL_BUILDDIR}/
+    install -d ${D}${includedir}
+    install -m 0644 ${B}/include/generated/autoconf.h ${D}${includedir}/autoconf.h
+}
+
+sysroot_stage_all_append () {
+    install -d ${SYSROOT_DESTDIR}${includedir}
+    install -m 0644 ${D}${includedir}/autoconf.h ${SYSROOT_DESTDIR}${includedir}/autoconf.h
+}
+
+
+PACKAGES += "kernel-autoconf"
+PROVIDES += "kernel-autoconf"
+
+FILES_kernel-autoconf = "${includedir}/autoconf.h"