From: Jan Altensen Date: Tue, 3 Aug 2021 09:39:43 +0000 (+0200) Subject: dhd: make driver version configurable X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f97b9b55a996335ca31f33b30cb4535a66d2373b;p=GitHub%2FLineageOS%2FG12%2Fandroid_hardware_amlogic_kernel-modules_dhd-driver.git dhd: make driver version configurable Change-Id: Ib7a9932601fdd1aba4fc1eef42ba6247203372ee --- diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..0e027e8 --- /dev/null +++ b/Android.mk @@ -0,0 +1,41 @@ +# +# Copyright (C) 2021 The LineageOS Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +LOCAL_PATH := $(call my-dir) + +ifeq ($(TARGET_PREBUILT_KERNEL),) +TARGET_DHD_VERSION ?= bcmdhd.101.10.240.x +DHD_PATH := $(abspath $(call my-dir))/$(TARGET_DHD_VERSION) + +include $(CLEAR_VARS) + +LOCAL_MODULE := dhd +LOCAL_MODULE_SUFFIX := .ko +LOCAL_MODULE_CLASS := ETC +LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/lib/modules + +_dhd_intermediates := $(call intermediates-dir-for,$(LOCAL_MODULE_CLASS),$(LOCAL_MODULE)) +_dhd_ko := $(_dhd_intermediates)/$(LOCAL_MODULE)$(LOCAL_MODULE_SUFFIX) +KERNEL_OUT := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ + +$(_dhd_ko): $(KERNEL_OUT)/arch/$(KERNEL_ARCH)/boot/$(BOARD_KERNEL_IMAGE_NAME) + @mkdir -p $(dir $@) + @cp -R $(DHD_PATH)/* $(dir $@)/ + $(hide) +$(KERNEL_MAKE_CMD) $(PATH_OVERRIDE) $(KERNEL_MAKE_FLAGS) -C $(_dhd_intermediates) M=$(abspath $(_dhd_intermediates)) ARCH=$(TARGET_KERNEL_ARCH) $(KERNEL_CROSS_COMPILE) KERNEL_SRC=$(abspath $(KERNEL_OUT)) bcmdhd_sdio + $(KERNEL_TOOLCHAIN_PATH)strip --strip-unneeded $@; + +include $(BUILD_SYSTEM)/base_rules.mk +endif diff --git a/bcmdhd.101.10.240.x/Android.mk b/bcmdhd.101.10.240.x/Android.mk deleted file mode 100644 index 759c43b..0000000 --- a/bcmdhd.101.10.240.x/Android.mk +++ /dev/null @@ -1,40 +0,0 @@ -# -# Copyright (C) 2021 The LineageOS Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -LOCAL_PATH := $(call my-dir) - -ifeq ($(TARGET_PREBUILT_KERNEL),) -DHD_PATH := $(abspath $(call my-dir)) - -include $(CLEAR_VARS) - -LOCAL_MODULE := dhd -LOCAL_MODULE_SUFFIX := .ko -LOCAL_MODULE_CLASS := ETC -LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/lib/modules - -_dhd_intermediates := $(call intermediates-dir-for,$(LOCAL_MODULE_CLASS),$(LOCAL_MODULE)) -_dhd_ko := $(_dhd_intermediates)/$(LOCAL_MODULE)$(LOCAL_MODULE_SUFFIX) -KERNEL_OUT := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ - -$(_dhd_ko): $(KERNEL_OUT)/arch/$(KERNEL_ARCH)/boot/$(BOARD_KERNEL_IMAGE_NAME) - @mkdir -p $(dir $@) - @cp -R $(DHD_PATH)/* $(dir $@)/ - $(hide) +$(KERNEL_MAKE_CMD) $(PATH_OVERRIDE) $(KERNEL_MAKE_FLAGS) -C $(_dhd_intermediates) M=$(abspath $(_dhd_intermediates)) ARCH=$(TARGET_KERNEL_ARCH) $(KERNEL_CROSS_COMPILE) KERNEL_SRC=$(abspath $(KERNEL_OUT)) bcmdhd_sdio - $(KERNEL_TOOLCHAIN_PATH)strip --strip-unneeded $@; - -include $(BUILD_SYSTEM)/base_rules.mk -endif