summaryrefslogtreecommitdiff
path: root/multitech/recipes/compat-wireless/ti-compat-wireless-wl12xx_r5.sp4.01.bb
blob: 00fe1c1884d6b93028b8649be127883f300663db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# This is a TI specific version of the compat-wireless recipe using a
# compat-wireless package created from the TI Systems Tested mac80211 releases.

DESCRIPTION = "ti compat-wireless drivers"
HOMEPAGE = "https://github.com/TI-OpenLink"
SECTION = "kernel/modules"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=d7810fab7487fb0aad327b76f1be7cd7"

RDEPENDS_${PN} = "wireless-tools"

inherit module

LOCAL_PR = ".3"
MACHINE_KERNEL_PR_append = "${LOCAL_PR}"

TAG="ol_R5.SP4.01"

S = "${WORKDIR}/compat-wireless-${TAG}"

# manually created tarballs from github.com/TI-OpenLink repos
SRC_URI = "http://www.multitech.net/corecdp/sources/TI-OpenLink.compat-wireless_${TAG}.tar.gz;name=compat-wireless \
           http://www.multitech.net/corecdp/sources/TI-OpenLink.compat_${TAG}.tar.gz;name=compat \
           http://www.multitech.net/corecdp/sources/TI-OpenLink.wl12xx_${TAG}.tar.gz;name=wl12xx \
           file://0001-git-version-use-compat-base-tree.patch;patchdir=../wl12xx-${TAG} \
           file://0001-compat-wireless-add-pm_runtime_enabled.patch;patchdir=../compat-${TAG} \
           file://0001-wl12xx-additional-two-members-for-wl12xx_platform_da.patch;patchdir=../wl12xx-${TAG} \
          "

SRC_URI[compat-wireless.md5sum] = "6ed4bd189d4d7470d41f9c3ce1e563e4"
SRC_URI[compat-wireless.sha256sum] = "c0dba8987bf77a9e0df5c01aaa437f481eb164d271141dad3de513d982ec9258"
SRC_URI[compat.md5sum] = "e2d82cbcc3851059cad10b7c2fad194a"
SRC_URI[compat.sha256sum] = "502371a0bb7a0f70b47d4dafd31c7741b47feb4c6aa78ae8cf0759a20261ecfd"
SRC_URI[wl12xx.md5sum] = "17f0f84f525bde35397c789af7546e07"
SRC_URI[wl12xx.sha256sum] = "167651882b38275b925f8b6e1e276f11527f198643f36e42e6f7a2a1c8b8ef11"

#SRC_URI_append = "file://0001-wl12xx-Decrease-number-of-RX-transactions.patch;patchdir=../wl12xx-${TAG} \
#                             file://0002-wl12xx-Decrease-number-of-TX-transactions.patch;patchdir=../wl12xx-${TAG} \
#"

# mts patches
SRC_URI_append = "file://wl12xx-set-power-r5.sp7.01.patch;patchdir=../wl12xx-${TAG}"

SRC_URI_append_mt100eocg-pcie-dk = " \
	file://wl12xx-irq-rising-falling-r5.sp7.01.patch;patchdir=../wl12xx-${TAG} \
	"


EXTRA_OEMAKE = "KLIB_BUILD=${STAGING_KERNEL_DIR} KLIB=${D}"

do_configure() {
    cd ${S}
    GIT_TREE="${WORKDIR}/wl12xx-${TAG}" GIT_COMPAT_TREE="${WORKDIR}/compat-${TAG}" ./scripts/admin-refresh.sh

    # create versions manually since we aren't working in git repos so admin-refresh.sh doesn't set them
    echo -e "${TAG}" > compat_version
    echo -e "${TAG}" > compat_base_tree_version
    echo "" > compat_base_tree

    # create wl12xx/version.h manually since we aren't using a git repo
    TI_VERSION="${TAG}"
    DRIVER_PATH="drivers/net/wireless/wl12xx"
    echo "static const char *wl12xx_timestamp = __TIMESTAMP__;" > ${DRIVER_PATH}/version.h
    echo "static const char *wl12xx_git_head = \"${TI_VERSION}\";" >> ${DRIVER_PATH}/version.h

    ./scripts/driver-select wl12xx
}

do_configure_append() {
    sed -i "s#@./scripts/update-initramfs## " Makefile
}

do_install() {
    oe_runmake DEPMOD=echo DESTDIR="${D}" INSTALL_MOD_PATH="${D}" LDFLAGS="" install-modules
}