[PATCH] wcn36xx_msm: use KLIB_BUILD instead of KLIB

Eugene Krasnikov k.eugene.e at gmail.com
Thu Mar 27 05:04:18 EDT 2014


Then why do we need to pass KLIB_BUILD as an extra parameter to the
MAKE command?

2014-03-27 1:29 GMT+00:00 Jason Mobarak <jam at cozybit.com>:
> On Wed, Mar 26, 2014 at 9:52 AM, Eugene Krasnikov <k.eugene.e at gmail.com> wrote:
>>> -       $(MAKE) ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) -C $(KLIB) SUBDIRS=$(PWD) modules
>>> +       $(MAKE) ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) -C $(KLIB_BUILD) SUBDIRS=$(PWD) modules
>>
>> If you remove this line then where is KLIB used?.
>
> Afaict, it will get picked up from the environment:
>
> make[1]: Entering directory `/opt/jam/dev/xperiaz/out/yuga/kernel.build'
> KLIB /opt/jam/dev/xperiaz/kernel/xz
> KLIB_BUILD /opt/jam/dev/xperiaz/out/yuga/kernel.build
> KLIB /opt/jam/dev/xperiaz/kernel/xz
> KLIB_BUILD /opt/jam/dev/xperiaz/out/yuga/kernel.build
>   Building modules, stage 2.
>   MODPOST 1 modules
>
> -jmob
>
>> 2014-03-24 19:20 GMT+00:00 Jason Mobarak <jam at cozybit.com>:
>>> If not building within the kernel tree, KLIB and KLIB_BUILD can point to
>>> different directories.  Allow for this by conditionally configuring
>>> KLIB, and KLIB_BUILD if they haven't already been setup.
>>>
>>> Signed-off-by: Jason Mobarak <jam at cozybit.com>
>>> ---
>>>  wcn36xx_msm/Makefile | 10 ++++------
>>>  1 file changed, 4 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/wcn36xx_msm/Makefile b/wcn36xx_msm/Makefile
>>> index 80efafc..987e057 100644
>>> --- a/wcn36xx_msm/Makefile
>>> +++ b/wcn36xx_msm/Makefile
>>> @@ -1,7 +1,7 @@
>>>  # make it possible to set/override android variables in .config
>>>  -include .config
>>>
>>> -CROSS_COMPILE?=$(ARM_EABI_TOOLCHAIN)/arm-eabi-
>>> +CROSS_COMPILE ?= $(ARM_EABI_TOOLCHAIN)/arm-eabi-
>>>
>>>  ifneq ($(KERNELRELEASE),)
>>>         wcn36xx_msm-objs                += \
>>> @@ -9,11 +9,12 @@ ifneq ($(KERNELRELEASE),)
>>>
>>>         obj-m := wcn36xx_msm.o
>>>  else
>>> -       KLIB    := $(ANDROID_PRODUCT_OUT)/obj/KERNEL_OBJ/
>>> +       KLIB ?= $(ANDROID_PRODUCT_OUT)/obj/KERNEL_OBJ/
>>> +       KLIB_BUILD ?= $(ANDROID_PRODUCT_OUT)/obj/KERNEL_OBJ/
>>>         PWD     := $(shell pwd)
>>>
>>>  default:
>>> -       $(MAKE) ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) -C $(KLIB) SUBDIRS=$(PWD) modules
>>> +       $(MAKE) ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) -C $(KLIB_BUILD) SUBDIRS=$(PWD) modules
>>>
>>>  clean:
>>>         rm -rf  *.ko *.mod.* *.o .*.o.d .*.cmd .tmp_versions Module.symvers *.order \
>>> @@ -23,6 +24,3 @@ cscope:
>>>         cscope -b
>>>
>>>  endif
>>> -
>>> -
>>> -
>>> --
>>> 1.9.1
>>>
>>>
>>> _______________________________________________
>>> wcn36xx mailing list
>>> wcn36xx at lists.infradead.org
>>> http://lists.infradead.org/mailman/listinfo/wcn36xx
>>
>>
>>
>> --
>> Best regards,
>> Eugene



-- 
Best regards,
Eugene



More information about the wcn36xx mailing list