From: Xindong Xu Date: Fri, 24 Apr 2020 08:30:28 +0000 (+0800) Subject: kernel_build: support standalone build for 4.9 + R [4/9] X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7850a0a08c41d77fab1b9106d5ef1c5acb9a993f;p=GitHub%2FLineageOS%2FG12%2Fandroid_hardware_amlogic_kernel-modules_dhd-driver.git kernel_build: support standalone build for 4.9 + R [4/9] PD#SWPL-23333 Problem: need to support standalone build for 4.9 + R Solution: support standalone build for 4.9 + R Verify: deadpool Change-Id: I141c898ec9eb2aed097caf78ff025d5888cc4866 --- diff --git a/bcmdhd.100.10.315.x/Makefile b/bcmdhd.100.10.315.x/Makefile index af14ef2..88d5475 100644 --- a/bcmdhd.100.10.315.x/Makefile +++ b/bcmdhd.100.10.315.x/Makefile @@ -208,11 +208,21 @@ ARCH ?= arm64 CROSS_COMPILE ?=aarch64-linux-gnu- KDIR ?=../../../../../../common -all: bcmdhd_sdio bcmdhd_usb +#all: bcmdhd_sdio bcmdhd_usb +all: bcmdhd_sdio + +EXTRA_CFLAGS += -I$(KERNEL_SRC)/$(M)/include -I$(KERNEL_SRC)/$(M)/ +modules_install: + @$(MAKE) INSTALL_MOD_STRIP=1 M=$(M) -C $(KERNEL_SRC) modules_install + mkdir -p ${OUT_DIR}/../vendor_lib/modules + cd ${OUT_DIR}/$(M)/; find -name "*.ko" -exec cp {} ${OUT_DIR}/../vendor_lib/modules/ \; + +clean: + $(MAKE) -C $(KERNEL_SRC) M=$(M) clean $(KBUILD_OPTIONS) bcmdhd_sdio: - $(MAKE) -C $(KDIR) M=$(PWD) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) modules CONFIG_BCMDHD_SDIO=y - mv dhd.ko dhd_sdio.ko + $(MAKE) -C $(KERNEL_SRC) M=$(M) CONFIG_DHD_USE_STATIC_BUF=y CONFIG_BCMDHD_SDIO=y modules + #mv dhd.ko dhd_sdio.ko bcmdhd_usb: $(MAKE) -C $(KDIR) M=$(PWD) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) modules CONFIG_BCMDHD_USB=y