[Change mt76 firmware to maintain in linux-mt76]

[Description]
Change mt76 firmware to maintain in linux-mt76
1. remove linux-firmware-mt76 package
2. add linux-mt76/files/src/firmware (from OpenWRT)
3. add descrition in mt76 bb to install firmware

[Release-log]
N/A

diff --git a/recipes-kernel/linux-mt76/files/src/firmware/mt7915_eeprom.bin b/recipes-kernel/linux-mt76/files/src/firmware/mt7915_eeprom.bin
new file mode 100644
index 0000000..007df1b
--- /dev/null
+++ b/recipes-kernel/linux-mt76/files/src/firmware/mt7915_eeprom.bin
Binary files differ
diff --git a/recipes-kernel/linux-mt76/files/src/firmware/mt7915_eeprom_dbdc.bin b/recipes-kernel/linux-mt76/files/src/firmware/mt7915_eeprom_dbdc.bin
new file mode 100644
index 0000000..6c0b64e
--- /dev/null
+++ b/recipes-kernel/linux-mt76/files/src/firmware/mt7915_eeprom_dbdc.bin
Binary files differ
diff --git a/recipes-kernel/linux-mt76/files/src/firmware/mt7915_rom_patch.bin b/recipes-kernel/linux-mt76/files/src/firmware/mt7915_rom_patch.bin
new file mode 100644
index 0000000..1c69d39
--- /dev/null
+++ b/recipes-kernel/linux-mt76/files/src/firmware/mt7915_rom_patch.bin
Binary files differ
diff --git a/recipes-kernel/linux-mt76/files/src/firmware/mt7915_wa.bin b/recipes-kernel/linux-mt76/files/src/firmware/mt7915_wa.bin
new file mode 100644
index 0000000..434e757
--- /dev/null
+++ b/recipes-kernel/linux-mt76/files/src/firmware/mt7915_wa.bin
Binary files differ
diff --git a/recipes-kernel/linux-mt76/files/src/firmware/mt7915_wm.bin b/recipes-kernel/linux-mt76/files/src/firmware/mt7915_wm.bin
new file mode 100644
index 0000000..fef6005
--- /dev/null
+++ b/recipes-kernel/linux-mt76/files/src/firmware/mt7915_wm.bin
Binary files differ
diff --git a/recipes-kernel/linux-mt76/files/src/firmware/mt7916_eeprom.bin b/recipes-kernel/linux-mt76/files/src/firmware/mt7916_eeprom.bin
new file mode 100644
index 0000000..35b287c
--- /dev/null
+++ b/recipes-kernel/linux-mt76/files/src/firmware/mt7916_eeprom.bin
Binary files differ
diff --git a/recipes-kernel/linux-mt76/files/src/firmware/mt7916_rom_patch.bin b/recipes-kernel/linux-mt76/files/src/firmware/mt7916_rom_patch.bin
new file mode 100644
index 0000000..07fe11a
--- /dev/null
+++ b/recipes-kernel/linux-mt76/files/src/firmware/mt7916_rom_patch.bin
Binary files differ
diff --git a/recipes-kernel/linux-mt76/files/src/firmware/mt7916_wa.bin b/recipes-kernel/linux-mt76/files/src/firmware/mt7916_wa.bin
new file mode 100644
index 0000000..27caa00
--- /dev/null
+++ b/recipes-kernel/linux-mt76/files/src/firmware/mt7916_wa.bin
Binary files differ
diff --git a/recipes-kernel/linux-mt76/files/src/firmware/mt7916_wm.bin b/recipes-kernel/linux-mt76/files/src/firmware/mt7916_wm.bin
new file mode 100644
index 0000000..7df01ea
--- /dev/null
+++ b/recipes-kernel/linux-mt76/files/src/firmware/mt7916_wm.bin
Binary files differ
diff --git a/recipes-kernel/linux-mt76/files/src/firmware/mt7986_eeprom_mt7975_dual.bin b/recipes-kernel/linux-mt76/files/src/firmware/mt7986_eeprom_mt7975_dual.bin
new file mode 100644
index 0000000..dfe5376
--- /dev/null
+++ b/recipes-kernel/linux-mt76/files/src/firmware/mt7986_eeprom_mt7975_dual.bin
Binary files differ
diff --git a/recipes-kernel/linux-mt76/files/src/firmware/mt7986_eeprom_mt7976.bin b/recipes-kernel/linux-mt76/files/src/firmware/mt7986_eeprom_mt7976.bin
new file mode 100644
index 0000000..c821f2d
--- /dev/null
+++ b/recipes-kernel/linux-mt76/files/src/firmware/mt7986_eeprom_mt7976.bin
Binary files differ
diff --git a/recipes-kernel/linux-mt76/files/src/firmware/mt7986_eeprom_mt7976_dbdc.bin b/recipes-kernel/linux-mt76/files/src/firmware/mt7986_eeprom_mt7976_dbdc.bin
new file mode 100644
index 0000000..54858b0
--- /dev/null
+++ b/recipes-kernel/linux-mt76/files/src/firmware/mt7986_eeprom_mt7976_dbdc.bin
Binary files differ
diff --git a/recipes-kernel/linux-mt76/files/src/firmware/mt7986_eeprom_mt7976_dual.bin b/recipes-kernel/linux-mt76/files/src/firmware/mt7986_eeprom_mt7976_dual.bin
new file mode 100644
index 0000000..dc0d3e4
--- /dev/null
+++ b/recipes-kernel/linux-mt76/files/src/firmware/mt7986_eeprom_mt7976_dual.bin
Binary files differ
diff --git a/recipes-kernel/linux-mt76/files/src/firmware/mt7986_rom_patch.bin b/recipes-kernel/linux-mt76/files/src/firmware/mt7986_rom_patch.bin
new file mode 100644
index 0000000..c0185c8
--- /dev/null
+++ b/recipes-kernel/linux-mt76/files/src/firmware/mt7986_rom_patch.bin
Binary files differ
diff --git a/recipes-kernel/linux-mt76/files/src/firmware/mt7986_rom_patch_mt7975.bin b/recipes-kernel/linux-mt76/files/src/firmware/mt7986_rom_patch_mt7975.bin
new file mode 100644
index 0000000..936cfe8
--- /dev/null
+++ b/recipes-kernel/linux-mt76/files/src/firmware/mt7986_rom_patch_mt7975.bin
Binary files differ
diff --git a/recipes-kernel/linux-mt76/files/src/firmware/mt7986_wa.bin b/recipes-kernel/linux-mt76/files/src/firmware/mt7986_wa.bin
new file mode 100644
index 0000000..f7914a9
--- /dev/null
+++ b/recipes-kernel/linux-mt76/files/src/firmware/mt7986_wa.bin
Binary files differ
diff --git a/recipes-kernel/linux-mt76/files/src/firmware/mt7986_wm.bin b/recipes-kernel/linux-mt76/files/src/firmware/mt7986_wm.bin
new file mode 100644
index 0000000..11f363f
--- /dev/null
+++ b/recipes-kernel/linux-mt76/files/src/firmware/mt7986_wm.bin
Binary files differ
diff --git a/recipes-kernel/linux-mt76/files/src/firmware/mt7986_wm_mt7975.bin b/recipes-kernel/linux-mt76/files/src/firmware/mt7986_wm_mt7975.bin
new file mode 100644
index 0000000..972926c
--- /dev/null
+++ b/recipes-kernel/linux-mt76/files/src/firmware/mt7986_wm_mt7975.bin
Binary files differ
diff --git a/recipes-kernel/linux-mt76/linux-mt76.bb b/recipes-kernel/linux-mt76/linux-mt76.bb
index 3a28c38..1148f62 100644
--- a/recipes-kernel/linux-mt76/linux-mt76.bb
+++ b/recipes-kernel/linux-mt76/linux-mt76.bb
@@ -12,11 +12,15 @@
     git://git@github.com/openwrt/mt76.git;protocol=https \
     file://COPYING;subdir=git \
     "
+SRC_URI += " \
+    file://src \
+    "
 
 DEPENDS += "virtual/kernel"
 DEPENDS += "linux-mac80211"
 
 FILESEXTRAPATHS_prepend := "${THISDIR}/files/patches:"
+FILESEXTRAPATHS_prepend := "${THISDIR}/src:"
 
 require files/patches/patches.inc
 
@@ -77,4 +81,46 @@
     install -m 0644 ${B}/mt7915/mt7915e.ko ${D}/lib/modules/${KERNEL_VERSION}/updates/drivers/net/wireless/mediatek/mt76/mt7915/
 }
 
+do_install_append () {
+    install -d ${D}/${base_libdir}/firmware/mediatek/
+
+    install -m 644 ${WORKDIR}/src/firmware/mt7915_rom_patch.bin ${D}${base_libdir}/firmware/mediatek/
+    install -m 644 ${WORKDIR}/src/firmware/mt7915_wa.bin ${D}${base_libdir}/firmware/mediatek/
+    install -m 644 ${WORKDIR}/src/firmware/mt7915_wm.bin ${D}${base_libdir}/firmware/mediatek/
+    install -m 644 ${WORKDIR}/src/firmware/mt7915_eeprom.bin ${D}${base_libdir}/firmware/mediatek/
+    install -m 644 ${WORKDIR}/src/firmware/mt7915_eeprom_dbdc.bin ${D}${base_libdir}/firmware/mediatek/
+
+    install -m 644 ${WORKDIR}/src/firmware/mt7986_rom_patch.bin ${D}${base_libdir}/firmware/mediatek/
+    install -m 644 ${WORKDIR}/src/firmware/mt7986_rom_patch_mt7975.bin ${D}${base_libdir}/firmware/mediatek/
+    install -m 644 ${WORKDIR}/src/firmware/mt7986_wa.bin ${D}${base_libdir}/firmware/mediatek/
+    install -m 644 ${WORKDIR}/src/firmware/mt7986_wm.bin ${D}${base_libdir}/firmware/mediatek/
+    install -m 644 ${WORKDIR}/src/firmware/mt7986_wm_mt7975.bin ${D}${base_libdir}/firmware/mediatek/
+    install -m 644 ${WORKDIR}/src/firmware/mt7986_eeprom_mt7975_dual.bin ${D}${base_libdir}/firmware/mediatek/
+    install -m 644 ${WORKDIR}/src/firmware/mt7986_eeprom_mt7976_dbdc.bin ${D}${base_libdir}/firmware/mediatek/
+    install -m 644 ${WORKDIR}/src/firmware/mt7986_eeprom_mt7976.bin  ${D}${base_libdir}/firmware/mediatek/
+    install -m 644 ${WORKDIR}/src/firmware/mt7986_eeprom_mt7976_dual.bin ${D}${base_libdir}/firmware/mediatek/
+}
+
+FILES_${PN} += " \
+    ${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 \
+    "
+# Make linux-mt76 depend on all of the split-out packages.
+python populate_packages_prepend () {
+    firmware_pkgs = oe.utils.packages_filter_out_system(d)
+    d.appendVar('RDEPENDS_linux-mt76', ' ' + ' '.join(firmware_pkgs))
+}
+
 KERNEL_MODULE_AUTOLOAD += "mt7915e"