developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 1 | DESCRIPTION = "Linux backports" |
| 2 | HOMEPAGE = "https://backports.wiki.kernel.org" |
| 3 | SECTION = "kernel/modules" |
| 4 | LICENSE = "GPLv2" |
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" |
| 6 | |
| 7 | inherit module |
| 8 | |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 9 | PV = "2024-07-11" |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 10 | |
| 11 | SRC_URI = " \ |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 12 | file://backports-${PV}.tar.xz \ |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 13 | file://config \ |
| 14 | file://0001-rdkb-fix_build_issue-mac80211-without_depmod.patch;apply=no \ |
| 15 | " |
developer | a46f613 | 2024-03-26 14:09:54 +0800 | [diff] [blame] | 16 | SRC_URI[sha256sum] = "3bbc461121134fda9089c084a5eed577d05e7837a157edf9a3797937172a3ece" |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 17 | |
| 18 | DEPENDS += "virtual/kernel" |
| 19 | DEPENDS += "bison-native coreutils-native flex-native" |
| 20 | |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 21 | #FILESEXTRAPATHS_prepend := "${THISDIR}/files/patches-6.x/build:" |
developer | e2cfb52 | 2022-12-08 18:09:45 +0800 | [diff] [blame] | 22 | FILESEXTRAPATHS_prepend := "${THISDIR}/files/patches-6.x/subsys:" |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 23 | |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 24 | #require files/patches-6.x/build/build.inc |
developer | e2cfb52 | 2022-12-08 18:09:45 +0800 | [diff] [blame] | 25 | require files/patches-6.x/subsys/subsys.inc |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 26 | |
developer | 2c78ce7 | 2023-02-24 11:26:12 +0800 | [diff] [blame] | 27 | SRC_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)}" |
| 28 | SRC_URI_remove = "${@bb.utils.contains('DISTRO_FEATURES', 'flow_offload', '', 'file://mtk-0015-mac80211-mtk-register-.ndo_setup_tc-to-support-wifi2.patch', d)}" |
developer | e6cee7d | 2022-11-16 18:00:20 +0800 | [diff] [blame] | 29 | |
developer | aa5b1b2 | 2022-12-13 17:05:25 +0800 | [diff] [blame] | 30 | S = "${WORKDIR}/backports-${PV}" |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 31 | |
| 32 | do_filogic_patches() { |
| 33 | cd ${S} |
developer | aacb729 | 2022-07-11 14:26:36 +0800 | [diff] [blame] | 34 | if [ ! -e patch_applied ]; then |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 35 | patch -p1 < ${WORKDIR}/0001-rdkb-fix_build_issue-mac80211-without_depmod.patch |
| 36 | touch patch_applied |
| 37 | fi |
| 38 | } |
| 39 | addtask filogic_patches after do_unpack before do_compile |
| 40 | |
| 41 | EXTRA_OEMAKE = " \ |
| 42 | KLIB_BUILD=${STAGING_KERNEL_BUILDDIR} \ |
| 43 | KLIB=${D} \ |
| 44 | " |
| 45 | |
| 46 | do_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 |
developer | 15ba4b8 | 2022-05-06 18:19:39 +0800 | [diff] [blame] | 51 | oe_runmake allnoconfig |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 52 | } |
| 53 | |
| 54 | do_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 | |
developer | 71d801e | 2022-11-02 18:14:41 +0800 | [diff] [blame] | 67 | do_install_append() { |
| 68 | # Module |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 69 | cat ${D}/usr/include/linux-mac80211/Module.symvers >> ${TMPDIR}/work-shared/${MACHINE}/kernel-build-artifacts/Module.symvers |
| 70 | } |
developer | 71d801e | 2022-11-02 18:14:41 +0800 | [diff] [blame] | 71 | |
| 72 | PROVIDES += "kernel-module-compat" |
| 73 | PROVIDES += "kernel-module-cfg80211" |
| 74 | PROVIDES += "kernel-module-mac80211" |