blob: 69680edc9c5551339499ae433584a422b658fe3c [file] [log] [blame]
developerf11ee162022-04-12 11:17:45 +08001FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
2FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}/generic/backport-5.4:"
3FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}/generic/pending-5.4:"
4FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}/generic/hack-5.4:"
5FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}/mediatek/patches-5.4:"
developerf79ad452022-07-12 11:37:54 +08006FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}/mediatek/flow_patch:"
developerf11ee162022-04-12 11:17:45 +08007
developer5dd0a6b2022-07-06 15:03:09 +08008KBRANCH ?= "linux-5.4.y"
developerf11ee162022-04-12 11:17:45 +08009
developerb56ed012022-10-19 12:38:30 +080010LINUX_VERSION ?= "5.4.219"
11SRCREV_machine ?= "fd92cfed8bc6668d314acd1e6da708a80826f768"
developerf11ee162022-04-12 11:17:45 +080012KMETA = "kernel-meta"
13SRCREV_meta ?= "feeb59687bc0f054af837a5061f8d413ec7c93e9"
14
15DEPENDS_append = " kern-tools-native xz-native bc-native"
16
17SRC_URI = " \
developer5dd0a6b2022-07-06 15:03:09 +080018 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git;protocol=https;branch=${KBRANCH};name=machine \
developerf11ee162022-04-12 11:17:45 +080019 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 \
developerd13f09a2022-06-01 19:25:09 +080024 file://003-rdkb-mtd-kernel-ubi-relayout.patch;apply=no \
developerf11ee162022-04-12 11:17:45 +080025 "
developer266c5292022-10-18 16:32:50 +080026SRC_URI_append_mt7988 += " \
27 file://mediatek/mt7988.cfg \
28"
developerf11ee162022-04-12 11:17:45 +080029SRC_URI_append_mt7986 += " \
30 file://mediatek/mt7986.cfg \
31"
32SRC_URI_append_mt7986-32bit += " \
developer49e63962022-04-19 10:14:08 +080033 file://mediatek/patches-32bit-5.4/mt7986-32bit.cfg \
34 file://mediatek/patches-32bit-5.4/401-pinctrl-add-mt7986-driver-32bit.patch \
35 file://mediatek/patches-32bit-5.4/999-add_armv7_support_for_panther.patch \
developerf11ee162022-04-12 11:17:45 +080036"
developer21164f32022-04-22 16:48:46 +080037SRC_URI_append += " \
38 file://rdkb_cfg/iptables.cfg \
39 file://rdkb_cfg/turris_rdkb.cfg \
40 file://rdkb_cfg/openvswitch.cfg \
41 file://rdkb_cfg/mac80211.cfg \
42 file://rdkb_cfg/prplmesh.cfg \
developer2a130182022-05-30 16:13:51 +080043 file://rdkb_cfg/filogic_rdkb.cfg \
developer21164f32022-04-22 16:48:46 +080044"
developerf11ee162022-04-12 11:17:45 +080045require ${PN}-${PV}/generic/backport-5.4/backport-5.4.inc
46
47require ${PN}-${PV}/generic/pending-5.4/pending-5.4.inc
48SRC_URI_remove = " \
49 file://530-jffs2_make_lzma_available.patch \
50 "
51require ${PN}-${PV}/generic/hack-5.4/hack-5.4.inc
52SRC_URI_remove = " \
53 file://531-debloat_lzma.patch \
54 "
55require ${PN}-${PV}/mediatek/patches-5.4/patches-5.4.inc
56SRC_URI_remove = " \
developerf11ee162022-04-12 11:17:45 +080057 file://738-mt7531-gsw-internal_phy_calibration.patch \
58 file://739-mt7531-gsw-port5_external_phy_init.patch \
developer49e63962022-04-19 10:14:08 +080059 "
60SRC_URI_remove_mt7986-32bit = " \
61 file://401-pinctrl-add-mt7986-driver.patch \
developerf11ee162022-04-12 11:17:45 +080062 "
63require linux-mediatek.inc
64
65do_patch_prepend () {
66 cp -Rfp ${WORKDIR}/generic/files/* ${S}/
67 cp -Rfp ${WORKDIR}/generic/files-5.4/* ${S}/
68 cp -Rfp ${WORKDIR}/mediatek/files-5.4/* ${S}/
69}
70
71do_filogic_patches() {
72 cd ${S}
73 if [ ! -e patch_applied ]; then
74 patch -p1 < ${WORKDIR}/001-rdkb-eth-mtk-change-ifname-for.patch
developerd13f09a2022-06-01 19:25:09 +080075 patch -p1 < ${WORKDIR}/003-rdkb-mtd-kernel-ubi-relayout.patch
developer49e63962022-04-19 10:14:08 +080076 patch -p1 < ${WORKDIR}/0600-net-phylink-propagate-resolved-link-config-via-mac_l.patch
77 patch -p1 < ${WORKDIR}/9010-iwconfig-wireless-rate-fix.patch
developerf79ad452022-07-12 11:37:54 +080078
79 for i in ${WORKDIR}/mediatek/flow_patch/*.patch; do patch -p1 < $i; done
developerf11ee162022-04-12 11:17:45 +080080 touch patch_applied
81 fi
82}
83
84addtask filogic_patches after do_patch before do_compile