OSDN Git Service

Update patches of wl driver
[android-x86/external-kernel-drivers.git] / wl / Android.mk
1 #
2 # Copyright (C) 2018 The Android-x86 Open Source Project
3 #
4 # Licensed under the GNU General Public License Version 2 or later.
5 # You may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #      http://www.gnu.org/licenses/gpl.html
9 #
10
11 LOCAL_PATH := $(my-dir)
12 LOCAL_MODULE := $(notdir $(LOCAL_PATH))
13 EXTRA_KERNEL_MODULE_PATH_$(LOCAL_MODULE) := $(LOCAL_PATH)
14
15 # parts of build/tasks/kernel.mk
16
17 TARGET_KERNEL_ARCH ?= $(TARGET_ARCH)
18 WL_PATH := $(TARGET_OUT_INTERMEDIATES)/kmodule/wl
19 WL_SRC := $(WL_PATH)/hybrid-v35$(if $(filter x86,$(TARGET_KERNEL_ARCH)),,_64)-nodebug-pcoem-6_30_223_271.tar.gz
20 WL_LIB := $(WL_PATH)/lib$(if $(filter x86,$(TARGET_KERNEL_ARCH)),32,64)
21
22 WL_PATCHES := \
23         wl.patch \
24         002-rdtscl.patch \
25         003-linux47.patch \
26         004-linux48.patch \
27         005-debian-fix-kernel-warnings.patch \
28         006-linux411.patch \
29         007-linux412.patch \
30         008-linux415.patch \
31         009-fix_mac_profile_discrepancy.patch \
32
33 $(WL_SRC):
34         @echo Downloading $(@F)...
35         $(hide) mkdir -p $(@D) && curl -k https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/$(@F) > $@
36
37 $(WL_LIB): $(WL_SRC) $(addprefix $(LOCAL_PATH)/,$(WL_PATCHES))
38         $(hide) tar zxf $< -C $(@D) --overwrite -m && \
39                 rm -rf $@ && mv $(@D)/lib $@ && touch $@ && \
40                 cat $(filter %.patch,$^) | patch -p1 -d $(@D)
41
42 $(WL_PATH): $(WL_LIB)