developer | ec4ebe4 | 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 | e126222 | 2022-10-25 12:20:54 +0800 | [diff] [blame] | 9 | PV = "5.15.74" |
developer | ec4ebe4 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 10 | |
| 11 | SRC_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 | " |
developer | e126222 | 2022-10-25 12:20:54 +0800 | [diff] [blame] | 16 | SRC_URI[sha256sum] = "98098d0cab24cc76a04db738dc746a0c8d38d180398805481224f141cca06423" |
developer | ec4ebe4 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 17 | |
| 18 | DEPENDS += "virtual/kernel" |
| 19 | DEPENDS += "bison-native coreutils-native flex-native" |
| 20 | |
developer | ec4ebe4 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 21 | FILESEXTRAPATHS_prepend := "${THISDIR}/files/patches/build:" |
| 22 | FILESEXTRAPATHS_prepend := "${THISDIR}/files/patches/subsys:" |
| 23 | |
| 24 | require files/patches/build/build.inc |
| 25 | require files/patches/subsys/subsys.inc |
| 26 | |
| 27 | S = "${WORKDIR}/backports-${PV}-1" |
| 28 | |
| 29 | do_filogic_patches() { |
| 30 | cd ${S} |
developer | 410a85e | 2022-07-11 14:26:36 +0800 | [diff] [blame] | 31 | if [ ! -e patch_applied ]; then |
developer | ec4ebe4 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 32 | patch -p1 < ${WORKDIR}/0001-rdkb-fix_build_issue-mac80211-without_depmod.patch |
| 33 | touch patch_applied |
| 34 | fi |
| 35 | } |
| 36 | addtask filogic_patches after do_unpack before do_compile |
| 37 | |
| 38 | EXTRA_OEMAKE = " \ |
| 39 | KLIB_BUILD=${STAGING_KERNEL_BUILDDIR} \ |
| 40 | KLIB=${D} \ |
| 41 | " |
| 42 | |
| 43 | do_configure () { |
| 44 | make CFLAGS="" CPPFLAGS="" CXXFLAGS="" LDFLAGS="" CC="${BUILD_CC}" \ |
| 45 | LD="${BUILD_LD}" AR="${BUILD_AR}" LEX="flex" -C ${S}/kconf O=${S}/kconf conf |
| 46 | |
| 47 | cp ${WORKDIR}/config ${S}/.config |
developer | 8332376 | 2022-05-06 18:19:39 +0800 | [diff] [blame] | 48 | oe_runmake allnoconfig |
developer | ec4ebe4 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 49 | } |
| 50 | |
| 51 | do_install_prepend () { |
| 52 | mkdir -p \ |
| 53 | ${STAGING_KERNEL_BUILDDIR}/usr/include/mac80211 \ |
| 54 | ${STAGING_KERNEL_BUILDDIR}/usr/include/mac80211-backport \ |
| 55 | ${STAGING_KERNEL_BUILDDIR}/usr/include/mac80211/ath \ |
| 56 | ${STAGING_KERNEL_BUILDDIR}/usr/include/net/mac80211 |
| 57 | cp -Rf ${S}/net/mac80211/*.h ${S}/include/* ${STAGING_KERNEL_BUILDDIR}/usr/include/mac80211/ |
| 58 | cp -Rf ${S}/backport-include/* ${STAGING_KERNEL_BUILDDIR}/usr/include/mac80211-backport/ |
| 59 | cp -Rf ${S}/net/mac80211/rate.h ${STAGING_KERNEL_BUILDDIR}/usr/include/net/mac80211/ |
| 60 | cp -Rf ${S}/drivers/net/wireless/ath/*.h ${STAGING_KERNEL_BUILDDIR}/usr/include/mac80211/ath/ |
| 61 | rm -f ${STAGING_KERNEL_BUILDDIR}/usr/include/mac80211-backport/linux/module.h |
| 62 | } |
| 63 | |
developer | ca2d55d | 2022-11-02 18:14:41 +0800 | [diff] [blame^] | 64 | do_install_append() { |
| 65 | # Module |
developer | ec4ebe4 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 66 | cat ${D}/usr/include/linux-mac80211/Module.symvers >> ${TMPDIR}/work-shared/${MACHINE}/kernel-build-artifacts/Module.symvers |
developer | ca2d55d | 2022-11-02 18:14:41 +0800 | [diff] [blame^] | 67 | install -d ${D}/lib/modules/${KERNEL_VERSION}/updates/compat/ |
| 68 | install -d ${D}/lib/modules/${KERNEL_VERSION}/updates/net/wireless |
| 69 | install -d ${D}/lib/modules/${KERNEL_VERSION}/updates/net/mac80211 |
| 70 | install -m 0644 ${B}/compat/compat.ko ${D}/lib/modules/${KERNEL_VERSION}/updates/compat/ |
| 71 | install -m 0644 ${B}/net/wireless/cfg80211.ko ${D}/lib/modules/${KERNEL_VERSION}/updates/net/wireless/ |
| 72 | install -m 0644 ${B}/net/mac80211/mac80211.ko ${D}/lib/modules/${KERNEL_VERSION}/updates/net/mac80211/ |
developer | ec4ebe4 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 73 | } |
developer | ca2d55d | 2022-11-02 18:14:41 +0800 | [diff] [blame^] | 74 | |
| 75 | PROVIDES += "kernel-module-compat" |
| 76 | PROVIDES += "kernel-module-cfg80211" |
| 77 | PROVIDES += "kernel-module-mac80211" |