blob: 405ef62fcefd72762da697bc0fcb428abde378aa [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:"
6
developer5dd0a6b2022-07-06 15:03:09 +08007KBRANCH ?= "linux-5.4.y"
developerf11ee162022-04-12 11:17:45 +08008
developer5dd0a6b2022-07-06 15:03:09 +08009LINUX_VERSION ?= "5.4.203"
10SRCREV_machine ?= "871cbc208bf0aded1946cd1e3eebec75799d31e8"
developerf11ee162022-04-12 11:17:45 +080011KMETA = "kernel-meta"
12SRCREV_meta ?= "feeb59687bc0f054af837a5061f8d413ec7c93e9"
13
14DEPENDS_append = " kern-tools-native xz-native bc-native"
15
16SRC_URI = " \
developer5dd0a6b2022-07-06 15:03:09 +080017 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git;protocol=https;branch=${KBRANCH};name=machine \
developerf11ee162022-04-12 11:17:45 +080018 git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.4;destsuffix=${KMETA} \
19 file://generic \
20 file://mediatek \
21 file://generic/defconfig \
22 file://001-rdkb-eth-mtk-change-ifname-for.patch;apply=no \
23 file://002-rdkb-mtd-ubi-relayout.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 "
developerf11ee162022-04-12 11:17:45 +080026
27SRC_URI_append_mt7986 += " \
28 file://mediatek/mt7986.cfg \
29"
30SRC_URI_append_mt7986-32bit += " \
developer49e63962022-04-19 10:14:08 +080031 file://mediatek/patches-32bit-5.4/mt7986-32bit.cfg \
32 file://mediatek/patches-32bit-5.4/401-pinctrl-add-mt7986-driver-32bit.patch \
33 file://mediatek/patches-32bit-5.4/999-add_armv7_support_for_panther.patch \
developerf11ee162022-04-12 11:17:45 +080034"
developer21164f32022-04-22 16:48:46 +080035SRC_URI_append += " \
36 file://rdkb_cfg/iptables.cfg \
37 file://rdkb_cfg/turris_rdkb.cfg \
38 file://rdkb_cfg/openvswitch.cfg \
39 file://rdkb_cfg/mac80211.cfg \
40 file://rdkb_cfg/prplmesh.cfg \
developer2a130182022-05-30 16:13:51 +080041 file://rdkb_cfg/filogic_rdkb.cfg \
developer21164f32022-04-22 16:48:46 +080042"
developerf11ee162022-04-12 11:17:45 +080043require ${PN}-${PV}/generic/backport-5.4/backport-5.4.inc
44
45require ${PN}-${PV}/generic/pending-5.4/pending-5.4.inc
46SRC_URI_remove = " \
47 file://530-jffs2_make_lzma_available.patch \
48 "
49require ${PN}-${PV}/generic/hack-5.4/hack-5.4.inc
50SRC_URI_remove = " \
51 file://531-debloat_lzma.patch \
52 "
53require ${PN}-${PV}/mediatek/patches-5.4/patches-5.4.inc
54SRC_URI_remove = " \
developerf11ee162022-04-12 11:17:45 +080055 file://738-mt7531-gsw-internal_phy_calibration.patch \
56 file://739-mt7531-gsw-port5_external_phy_init.patch \
developer49e63962022-04-19 10:14:08 +080057 "
58SRC_URI_remove_mt7986-32bit = " \
59 file://401-pinctrl-add-mt7986-driver.patch \
developerf11ee162022-04-12 11:17:45 +080060 "
61require linux-mediatek.inc
62
63do_patch_prepend () {
64 cp -Rfp ${WORKDIR}/generic/files/* ${S}/
65 cp -Rfp ${WORKDIR}/generic/files-5.4/* ${S}/
66 cp -Rfp ${WORKDIR}/mediatek/files-5.4/* ${S}/
67}
68
69do_filogic_patches() {
70 cd ${S}
71 if [ ! -e patch_applied ]; then
72 patch -p1 < ${WORKDIR}/001-rdkb-eth-mtk-change-ifname-for.patch
developerd13f09a2022-06-01 19:25:09 +080073 if ${@bb.utils.contains('DISTRO_FEATURES','kernel_in_ubi','true','false',d)}; then
74 patch -p1 < ${WORKDIR}/003-rdkb-mtd-kernel-ubi-relayout.patch
75 else
76 patch -p1 < ${WORKDIR}/002-rdkb-mtd-ubi-relayout.patch
77 fi
developer49e63962022-04-19 10:14:08 +080078 patch -p1 < ${WORKDIR}/0600-net-phylink-propagate-resolved-link-config-via-mac_l.patch
79 patch -p1 < ${WORKDIR}/9010-iwconfig-wireless-rate-fix.patch
developerf11ee162022-04-12 11:17:45 +080080 touch patch_applied
81 fi
82}
83
84addtask filogic_patches after do_patch before do_compile