developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" |
| 2 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}/generic/backport-5.4:" |
| 3 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}/generic/pending-5.4:" |
| 4 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}/generic/hack-5.4:" |
| 5 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}/mediatek/patches-5.4:" |
developer | f79ad45 | 2022-07-12 11:37:54 +0800 | [diff] [blame] | 6 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}/mediatek/flow_patch:" |
developer | 3d4e457 | 2023-01-04 17:20:43 +0800 | [diff] [blame] | 7 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}/mediatek/nf_hnat:" |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 8 | |
developer | 5dd0a6b | 2022-07-06 15:03:09 +0800 | [diff] [blame] | 9 | KBRANCH ?= "linux-5.4.y" |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 10 | |
developer | 3609d78 | 2022-11-29 18:07:22 +0800 | [diff] [blame] | 11 | LINUX_VERSION ?= "5.4.225" |
| 12 | SRCREV_machine ?= "4d2a309b5c28a2edc0900542d22fec3a5a22243b" |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 13 | KMETA = "kernel-meta" |
| 14 | SRCREV_meta ?= "feeb59687bc0f054af837a5061f8d413ec7c93e9" |
| 15 | |
| 16 | DEPENDS_append = " kern-tools-native xz-native bc-native" |
| 17 | |
| 18 | SRC_URI = " \ |
developer | 5dd0a6b | 2022-07-06 15:03:09 +0800 | [diff] [blame] | 19 | git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git;protocol=https;branch=${KBRANCH};name=machine \ |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 20 | git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.4;destsuffix=${KMETA} \ |
| 21 | file://generic \ |
| 22 | file://mediatek \ |
| 23 | file://generic/defconfig \ |
| 24 | file://001-rdkb-eth-mtk-change-ifname-for.patch;apply=no \ |
developer | d13f09a | 2022-06-01 19:25:09 +0800 | [diff] [blame] | 25 | file://003-rdkb-mtd-kernel-ubi-relayout.patch;apply=no \ |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 26 | " |
developer | 266c529 | 2022-10-18 16:32:50 +0800 | [diff] [blame] | 27 | SRC_URI_append_mt7988 += " \ |
| 28 | file://mediatek/mt7988.cfg \ |
| 29 | " |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 30 | SRC_URI_append_mt7986 += " \ |
| 31 | file://mediatek/mt7986.cfg \ |
| 32 | " |
| 33 | SRC_URI_append_mt7986-32bit += " \ |
developer | 49e6396 | 2022-04-19 10:14:08 +0800 | [diff] [blame] | 34 | file://mediatek/patches-32bit-5.4/mt7986-32bit.cfg \ |
| 35 | file://mediatek/patches-32bit-5.4/401-pinctrl-add-mt7986-driver-32bit.patch \ |
| 36 | file://mediatek/patches-32bit-5.4/999-add_armv7_support_for_panther.patch \ |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 37 | " |
developer | 21164f3 | 2022-04-22 16:48:46 +0800 | [diff] [blame] | 38 | SRC_URI_append += " \ |
| 39 | file://rdkb_cfg/iptables.cfg \ |
| 40 | file://rdkb_cfg/turris_rdkb.cfg \ |
| 41 | file://rdkb_cfg/openvswitch.cfg \ |
developer | 3d4e457 | 2023-01-04 17:20:43 +0800 | [diff] [blame] | 42 | ${@bb.utils.contains('DISTRO_FEATURES', 'mt76', 'file://rdkb_cfg/mac80211.cfg', 'file://rdkb_cfg/nf_hnat.cfg', d)} \ |
developer | 21164f3 | 2022-04-22 16:48:46 +0800 | [diff] [blame] | 43 | file://rdkb_cfg/prplmesh.cfg \ |
developer | 2a13018 | 2022-05-30 16:13:51 +0800 | [diff] [blame] | 44 | file://rdkb_cfg/filogic_rdkb.cfg \ |
developer | a84877f | 2023-01-18 09:21:27 +0800 | [diff] [blame^] | 45 | ${@bb.utils.contains('DISTRO_FEATURES','emmc','file://rdkb_cfg/emmc.cfg','',d)} \ |
developer | 21164f3 | 2022-04-22 16:48:46 +0800 | [diff] [blame] | 46 | " |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 47 | require ${PN}-${PV}/generic/backport-5.4/backport-5.4.inc |
| 48 | |
| 49 | require ${PN}-${PV}/generic/pending-5.4/pending-5.4.inc |
| 50 | SRC_URI_remove = " \ |
| 51 | file://530-jffs2_make_lzma_available.patch \ |
| 52 | " |
| 53 | require ${PN}-${PV}/generic/hack-5.4/hack-5.4.inc |
| 54 | SRC_URI_remove = " \ |
| 55 | file://531-debloat_lzma.patch \ |
| 56 | " |
| 57 | require ${PN}-${PV}/mediatek/patches-5.4/patches-5.4.inc |
developer | 4191326 | 2022-12-19 19:45:32 +0800 | [diff] [blame] | 58 | |
developer | 49e6396 | 2022-04-19 10:14:08 +0800 | [diff] [blame] | 59 | SRC_URI_remove_mt7986-32bit = " \ |
| 60 | file://401-pinctrl-add-mt7986-driver.patch \ |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 61 | " |
| 62 | require linux-mediatek.inc |
| 63 | |
| 64 | do_patch_prepend () { |
| 65 | cp -Rfp ${WORKDIR}/generic/files/* ${S}/ |
| 66 | cp -Rfp ${WORKDIR}/generic/files-5.4/* ${S}/ |
| 67 | cp -Rfp ${WORKDIR}/mediatek/files-5.4/* ${S}/ |
| 68 | } |
| 69 | |
| 70 | do_filogic_patches() { |
| 71 | cd ${S} |
developer | e6cee7d | 2022-11-16 18:00:20 +0800 | [diff] [blame] | 72 | DISTRO_FlowBlock_ENABLED="${@bb.utils.contains('DISTRO_FEATURES','flow_offload','true','false',d)}" |
developer | 3d4e457 | 2023-01-04 17:20:43 +0800 | [diff] [blame] | 73 | DISTRO_logan_ENABLED="${@bb.utils.contains('DISTRO_FEATURES','logan','true','false',d)}" |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 74 | if [ ! -e patch_applied ]; then |
| 75 | patch -p1 < ${WORKDIR}/001-rdkb-eth-mtk-change-ifname-for.patch |
developer | d13f09a | 2022-06-01 19:25:09 +0800 | [diff] [blame] | 76 | patch -p1 < ${WORKDIR}/003-rdkb-mtd-kernel-ubi-relayout.patch |
developer | 49e6396 | 2022-04-19 10:14:08 +0800 | [diff] [blame] | 77 | patch -p1 < ${WORKDIR}/0600-net-phylink-propagate-resolved-link-config-via-mac_l.patch |
developer | 4191326 | 2022-12-19 19:45:32 +0800 | [diff] [blame] | 78 | patch -p1 < ${WORKDIR}/738-mt7531-gsw-internal_phy_calibration.patch |
| 79 | patch -p1 < ${WORKDIR}/739-mt7531-gsw-port5_external_phy_init.patch |
| 80 | patch -p1 < ${WORKDIR}/753-net-mt753x-phy-coverity-scan.patch |
developer | 49e6396 | 2022-04-19 10:14:08 +0800 | [diff] [blame] | 81 | patch -p1 < ${WORKDIR}/9010-iwconfig-wireless-rate-fix.patch |
developer | e6cee7d | 2022-11-16 18:00:20 +0800 | [diff] [blame] | 82 | if [ $DISTRO_FlowBlock_ENABLED = 'true' ]; then |
| 83 | for i in ${WORKDIR}/mediatek/flow_patch/*.patch; do patch -p1 < $i; done |
| 84 | fi |
developer | 3d4e457 | 2023-01-04 17:20:43 +0800 | [diff] [blame] | 85 | if [ $DISTRO_logan_ENABLED = 'true' ]; then |
developer | cc326e2 | 2023-01-04 18:51:23 +0800 | [diff] [blame] | 86 | for i in ${WORKDIR}/mediatek/nf_hnat/6*.patch; do patch -p1 < $i; done |
| 87 | for i in ${WORKDIR}/mediatek/nf_hnat/10*.patch; do patch -p1 < $i; done |
developer | 3d4e457 | 2023-01-04 17:20:43 +0800 | [diff] [blame] | 88 | fi |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 89 | touch patch_applied |
| 90 | fi |
| 91 | } |
| 92 | |
| 93 | addtask filogic_patches after do_patch before do_compile |
developer | 3d4e457 | 2023-01-04 17:20:43 +0800 | [diff] [blame] | 94 | |
| 95 | KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains('DISTRO_FEATURES','logan','mtkhnat nf_flow_table_hw','',d)}" |