blob: 240193cd5a54c0478d99c76baf019b0de9af1d6d [file] [log] [blame]
developerec4ebe42022-04-12 11:17:45 +08001DESCRIPTION = "Linux backports"
2HOMEPAGE = "https://backports.wiki.kernel.org"
3SECTION = "kernel/modules"
4LICENSE = "GPLv2"
5LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
6
7inherit module
8
developer7b933902022-12-05 12:27:55 +08009PV = "5.15.81"
developerec4ebe42022-04-12 11:17:45 +080010
11SRC_URI = " \
12 https://cdn.kernel.org/pub/linux/kernel/projects/backports/stable/v${PV}/backports-${PV}-1.tar.xz \
13 file://config \
14 file://0001-rdkb-fix_build_issue-mac80211-without_depmod.patch;apply=no \
15 "
developer7b933902022-12-05 12:27:55 +080016SRC_URI[sha256sum] = "5227d3c35ccebacfaee6b8180b3a87b9910f3c94ee768ebc5c0fef3c86b6146d"
developerec4ebe42022-04-12 11:17:45 +080017
18DEPENDS += "virtual/kernel"
19DEPENDS += "bison-native coreutils-native flex-native"
20
developerec4ebe42022-04-12 11:17:45 +080021FILESEXTRAPATHS_prepend := "${THISDIR}/files/patches/build:"
22FILESEXTRAPATHS_prepend := "${THISDIR}/files/patches/subsys:"
23
24require files/patches/build/build.inc
25require files/patches/subsys/subsys.inc
26
developerbcc85ca2022-12-05 11:29:56 +080027SRC_URI_remove = "${@bb.utils.contains('DISTRO_FEATURES', 'flow_offload', '', 'file://99900-mac80211-mtk-mask-kernel-version-limitation-and-fil.patch', d)}"
28SRC_URI_remove = "${@bb.utils.contains('DISTRO_FEATURES', 'flow_offload', '', 'file://99901-mac80211-mtk-add-fill-receive-path-ops-to-get-wed-i.patch', d)}"
developer89cfee82022-12-29 17:02:11 +080029SRC_URI_remove = "${@bb.utils.contains('DISTRO_FEATURES', 'flow_offload', '', 'file://99902-mac80211-mtk-register-.ndo_setup_tc-to-support-wifi2.patch', d)}"
developerddae1502022-11-16 18:00:20 +080030
developerec4ebe42022-04-12 11:17:45 +080031S = "${WORKDIR}/backports-${PV}-1"
32
33do_filogic_patches() {
34 cd ${S}
developer410a85e2022-07-11 14:26:36 +080035 if [ ! -e patch_applied ]; then
developerec4ebe42022-04-12 11:17:45 +080036 patch -p1 < ${WORKDIR}/0001-rdkb-fix_build_issue-mac80211-without_depmod.patch
37 touch patch_applied
38 fi
39}
40addtask filogic_patches after do_unpack before do_compile
41
42EXTRA_OEMAKE = " \
43 KLIB_BUILD=${STAGING_KERNEL_BUILDDIR} \
44 KLIB=${D} \
45 "
46
47do_configure () {
48 make CFLAGS="" CPPFLAGS="" CXXFLAGS="" LDFLAGS="" CC="${BUILD_CC}" \
49 LD="${BUILD_LD}" AR="${BUILD_AR}" LEX="flex" -C ${S}/kconf O=${S}/kconf conf
50
51 cp ${WORKDIR}/config ${S}/.config
developer83323762022-05-06 18:19:39 +080052 oe_runmake allnoconfig
developerec4ebe42022-04-12 11:17:45 +080053}
54
55do_install_prepend () {
56 mkdir -p \
57 ${STAGING_KERNEL_BUILDDIR}/usr/include/mac80211 \
58 ${STAGING_KERNEL_BUILDDIR}/usr/include/mac80211-backport \
59 ${STAGING_KERNEL_BUILDDIR}/usr/include/mac80211/ath \
60 ${STAGING_KERNEL_BUILDDIR}/usr/include/net/mac80211
61 cp -Rf ${S}/net/mac80211/*.h ${S}/include/* ${STAGING_KERNEL_BUILDDIR}/usr/include/mac80211/
62 cp -Rf ${S}/backport-include/* ${STAGING_KERNEL_BUILDDIR}/usr/include/mac80211-backport/
63 cp -Rf ${S}/net/mac80211/rate.h ${STAGING_KERNEL_BUILDDIR}/usr/include/net/mac80211/
64 cp -Rf ${S}/drivers/net/wireless/ath/*.h ${STAGING_KERNEL_BUILDDIR}/usr/include/mac80211/ath/
65 rm -f ${STAGING_KERNEL_BUILDDIR}/usr/include/mac80211-backport/linux/module.h
66}
67
developerca2d55d2022-11-02 18:14:41 +080068do_install_append() {
69 # Module
developerec4ebe42022-04-12 11:17:45 +080070 cat ${D}/usr/include/linux-mac80211/Module.symvers >> ${TMPDIR}/work-shared/${MACHINE}/kernel-build-artifacts/Module.symvers
71}
developerca2d55d2022-11-02 18:14:41 +080072
73PROVIDES += "kernel-module-compat"
74PROVIDES += "kernel-module-cfg80211"
75PROVIDES += "kernel-module-mac80211"