The kernel is transitioning from AndroidKernelModule.mk to
Build_external_kernelmodule.mk as the helper makefile for building
DLKMs. As the new makefile was introduced for the "taro" platform,
initially a platform check was introduced to determine which makefile
to include. However this is not a scalable approach.
Recently the flag TARGET_USES_KERNEL_PLATFORM was added to the build
system, so update the logic such that when this flag is set to 'true'
we will use Build_external_kernelmodule.mk.
Change-Id: I2200b27753263b931cebdbff5445d50b1fc2b94f
CRs-Fixed: 2913254
Currently Android.mk uses $(shell) to create symlinks. Due to the way
this is used these commands will run for every build, even if the
symlinks are already present. Per the Hermetic Build feature we should
not execute any unnecessary commands, especially for incremental
builds where no changes are present from the prior build. Therefore
change the symlink logic to use the Android symlink-file rule-based
mechanism.
Change-Id: I47b9de34eec0faa193263765a0a86befb5e92ced
CRs-Fixed: 2907684
The current multi-ko support is achieved by creating, during the
actual build process, target-specific .<chip> symbolic links beneath
the qcacld-3.0 folder. Unfortunately this mechanism violates the
requirements of the Hermetic Build feature which requires that the
source directory not be modified during the build process.
To satisfy this requirement remove the dynamic creation of symbolic
links from Android.mk, and instead staticially instantiate all of the
required symbolic links in the git project.
Change-Id: I7d75bb6a82fd27d8925d53529b4252b782457bc8
CRs-Fixed: 2896976
wlan_hdd_state_ctrl_param_create() creates a control file that is
used to synchronize the wlan driver with the Wi-Fi HAL in
userspace.
Currently the driver creates the file at the path /dev/<module>.
The WIFI_DRIVER_STATE_CTRL_PARAM configuration item defines the path
that the Wi-Fi HAL uses, and this is /dev/wlan.
So when the driver is built with a module name of "wlan" the file is
created at the expected path. However when the driver is built with a
different name, as is done when TARGET_MULTI_WLAN is enabled, the file
is not created at the expected path.
Therefore change the driver to always create the file at the path
specified in the WIFI_DRIVER_STATE_CTRL_PARAM configuration item.
In addition do not even enable the functionality if the
WIFI_DRIVER_STATE_CTRL_PARAM configuration item is not set
(i.e. on non-Android platforms).
Change-Id: I8a7f0a9b22e3f49d02f896150bd452f80af9c022
CRs-Fixed: 2905381
The current multi-ko support is achieved by creating, during the
actual build process, target-specific .<chip> folders beneath the
qcacld-3.0 folder, and then populating those folders with a variety of
symbolic links. Unfortunately this mechanism violates the requirements
of the Hermetic Build feature which requires that the source directory
not be modified during the build process.
One solution to this problem is to actually add the target-specific
folders, along with the included symlinks, to the qcacld-3.0 git
project. But one maintenance issue with this approach is that these
folders of symlinks would require update when the qcacld-3.0 directory
structure changes.
An alternative solution is that instead of having each .<chip> file be
a folder of symlinks, let each .<chip> file be symbolic link. This
approach reduces the maintenance issue since you only need to add a
new .<chip> symbolic link when a new target is added; no changes are
required to the symbolic links when a new qcacld-3.0 folder is added.
As a precursor to transitioning to this alternate solution, update the
current build mechanism such that only .<chip> symbolic links are
created in the source directory, and update the remainder of the
multi-ko logic to align with the resulting change in pathnames.
A subsequent change can remove the dynamic symbolic link creation, and
instead add the symbolic links to the git project.
Change-Id: Ie3df49217ffec260085285b1ae25113c3a943e9b
CRs-Fixed: 2889020
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
Currently the SPF support is triggered when there is more than one
target specified in TARGET_WLAN_CHIP. For taro we know we need
multi-target support in the future, but we only want to support a
single target during bringup. However we want all procedures
established during the bringup process to be applicable to the final
product. Therefore update the logic such that SPF support is triggered
whenever the TARGET_WLAN_CHIP is anything other than the default value
of 'wlan'.
Change-Id: I0a0671d2ebbdb85985bc57376b4acd2bd79a16ae
CRs-Fixed: 2890488
The qcacld-3.0 Android.mk is unique in that it can be called
recursively. This behavior can make it difficult to debug build
issues. To help alleviate this problem, add a user function to
Android.mk to allow debug information to be logged, and add a few logs
which will be useful in debugging recursion issues. In addition change
a few $(warning) calls to use the infrastructure since under normal
use the Android.mk should be silent.
Change-Id: I660ceddaf53e42c331deba5d33b32360b549cfc7
CRs-Fixed: 2890484
For Generic Kernel Image builds kernel scripts take care of module
installation on required parition. Thus update wlan driver Android.mk
to not create symlink if WIFI_DRIVER_INSTALL_TO_KERNEL_OUT is set to
true by GKI enabled android build system.
Change-Id: Ie0b6de98ead5f7e5eba106f0a98901f6c7ee3861
CRs-fixed: 2881952
Pass a new flag to the Kbuild and add a compile flag
to enable the BUILD_TAG information.
Change-Id: Ic9bc331b64e7cbf627f5f99758f4d556328cda10
CRs-Fixed: 2865654
The Android build infrastructure is transitioning to a new
mechansim for building external modules. Update the qcacld-3.0
driver to use that mechanism for toro builds.
Change-Id: I7d73bc1ccbde5ecc74c661fd6e31525b266413cd
CRs-Fixed: 2852877
Currently WLAN_PROFILE is overridden to default in all cases.
In many targets, defconfig other than default_defconfig needs
to be picked, so set WLAN_PROFILE to default only if it is not
set before.
Change-Id: Ia9a5ad7c9eedd56be59418371867107258e65ea0
CRs-Fixed: 2818090
Currently WCNSS_qcom_cfg.ini soft link is generated only when
GENER_ODM_IMAGE is not defined. However, the judgement made
based on GENER_ODM_IMAGE will cause a driver load failure on
talos_au.
With this enhancement, WCNSS_qcom_cfg.ini soft link will be
generated when:
1)GENERIC_ODM_IMAGE is not true, or
2)TARGET_BOARD_AUTO is true
Change-Id: Ia5f138761da12f2cd14a3c033bdb113d3b47e5fe
CRs-Fixed: 2776869
Top layer makefile can pass chip specific build options incase of
unified driver build.
Change-Id: I76a9830e56cfefdb3c99ac05fe43071cf5ebccab
CRs-Fixed: 2724605
Check WLAN_CFG_USE_DEFAULT to use default profile in case
TARGET_MULTI_WLAN is defined. Default configuration will be used
to build WLAN driver for multiple chipsets.
Change-Id: Ib5b64fd8213f401b043aa7792cc8ac734cd722b8
CRs-Fixed: 2661827
In ODM specific targets false softlink is getting created for
ini file from vendor partition. Correct softlink for ini on odm
specific targets is created from odm partition. So, Avoid softlink
creation for ini from vendor partition on ODM specific targets.
Change-Id: I2ddf7d8b67d90106686c6a8118d0109fb8be72af
CRs-Fixed: 2641694
Module depends on msm headers which are not yet available. Thus, disable
the module under QMAA.
Change-Id: I91000cb3140f7d47e418c6a97c9dcf8b464ecdd2
CRs-Fixed: 2529636
To build multiple ko files, android build system will
generate some temporary dirs, names of wihch are started
with '~'.
Replace these '~' with '.' to hide the temporary dirs.
CRs-Fixed: 2522153
Change-Id: Ic2606afee07c068803fd9b0446d20851e1e06e03
Introduce a new Kbuild option 'WLAN_CFG_OVERRIDE' to override
wlan configurations.
Value of this option is a list, which includes the config items
those need to override, its pattern is as below:
WLAN_CFG_OVERRIDE="WLAN_CFG_1=n WLAN_CFG_2=y WLAN_CFG_3=n"
For LA build, it makes use of this Kbuild option, and introduces
new android build options for different products:
WLAN_CFG_OVERRIDE_wlan: for single wlan driver case.
WLAN_CFG_OVERRIDE_<chip>: for multiple wlan drivers case, for
example WLAN_CFG_OVERRIDE_qca6390 and WLAN_CFG_OVERRIDE_qca6174.
Change-Id: I8e062c62d36e076a79032a47aa04501d4543a9c8
CRs-Fixed: 2515905
From Android Q onwards LOCAL_MODULE_TAGS set to debug
variant is deprecated, thus set LOCAL_MODULE_TAGS
to optional variant by removing LOCAL_MODULE_TAGS.
If a module doesn't specify a tag (by LOCAL_MODULE_TAGS),
its tag defaults to optional.
Change-Id: Iecadd3bf07a375e2cfb044b400330c490f2023b0
CRs-Fixed: 2452507
Introduces a new build flag 'DYNAMIC_SINGLE_CHIP':
If DYNAMIC_SINGLE_CHIP is defined, which means there
are multiple possible drivers, but only requires one
instance of driver at a time. In such case, leave
MULTI_IF_NAME undefined, no matter what the module
name is, only prepend DYNAMIC_SINGLE_CHIP to names
of firmware/mac/ini files.
Take path of driverdump and ini file for example:
If both MULTI_IF_NAME and DYNAMIC_SINGLE_CHIP are not
defined, the paths are:
driverdump: '/proc/debugdriver/driverdump'
ini: '/<fw_root>/wlan/qca_cld/WCNSS_qcom_cfg.ini'
If DYNAMIC_SINGLE_CHIP is defined as 'qca6174':
driverdump: '/proc/debugdriver/driverdump'
ini: '/<fw_root>/wlan/qca_cld/qca6174/WCNSS_qcom_cfg.ini'
If MULTI_IF_NAME is defined as 'qca6174' and
DYNAMIC_SINGLE_CHIP is not defined:
driverdump: '/proc/debugdriverqca6174/driverdump'
ini: '/<fw_root>/wlan/qca_cld/qca6174/WCNSS_qcom_cfg.ini'
On LA platform, DYNAMIC_SINGLE_CHIP is controlled by
TARGET_WLAN_CHIP and TARGET_MULTI_WLAN:
If more than one WLAN devices are enabled in TARGET_WLAN_CHIP,
and TARGET_MULTI_WLAN is not set to 'true',
DYNAMIC_SINGLE_CHIP will be set to the device name, to
avoid name conflicts of firmware/mac/ini files;
meanwhile, MODNAME is set to 'wlan', then paths for
debugging are not changed.
Otherwise, MULTI_IF_NAME will be defined if requires
multiple instances of driver.
Change-Id: I22ed34d80d3540451bf8b891243c6cdac5a73d7e
CRs-Fixed: 2402432
ANDROID_BUILD_TOP variable is being deprecated and thus all paths are
assumed to be relative to the top directory.
However, this is causing problem when some of the paths are constructed
in the Android build system and used in the non-Android makefiles that
are usually executed NOT at the top directory but at a sub directory
using -C option. As a result, the relative path from the Android build
system become invalid in the non-Android makefiles.
In order to overcome the restriction, ANDROID_BUILD_TOP is manually
constructed when invoking the non-Android makefiles by using $$(pwd).
The non-Android makefiles are expected to construct the absolute path
by prepending ANDROID_BUILD_TOP to any path that came from the Android
build system.
Specifically, Kbuild is modified so that ANDROID_BUILD_TOP is prepended
to WLAN_ROOT and WLAN_COMMON_INC to make them absolute paths.
Change-Id: Ic34de7a2bc407153085eb3eb154d6dd71f04eedb
CRs-Fixed: 2328210
Move wlan_mac.bin symlink from /persist to /mnt/vendor/persist as
/persist doesn't exist in the filesystem anymore.
Change-Id: Ibb4b7f133222bf5431f754ef5fbf3b3db1ef8729
CRs-Fixed: 2327274
In Treble bsed architecture, wlan driver generated
can be part of vendor image or system image. Symbolic
link is corrected so that wlan.ko points to correct path
irrespective of split/non-split image.
Change-Id: Ia3f237d2797e4526bfd6c089e54df1622886bf56
CRs-Fixed: 2078121
Fix the location to include /lib/modules for Treble enabled
builds. This was incorrectly added when the change was made
to support installing WLAN driver to KERNEL_MODULES_OUT.
CRs-Fixed: 2078384
Change-Id: Iafacc998922b2693f7e8e228a72cbc9a2f71b081
Add support to install WLAN module to KERNEL_MODULES_OUT.
During full treble build, modules installed directly in the
vendor locations gets wiped out during the build process.
CRs-Fixed: 2076401
Change-Id: I8229708da7c4d1a1c366b5b305f481ccb52f3833
Add the change to build and set WLAN driver as default for different
targets based on target specific flags WIFI_DRIVER_BUILT and
WIFI_DRIVER_DEFAULT.
KERNEL_TO_BUILD_ROOT_OFFSET needs to be set a default value if upper
level makefiles do not define it.
Change-Id: I4768b8c75a5d4042d01c3ddfb67b20c13e42463a
CRs-fixed: 1005069
Under new kernel tree structure, the kernel can be either directly
under build_root/kernel or in a subdirectory within it. The WLAN
module has a hard coded assumption for the header files path of
newly added common project. Hence add the change to correct it based
on KERNEL_TO_BUILD_ROOT_OFFSET.
Change-Id: Ibe3a61a62cd2b2cea65c5a14f2bf70b998787f54
CRs-fixed: 992940
The kernel can be either directly under build_root/kernel or in a
subdirectory within it. The WLAN module has a hard coded assumption
for the path. Hence add the changes to correct it based on flags
TARGET_KERNEL_VERSION and KERNEL_TO_BUILD_ROOT_OFFSET.
Change-Id: Ic4738da5c414a1ce1d74e2b42b918b906f5fda98
CRs-fixed: 992940
qcacld-3.0: Cleanup proprietary and old stale lines
Restrict build to msm8994,96,98,msmcobalt platform
variants.
Change-Id: Ic89ce4a786e884c24ab20ee201d9558f6cccc867
CRs-Fixed: 688141
Need to adjust relative path to common repository after
relocating the base of the mcl git project.
Change-Id: Ib2cdab8756ec294e00e391d21a400ec82de76c70
CRs-Fixed: 688141
With common code is separated into qca-wifi-host-cmn project, add
Kbuild instructions to build along with qca-wifi-host-cmn project.
Change-Id: Ie28d348ed6874e5b2ee0d1fb8d9451513db9771a
CRs-fixed: 978124
qcacld-3.0: Initial snapshot of ihelium wlan driver
to match code-scanned SU Release 5.0.0.139. This is
open-source version of wlan for next Android release.
Change-Id: Icf598ca97da74f84bea607e4e902d1889806f507