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 | 0b3fe20 | 2022-04-19 10:19:57 +0800 | [diff] [blame] | 9 | PV = "5.15.33" |
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 | 0b3fe20 | 2022-04-19 10:19:57 +0800 | [diff] [blame] | 16 | SRC_URI[sha256sum] = "1b6b3bded4c81814ebebe2d194c2f8966d2399005b85ebb0557285b6e73f5422" |
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 | |
| 21 | PROVIDES += "kernel-module-compat" |
| 22 | PROVIDES += "kernel-module-cfg80211" |
| 23 | PROVIDES += "kernel-module-mac80211" |
| 24 | |
| 25 | FILESEXTRAPATHS_prepend := "${THISDIR}/files/patches/build:" |
| 26 | FILESEXTRAPATHS_prepend := "${THISDIR}/files/patches/subsys:" |
| 27 | |
| 28 | require files/patches/build/build.inc |
| 29 | require files/patches/subsys/subsys.inc |
| 30 | |
| 31 | S = "${WORKDIR}/backports-${PV}-1" |
| 32 | |
| 33 | do_filogic_patches() { |
| 34 | cd ${S} |
| 35 | if [ ! -e "/sbin/depmod" ] && [ ! -e patch_applied ]; then |
| 36 | patch -p1 < ${WORKDIR}/0001-rdkb-fix_build_issue-mac80211-without_depmod.patch |
| 37 | touch patch_applied |
| 38 | fi |
| 39 | } |
| 40 | addtask filogic_patches after do_unpack before do_compile |
| 41 | |
| 42 | EXTRA_OEMAKE = " \ |
| 43 | KLIB_BUILD=${STAGING_KERNEL_BUILDDIR} \ |
| 44 | KLIB=${D} \ |
| 45 | " |
| 46 | |
| 47 | do_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 |
developer | 8332376 | 2022-05-06 18:19:39 +0800 | [diff] [blame^] | 52 | oe_runmake allnoconfig |
developer | ec4ebe4 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 53 | } |
| 54 | |
| 55 | do_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 | |
| 68 | do_install_append () { |
| 69 | cat ${D}/usr/include/linux-mac80211/Module.symvers >> ${TMPDIR}/work-shared/${MACHINE}/kernel-build-artifacts/Module.symvers |
| 70 | } |