blob: c15df8273327326f43535335716b0416f343b9ab [file] [log] [blame]
developerf11ee162022-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
developer05f3b2b2024-08-19 19:17:34 +08009PV = "2024-07-11"
developerf11ee162022-04-12 11:17:45 +080010
11SRC_URI = " \
developer66e89bc2024-04-23 14:50:01 +080012 file://backports-${PV}.tar.xz \
developerf11ee162022-04-12 11:17:45 +080013 file://config \
14 file://0001-rdkb-fix_build_issue-mac80211-without_depmod.patch;apply=no \
15 "
developera46f6132024-03-26 14:09:54 +080016SRC_URI[sha256sum] = "3bbc461121134fda9089c084a5eed577d05e7837a157edf9a3797937172a3ece"
developerf11ee162022-04-12 11:17:45 +080017
18DEPENDS += "virtual/kernel"
19DEPENDS += "bison-native coreutils-native flex-native"
20
developer66e89bc2024-04-23 14:50:01 +080021#FILESEXTRAPATHS_prepend := "${THISDIR}/files/patches-6.x/build:"
developere2cfb522022-12-08 18:09:45 +080022FILESEXTRAPATHS_prepend := "${THISDIR}/files/patches-6.x/subsys:"
developerf11ee162022-04-12 11:17:45 +080023
developer66e89bc2024-04-23 14:50:01 +080024#require files/patches-6.x/build/build.inc
developere2cfb522022-12-08 18:09:45 +080025require files/patches-6.x/subsys/subsys.inc
developerf11ee162022-04-12 11:17:45 +080026
developer2c78ce72023-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)}"
developere6cee7d2022-11-16 18:00:20 +080029
developeraa5b1b22022-12-13 17:05:25 +080030S = "${WORKDIR}/backports-${PV}"
developerf11ee162022-04-12 11:17:45 +080031
32do_filogic_patches() {
33 cd ${S}
developeraacb7292022-07-11 14:26:36 +080034 if [ ! -e patch_applied ]; then
developerf11ee162022-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
developer15ba4b82022-05-06 18:19:39 +080051 oe_runmake allnoconfig
developerf11ee162022-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
developer71d801e2022-11-02 18:14:41 +080067do_install_append() {
68 # Module
developerf11ee162022-04-12 11:17:45 +080069 cat ${D}/usr/include/linux-mac80211/Module.symvers >> ${TMPDIR}/work-shared/${MACHINE}/kernel-build-artifacts/Module.symvers
70}
developer71d801e2022-11-02 18:14:41 +080071
72PROVIDES += "kernel-module-compat"
73PROVIDES += "kernel-module-cfg80211"
74PROVIDES += "kernel-module-mac80211"