Browse Source

qcacld-3.0: Use symbolic link to reference qca-wifi-host-cmn

A recurring issue is that, due to the large number of object files and
the long pathnames to those files, a build of the qca_cld3_wlan.ko may
fail with an E2BIG error. This can occur when a shell command created
by the build system exceeds the max size of a command that the shell
can handle. This usually occurs when linking all of the individual
object files into the final wlan.o.

Object files from the qcacld-3.0 project begin with:
<prefix>/vendor/qcom/opensource/wlan/qcacld-3.0

Object files from the qca-wifi-host-cmn project begin with:
<prefix>/vendor/qcom/opensource/wlan/qcacld-3.0/../qca-wifi-host-cmn

To shorten the qca-wifi-host-cmn paths add the following symbolic link:
qcacld-3.0/cmn => ../qca-wifi-host-cmn

With this in place object files from the qca-wifi-host-cmn project
will begin with:
<prefix>/vendor/qcom/opensource/wlan/qcacld-3.0/cmn

This will save 17 characters per qca-wifi-host-cmn object file.

Change-Id: I104afdc48e5335aa232bac988c4c652144cd4e58
CRs-Fixed: 2893361
Jeff Johnson 4 years ago
parent
commit
e5d65fc87b
3 changed files with 6 additions and 9 deletions
  1. 3 7
      Android.mk
  2. 2 2
      Kbuild
  3. 1 0
      cmn

+ 3 - 7
Android.mk

@@ -62,9 +62,7 @@ $(shell find $(LOCAL_WLAN_BLD_DIR)/qcacld-3.0/ -maxdepth 1 \
 	-name '.*' ! -name '.git' -exec rm -rf {} +)
 
 $(foreach chip, $(TARGET_WLAN_CHIP), \
-	$($(shell mkdir -p $(LOCAL_WLAN_BLD_DIR)/qcacld-3.0/.$(chip); \
-	ln -sf $(LOCAL_WLAN_BLD_DIR)/qca-wifi-host-cmn \
-		$(LOCAL_WLAN_BLD_DIR)/qcacld-3.0/.$(chip)/qca-wifi-host-cmn); \
+	$($(shell mkdir -p $(LOCAL_WLAN_BLD_DIR)/qcacld-3.0/.$(chip)); \
 	$(foreach node, \
 	$(shell find $(LOCAL_WLAN_BLD_DIR)/qcacld-3.0/ -maxdepth 1 \
 		! -name '.*' ! -name '*~' \
@@ -85,7 +83,6 @@ ifeq ($(LOCAL_DEV_NAME), qcacld-3.0)
 
 LOCAL_DEV_NAME := wlan
 LOCAL_MOD_NAME := wlan
-CMN_OFFSET := ..
 LOCAL_SRC_DIR :=
 TARGET_FW_DIR := firmware/wlan/qca_cld
 TARGET_CFG_PATH := /vendor/etc/wifi
@@ -94,7 +91,6 @@ TARGET_MAC_BIN_PATH := /mnt/vendor/persist
 else
 
 LOCAL_SRC_DIR := .$(LOCAL_DEV_NAME)
-CMN_OFFSET := .
 # Use default profile if WLAN_CFG_USE_DEFAULT defined.
 ifeq ($(WLAN_CFG_USE_DEFAULT),)
 WLAN_PROFILE := $(LOCAL_DEV_NAME)
@@ -123,8 +119,8 @@ endif # platform-sdk-version
 ###########################################################
 # This is set once per LOCAL_PATH, not per (kernel) module
 KBUILD_OPTIONS := WLAN_ROOT=$(WLAN_BLD_DIR)/qcacld-3.0/$(LOCAL_SRC_DIR)
-KBUILD_OPTIONS += WLAN_COMMON_ROOT=$(CMN_OFFSET)/qca-wifi-host-cmn
-KBUILD_OPTIONS += WLAN_COMMON_INC=$(WLAN_BLD_DIR)/qca-wifi-host-cmn
+KBUILD_OPTIONS += WLAN_COMMON_ROOT=cmn
+KBUILD_OPTIONS += WLAN_COMMON_INC=$(WLAN_BLD_DIR)/qcacld-3.0/cmn
 KBUILD_OPTIONS += WLAN_FW_API=$(WLAN_BLD_DIR)/fw-api
 KBUILD_OPTIONS += WLAN_PROFILE=$(WLAN_PROFILE)
 KBUILD_OPTIONS += DYNAMIC_SINGLE_CHIP=$(DYNAMIC_SINGLE_CHIP)

+ 2 - 2
Kbuild

@@ -11,13 +11,13 @@ ifeq ($(KERNEL_BUILD), y)
 	# Need to explicitly define for Kernel-based builds
 	MODNAME := wlan
 	WLAN_ROOT := drivers/staging/qcacld-3.0
-	WLAN_COMMON_ROOT := ../qca-wifi-host-cmn
+	WLAN_COMMON_ROOT := cmn
 	WLAN_COMMON_INC := $(WLAN_ROOT)/$(WLAN_COMMON_ROOT)
 	WLAN_FW_API := $(WLAN_ROOT)/../fw-api/
 	WLAN_PROFILE := default
 endif
 
-WLAN_COMMON_ROOT ?= ../qca-wifi-host-cmn
+WLAN_COMMON_ROOT ?= cmn
 WLAN_COMMON_INC ?= $(WLAN_ROOT)/$(WLAN_COMMON_ROOT)
 WLAN_FW_API ?= $(WLAN_ROOT)/../fw-api/
 WLAN_PROFILE ?= default

+ 1 - 0
cmn

@@ -0,0 +1 @@
+../qca-wifi-host-cmn