blob: 35a5a5fd0cf35c839049aa2c8a570e4bfd527407 [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
9PV = "5.15.8"
10
11SRC_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 "
16SRC_URI[sha256sum] = "9f71b659c034f19d156532ec780fcb606cee3c4ccc42e2f8ef18dd3e9f1b6820"
17
18DEPENDS += "virtual/kernel"
19DEPENDS += "bison-native coreutils-native flex-native"
20
21PROVIDES += "kernel-module-compat"
22PROVIDES += "kernel-module-cfg80211"
23PROVIDES += "kernel-module-mac80211"
24
25FILESEXTRAPATHS_prepend := "${THISDIR}/files/patches/build:"
26FILESEXTRAPATHS_prepend := "${THISDIR}/files/patches/subsys:"
27
28require files/patches/build/build.inc
29require files/patches/subsys/subsys.inc
30
31S = "${WORKDIR}/backports-${PV}-1"
32
33do_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}
40addtask filogic_patches after do_unpack before do_compile
41
42EXTRA_OEMAKE = " \
43 KLIB_BUILD=${STAGING_KERNEL_BUILDDIR} \
44 KLIB=${D} \
45 "
46
47do_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
52 oe_runmake oldconfig
53}
54
55do_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
68do_install_append () {
69 cat ${D}/usr/include/linux-mac80211/Module.symvers >> ${TMPDIR}/work-shared/${MACHINE}/kernel-build-artifacts/Module.symvers
70}