kernel_build: support standalone build for 4.9 + R [4/9]
authorXindong Xu <xindong.xu@amlogic.com>
Fri, 24 Apr 2020 08:30:28 +0000 (16:30 +0800)
committerXindong Xu <xindong.xu@amlogic.com>
Fri, 8 May 2020 07:22:58 +0000 (15:22 +0800)
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

bcmdhd.100.10.315.x/Makefile

index af14ef263aba1857742b7f128d28d518126a845e..88d5475a59c765337060cb581bcb4fc4bafe397f 100644 (file)
@@ -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