From 9383625dd6b83ab30b578d1f66a46e59a3b4d281 Mon Sep 17 00:00:00 2001 From: Naveen Rawat Date: Tue, 20 Jun 2017 16:30:59 -0700 Subject: [PATCH] qcacld-3.0: Add option to avoid timestamp in version string Adding timestamp in version string is causing long compile times for wlan project. Add option to avoid timestamp so that developers can avoid long compile times. Change-Id: Iaa5fd4f432549844ae319451cb43929a2d4b68ea CRs-Fixed: 2064805 --- Kbuild | 12 +++++++++--- Kconfig | 3 +++ core/hdd/src/wlan_hdd_main.c | 6 +++++- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/Kbuild b/Kbuild index 07bc36237b09..6f7a83d98212 100644 --- a/Kbuild +++ b/Kbuild @@ -46,6 +46,10 @@ ifeq ($(KERNEL_BUILD), 0) # These are configurable via Kconfig for kernel-based builds # Need to explicitly configure for Android-based builds + ifneq ($(DEVELOPER_DISABLE_BUILD_TIMESTAMP),y) + CONFIG_BUILD_TIMESTAMP := y + endif + ifeq ($(CONFIG_ARCH_MDM9630), y) CONFIG_MOBILE_ROUTER := y endif @@ -2201,9 +2205,11 @@ ifdef WLAN_HDD_ADAPTER_MAGIC CDEFINES += -DWLAN_HDD_ADAPTER_MAGIC=$(WLAN_HDD_ADAPTER_MAGIC) endif +# inject some build related information +ifeq ($(CONFIG_BUILD_TIMESTAMP), y) +CDEFINES += -DBUILD_TIMESTAMP=\"$(shell date -u +'%Y-%m-%dT%H:%M:%SZ')\" +endif + # Module information used by KBuild framework obj-$(CONFIG_QCA_CLD_WLAN) += $(MODNAME).o $(MODNAME)-y := $(OBJS) - -# inject some build related information -CDEFINES += -DBUILD_TIMESTAMP=\"$(shell date -u +'%Y-%m-%dT%H:%M:%SZ')\" diff --git a/Kconfig b/Kconfig index 1f00105f5c28..6536ec753bb5 100644 --- a/Kconfig +++ b/Kconfig @@ -140,4 +140,7 @@ config ICMP_DISABLE_PS bool "Enable ICMP packet disable powersave feature" default n +config CONFIG_BUILD_TIMESTAMP + bool "Embed timestamp in wlan version" + default n endif # QCA_CLD_WLAN diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index a5f89a9c2681..de697336eb6d 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -280,6 +280,10 @@ void wlan_hdd_txrx_pause_cb(uint8_t vdev_id, * post processing */ uint8_t g_wlan_driver_version[] = QWLAN_VERSIONSTR; + +#ifndef BUILD_TIMESTAMP +#define BUILD_TIMESTAMP "" +#endif uint8_t g_wlan_driver_timestamp[] = BUILD_TIMESTAMP; /** @@ -10707,7 +10711,7 @@ static int __hdd_module_init(void) pr_err("%s: Loading driver v%s (%s)%s\n", WLAN_MODULE_NAME, QWLAN_VERSIONSTR, - BUILD_TIMESTAMP, + g_wlan_driver_timestamp, TIMER_MANAGER_STR MEMORY_DEBUG_STR); ret = wlan_hdd_state_ctrl_param_create();