<commit_before>SUMMARY = "Out of tree linux wifi and bluetooth driver modules for Marvell SD8887"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"

inherit module

SRC_URI = " \
    git://git@github.com/balena-io/sd8887-mrvl.git;protocol=ssh;tag=v0.0.3 \
    file://COPYING \
"

S = "${WORKDIR}/git"

DEPENDS = "bc-native"

EXTRA_OEMAKE += "KERNELDIR='${STAGING_KERNEL_DIR}'"

do_compile() {
    cd ${S}/wlan_src
    oe_runmake
    cd ${S}/mbt_src
    oe_runmake
}

module_do_install() {
    cd ${S}/wlan_src
    install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/net/wireless
    install -m 0644 mlan.ko sd8xxx.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/net/wireless/
    cd ${S}/mbt_src
    install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/bluetooth
    install -m 0644 bt8xxx.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/bluetooth/
    cd ${S}/firmware
    install -d ${D}/lib/firmware/mrvl
    install -m 0644 15.68.7.p189/sd8887_uapsta_a2.bin ${D}/lib/firmware/mrvl/

    # blacklist mwifi* and btmrvl* kernel modules which conflict with ours
    install -d ${D}/etc/modprobe.d
    for mod in mwifiex mwifiex_sdio btmrvl btmrvl_sdio; do
        echo "blacklist ${mod}" >> ${D}/etc/modprobe.d/blacklist.conf
    done
}

FILES_${PN} += " \
    /etc/modprobe.d/blacklist.conf \
    /lib/firmware/mrvl/sd8887_uapsta_a2.bin \
"

RPROVIDES_${PN} += "sd8887-mrvl"

KERNEL_MODULE_AUTOLOAD += "bt8xxx sd8xxx"
KERNEL_MODULE_PROBECONF += "sd8xxx"
module_conf_sd8xxx = "options sd8xxx ps_mode=2"<commit_msg>sd8887-mrvl: Use firmware from version 15.68.19.p22<commit_after>SUMMARY = "Out of tree linux wifi and bluetooth driver modules for Marvell SD8887"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"

inherit module

SRC_URI = " \
    git://git@github.com/balena-io/sd8887-mrvl.git;protocol=ssh;tag=v0.0.3 \
    file://COPYING \
"

S = "${WORKDIR}/git"

DEPENDS = "bc-native"

EXTRA_OEMAKE += "KERNELDIR='${STAGING_KERNEL_DIR}'"

do_compile() {
    cd ${S}/wlan_src
    oe_runmake
    cd ${S}/mbt_src
    oe_runmake
}

module_do_install() {
    cd ${S}/wlan_src
    install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/net/wireless
    install -m 0644 mlan.ko sd8xxx.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/net/wireless/
    cd ${S}/mbt_src
    install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/bluetooth
    install -m 0644 bt8xxx.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/bluetooth/
    cd ${S}/firmware
    install -d ${D}/lib/firmware/mrvl
    install -m 0644 15.68.19.p22/sd8887_uapsta_a2.bin ${D}/lib/firmware/mrvl/

    # blacklist mwifi* and btmrvl* kernel modules which conflict with ours
    install -d ${D}/etc/modprobe.d
    for mod in mwifiex mwifiex_sdio btmrvl btmrvl_sdio; do
        echo "blacklist ${mod}" >> ${D}/etc/modprobe.d/blacklist.conf
    done
}

FILES_${PN} += " \
    /etc/modprobe.d/blacklist.conf \
    /lib/firmware/mrvl/sd8887_uapsta_a2.bin \
"

RPROVIDES_${PN} += "sd8887-mrvl"

KERNEL_MODULE_AUTOLOAD += "bt8xxx sd8xxx"
KERNEL_MODULE_PROBECONF += "sd8xxx"
module_conf_sd8xxx = "options sd8xxx ps_mode=2"
{'fraction_non_alphanumeric': 0.15068922305764412, 'fraction_numerical': 0.04824561403508772, 'mean_word_length': 3.7373887240356085, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4557077', 'n_tokens_mistral': 1422, 'n_tokens_neox': 1331, 'n_words': 218}