blob: 42dbcb1370db6e1d380cf36a8bb268bf874a02eb [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
developer79e690d2022-12-13 17:05:25 +08009PV = "6.1-rc8"
developerec4ebe42022-04-12 11:17:45 +080010
11SRC_URI = " \
developer79e690d2022-12-13 17:05:25 +080012 http://mirror2.openwrt.org/sources/backports-${PV}.tar.xz \
developerec4ebe42022-04-12 11:17:45 +080013 file://config \
14 file://0001-rdkb-fix_build_issue-mac80211-without_depmod.patch;apply=no \
15 "
developer79e690d2022-12-13 17:05:25 +080016SRC_URI[sha256sum] = "7f3d96c2573183cd79d6a3ebe5e1b7b73c19d1326d443c85b69c4181f14e6e2b"
developerec4ebe42022-04-12 11:17:45 +080017
18DEPENDS += "virtual/kernel"
19DEPENDS += "bison-native coreutils-native flex-native"
20
developer6a1998b2022-12-08 18:09:45 +080021FILESEXTRAPATHS_prepend := "${THISDIR}/files/patches-6.x/build:"
22FILESEXTRAPATHS_prepend := "${THISDIR}/files/patches-6.x/subsys:"
developerec4ebe42022-04-12 11:17:45 +080023
developer6a1998b2022-12-08 18:09:45 +080024require files/patches-6.x/build/build.inc
25require files/patches-6.x/subsys/subsys.inc
developerec4ebe42022-04-12 11:17:45 +080026
developere0a1e0e2023-02-24 11:26:12 +080027SRC_URI_remove = "${@bb.utils.contains('DISTRO_FEATURES', 'flow_offload', '', 'file://mtk-0014-mac80211-mtk-add-fill-receive-path-ops-to-get-wed-id.patch', d)}"
28SRC_URI_remove = "${@bb.utils.contains('DISTRO_FEATURES', 'flow_offload', '', 'file://mtk-0015-mac80211-mtk-register-.ndo_setup_tc-to-support-wifi2.patch', d)}"
developerddae1502022-11-16 18:00:20 +080029
developer79e690d2022-12-13 17:05:25 +080030S = "${WORKDIR}/backports-${PV}"
developerec4ebe42022-04-12 11:17:45 +080031
32do_filogic_patches() {
33 cd ${S}
developer410a85e2022-07-11 14:26:36 +080034 if [ ! -e patch_applied ]; then
developerec4ebe42022-04-12 11:17:45 +080035 patch -p1 < ${WORKDIR}/0001-rdkb-fix_build_issue-mac80211-without_depmod.patch
36 touch patch_applied
37 fi
38}
39addtask filogic_patches after do_unpack before do_compile
40
41EXTRA_OEMAKE = " \
42 KLIB_BUILD=${STAGING_KERNEL_BUILDDIR} \
43 KLIB=${D} \
44 "
45
46do_configure () {
47 make CFLAGS="" CPPFLAGS="" CXXFLAGS="" LDFLAGS="" CC="${BUILD_CC}" \
48 LD="${BUILD_LD}" AR="${BUILD_AR}" LEX="flex" -C ${S}/kconf O=${S}/kconf conf
49
50 cp ${WORKDIR}/config ${S}/.config
developer83323762022-05-06 18:19:39 +080051 oe_runmake allnoconfig
developerec4ebe42022-04-12 11:17:45 +080052}
53
54do_install_prepend () {
55 mkdir -p \
56 ${STAGING_KERNEL_BUILDDIR}/usr/include/mac80211 \
57 ${STAGING_KERNEL_BUILDDIR}/usr/include/mac80211-backport \
58 ${STAGING_KERNEL_BUILDDIR}/usr/include/mac80211/ath \
59 ${STAGING_KERNEL_BUILDDIR}/usr/include/net/mac80211
60 cp -Rf ${S}/net/mac80211/*.h ${S}/include/* ${STAGING_KERNEL_BUILDDIR}/usr/include/mac80211/
61 cp -Rf ${S}/backport-include/* ${STAGING_KERNEL_BUILDDIR}/usr/include/mac80211-backport/
62 cp -Rf ${S}/net/mac80211/rate.h ${STAGING_KERNEL_BUILDDIR}/usr/include/net/mac80211/
63 cp -Rf ${S}/drivers/net/wireless/ath/*.h ${STAGING_KERNEL_BUILDDIR}/usr/include/mac80211/ath/
64 rm -f ${STAGING_KERNEL_BUILDDIR}/usr/include/mac80211-backport/linux/module.h
65}
66
developerca2d55d2022-11-02 18:14:41 +080067do_install_append() {
68 # Module
developerec4ebe42022-04-12 11:17:45 +080069 cat ${D}/usr/include/linux-mac80211/Module.symvers >> ${TMPDIR}/work-shared/${MACHINE}/kernel-build-artifacts/Module.symvers
70}
developerca2d55d2022-11-02 18:14:41 +080071
72PROVIDES += "kernel-module-compat"
73PROVIDES += "kernel-module-cfg80211"
74PROVIDES += "kernel-module-mac80211"