developer | ec4ebe4 | 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 | 3262bf8 | 2022-07-12 11:37:54 +0800 | [diff] [blame] | 6 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}/mediatek/flow_patch:" |
developer | ec4ebe4 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 7 | |
developer | 9c03829 | 2022-07-06 15:03:09 +0800 | [diff] [blame] | 8 | KBRANCH ?= "linux-5.4.y" |
developer | ec4ebe4 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 9 | |
developer | e86c3ec | 2022-10-11 10:29:18 +0800 | [diff] [blame^] | 10 | LINUX_VERSION ?= "5.4.215" |
| 11 | SRCREV_machine ?= "6215647d9699cb8f1bf7333ec849242c4a9cf9a6" |
developer | ec4ebe4 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 12 | KMETA = "kernel-meta" |
| 13 | SRCREV_meta ?= "feeb59687bc0f054af837a5061f8d413ec7c93e9" |
| 14 | |
| 15 | DEPENDS_append = " kern-tools-native xz-native bc-native" |
| 16 | |
| 17 | SRC_URI = " \ |
developer | 9c03829 | 2022-07-06 15:03:09 +0800 | [diff] [blame] | 18 | git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git;protocol=https;branch=${KBRANCH};name=machine \ |
developer | ec4ebe4 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 19 | git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.4;destsuffix=${KMETA} \ |
| 20 | file://generic \ |
| 21 | file://mediatek \ |
| 22 | file://generic/defconfig \ |
| 23 | file://001-rdkb-eth-mtk-change-ifname-for.patch;apply=no \ |
| 24 | file://002-rdkb-mtd-ubi-relayout.patch;apply=no \ |
developer | 7557232 | 2022-06-01 19:25:09 +0800 | [diff] [blame] | 25 | file://003-rdkb-mtd-kernel-ubi-relayout.patch;apply=no \ |
developer | ec4ebe4 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 26 | " |
developer | ec4ebe4 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 27 | |
| 28 | SRC_URI_append_mt7986 += " \ |
| 29 | file://mediatek/mt7986.cfg \ |
| 30 | " |
| 31 | SRC_URI_append_mt7986-32bit += " \ |
developer | 53810fa | 2022-04-19 10:14:08 +0800 | [diff] [blame] | 32 | file://mediatek/patches-32bit-5.4/mt7986-32bit.cfg \ |
| 33 | file://mediatek/patches-32bit-5.4/401-pinctrl-add-mt7986-driver-32bit.patch \ |
| 34 | file://mediatek/patches-32bit-5.4/999-add_armv7_support_for_panther.patch \ |
developer | ec4ebe4 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 35 | " |
developer | c436bdc | 2022-04-22 16:48:46 +0800 | [diff] [blame] | 36 | SRC_URI_append += " \ |
| 37 | file://rdkb_cfg/iptables.cfg \ |
| 38 | file://rdkb_cfg/turris_rdkb.cfg \ |
| 39 | file://rdkb_cfg/openvswitch.cfg \ |
| 40 | file://rdkb_cfg/mac80211.cfg \ |
| 41 | file://rdkb_cfg/prplmesh.cfg \ |
developer | 50c864c | 2022-05-30 16:13:51 +0800 | [diff] [blame] | 42 | file://rdkb_cfg/filogic_rdkb.cfg \ |
developer | c436bdc | 2022-04-22 16:48:46 +0800 | [diff] [blame] | 43 | " |
developer | ec4ebe4 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 44 | require ${PN}-${PV}/generic/backport-5.4/backport-5.4.inc |
| 45 | |
| 46 | require ${PN}-${PV}/generic/pending-5.4/pending-5.4.inc |
| 47 | SRC_URI_remove = " \ |
| 48 | file://530-jffs2_make_lzma_available.patch \ |
| 49 | " |
| 50 | require ${PN}-${PV}/generic/hack-5.4/hack-5.4.inc |
| 51 | SRC_URI_remove = " \ |
| 52 | file://531-debloat_lzma.patch \ |
| 53 | " |
| 54 | require ${PN}-${PV}/mediatek/patches-5.4/patches-5.4.inc |
| 55 | SRC_URI_remove = " \ |
developer | ec4ebe4 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 56 | file://738-mt7531-gsw-internal_phy_calibration.patch \ |
| 57 | file://739-mt7531-gsw-port5_external_phy_init.patch \ |
developer | 53810fa | 2022-04-19 10:14:08 +0800 | [diff] [blame] | 58 | " |
| 59 | SRC_URI_remove_mt7986-32bit = " \ |
| 60 | file://401-pinctrl-add-mt7986-driver.patch \ |
developer | ec4ebe4 | 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} |
| 72 | if [ ! -e patch_applied ]; then |
| 73 | patch -p1 < ${WORKDIR}/001-rdkb-eth-mtk-change-ifname-for.patch |
developer | 7557232 | 2022-06-01 19:25:09 +0800 | [diff] [blame] | 74 | if ${@bb.utils.contains('DISTRO_FEATURES','kernel_in_ubi','true','false',d)}; then |
| 75 | patch -p1 < ${WORKDIR}/003-rdkb-mtd-kernel-ubi-relayout.patch |
| 76 | else |
| 77 | patch -p1 < ${WORKDIR}/002-rdkb-mtd-ubi-relayout.patch |
| 78 | fi |
developer | 53810fa | 2022-04-19 10:14:08 +0800 | [diff] [blame] | 79 | patch -p1 < ${WORKDIR}/0600-net-phylink-propagate-resolved-link-config-via-mac_l.patch |
| 80 | patch -p1 < ${WORKDIR}/9010-iwconfig-wireless-rate-fix.patch |
developer | 3262bf8 | 2022-07-12 11:37:54 +0800 | [diff] [blame] | 81 | |
| 82 | for i in ${WORKDIR}/mediatek/flow_patch/*.patch; do patch -p1 < $i; done |
developer | ec4ebe4 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 83 | touch patch_applied |
| 84 | fi |
| 85 | } |
| 86 | |
| 87 | addtask filogic_patches after do_patch before do_compile |