* [RFC PATCH 1/2] scripts/kconfig/Makefile: Allow KBUILD_DEFCONFIG to be a target @ 2015-09-23 5:40 Michael Ellerman 2015-09-23 5:40 ` [RFC PATCH 2/2] powerpc: Add ppc64le_defconfig Michael Ellerman ` (2 more replies) 0 siblings, 3 replies; 15+ messages in thread From: Michael Ellerman @ 2015-09-23 5:40 UTC (permalink / raw) To: linuxppc-dev; +Cc: linux-kernel, linux-kbuild, yann.morin.1998, mmarek Arch Makefiles can set KBUILD_DEFCONFIG to tell kbuild the name of the defconfig that should be built by default. However currently there is an assumption that KBUILD_DEFCONFIG points to a file at arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG). We would like to use a target, using merge_config, as our defconfig, so adapt the logic in scripts/kconfig/Makefile to allow that. To minimise the chance of breaking anything, we first check if KBUILD_DEFCONFIG is a file, and if so we do the old logic. If it's not a file, then we call the top-level Makefile with KBUILD_DEFCONFIG as the target. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> --- scripts/kconfig/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index aceaaed09811..b2b9c87cec50 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -96,9 +96,12 @@ savedefconfig: $(obj)/conf defconfig: $(obj)/conf ifeq ($(KBUILD_DEFCONFIG),) $< $(silent) --defconfig $(Kconfig) -else +else ifneq ($(wildcard arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),) @$(kecho) "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'" $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig) +else + @$(kecho) "*** Default configuration is based on target '$(KBUILD_DEFCONFIG)'" + $(Q)$(MAKE) -f $(srctree)/Makefile $(KBUILD_DEFCONFIG) endif %_defconfig: $(obj)/conf -- 2.1.4 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [RFC PATCH 2/2] powerpc: Add ppc64le_defconfig 2015-09-23 5:40 [RFC PATCH 1/2] scripts/kconfig/Makefile: Allow KBUILD_DEFCONFIG to be a target Michael Ellerman @ 2015-09-23 5:40 ` Michael Ellerman 2015-10-02 7:47 ` [RFC,2/2] " Michael Ellerman 2015-09-23 9:50 ` [RFC PATCH 1/2] scripts/kconfig/Makefile: Allow KBUILD_DEFCONFIG to be a target Michal Marek 2015-10-02 7:47 ` [RFC, " Michael Ellerman 2 siblings, 1 reply; 15+ messages in thread From: Michael Ellerman @ 2015-09-23 5:40 UTC (permalink / raw) To: linuxppc-dev; +Cc: linux-kernel, linux-kbuild, yann.morin.1998, mmarek Based directly on ppc64_defconfig using merge_config. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> --- arch/powerpc/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index b9b4af2af9a5..3704db45a832 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -288,6 +288,10 @@ PHONY += pseries_le_defconfig pseries_le_defconfig: $(call merge_into_defconfig,pseries_defconfig,le) +PHONY += ppc64le_defconfig +ppc64le_defconfig: + $(call merge_into_defconfig,ppc64_defconfig,le) + PHONY += mpc85xx_defconfig mpc85xx_defconfig: $(call merge_into_defconfig,mpc85xx_basic_defconfig,\ -- 2.1.4 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [RFC,2/2] powerpc: Add ppc64le_defconfig 2015-09-23 5:40 ` [RFC PATCH 2/2] powerpc: Add ppc64le_defconfig Michael Ellerman @ 2015-10-02 7:47 ` Michael Ellerman 0 siblings, 0 replies; 15+ messages in thread From: Michael Ellerman @ 2015-10-02 7:47 UTC (permalink / raw) To: Michael Ellerman, linuxppc-dev Cc: mmarek, linux-kernel, yann.morin.1998, linux-kbuild On Wed, 2015-23-09 at 05:40:35 UTC, Michael Ellerman wrote: > Based directly on ppc64_defconfig using merge_config. > > Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Applied to powerpc next. https://git.kernel.org/powerpc/c/2adc48a691866fbb3134dd3a cheers ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RFC PATCH 1/2] scripts/kconfig/Makefile: Allow KBUILD_DEFCONFIG to be a target 2015-09-23 5:40 [RFC PATCH 1/2] scripts/kconfig/Makefile: Allow KBUILD_DEFCONFIG to be a target Michael Ellerman 2015-09-23 5:40 ` [RFC PATCH 2/2] powerpc: Add ppc64le_defconfig Michael Ellerman @ 2015-09-23 9:50 ` Michal Marek 2015-09-23 22:16 ` Michael Ellerman 2015-10-02 7:47 ` [RFC, " Michael Ellerman 2 siblings, 1 reply; 15+ messages in thread From: Michal Marek @ 2015-09-23 9:50 UTC (permalink / raw) To: Michael Ellerman, linuxppc-dev Cc: linux-kernel, linux-kbuild, yann.morin.1998 On 2015-09-23 07:40, Michael Ellerman wrote: > +else ifneq ($(wildcard arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),) > @$(kecho) "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'" > $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig) > +else > + @$(kecho) "*** Default configuration is based on target '$(KBUILD_DEFCONFIG)'" > + $(Q)$(MAKE) -f $(srctree)/Makefile $(KBUILD_DEFCONFIG) > endif What is the anticipated usage of this? The patch is not needed to make make ppc64le_defconfig work with the second patch. If it was, this would create a loop anyway. Michal ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RFC PATCH 1/2] scripts/kconfig/Makefile: Allow KBUILD_DEFCONFIG to be a target 2015-09-23 9:50 ` [RFC PATCH 1/2] scripts/kconfig/Makefile: Allow KBUILD_DEFCONFIG to be a target Michal Marek @ 2015-09-23 22:16 ` Michael Ellerman 2015-09-25 20:46 ` Michal Marek 0 siblings, 1 reply; 15+ messages in thread From: Michael Ellerman @ 2015-09-23 22:16 UTC (permalink / raw) To: Michal Marek, Michael Ellerman, linuxppc-dev Cc: linux-kernel, linux-kbuild, yann.morin.1998 On 23 September 2015 19:50:52 GMT+10:00, Michal Marek <mmarek@suse.com> wrote: >On 2015-09-23 07:40, Michael Ellerman wrote: >> +else ifneq ($(wildcard >arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),) >> @$(kecho) "*** Default configuration is based on >'$(KBUILD_DEFCONFIG)'" >> $(Q)$< $(silent) >--defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig) >> +else >> + @$(kecho) "*** Default configuration is based on target >'$(KBUILD_DEFCONFIG)'" >> + $(Q)$(MAKE) -f $(srctree)/Makefile $(KBUILD_DEFCONFIG) >> endif > >What is the anticipated usage of this? The patch is not needed to make > > make ppc64le_defconfig > >work with the second patch. If it was, this would create a loop anyway. The idea is to make 'make defconfig' work when KBUILD_DEFCONFIG is ppc64le_defconfig (which happens for us when uname returns ppc64le) and additionally when ppc64le_defconfig is not a real file. It doesn't work currently, but does with these two patches applied. cheers -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RFC PATCH 1/2] scripts/kconfig/Makefile: Allow KBUILD_DEFCONFIG to be a target 2015-09-23 22:16 ` Michael Ellerman @ 2015-09-25 20:46 ` Michal Marek 2015-10-01 6:14 ` Michael Ellerman 0 siblings, 1 reply; 15+ messages in thread From: Michal Marek @ 2015-09-25 20:46 UTC (permalink / raw) To: Michael Ellerman, Michael Ellerman, linuxppc-dev Cc: linux-kernel, linux-kbuild, yann.morin.1998 Dne 24.9.2015 v 00:16 Michael Ellerman napsal(a): > > > On 23 September 2015 19:50:52 GMT+10:00, Michal Marek > <mmarek@suse.com> wrote: >> On 2015-09-23 07:40, Michael Ellerman wrote: >>> +else ifneq ($(wildcard >> arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),) >>> @$(kecho) "*** Default configuration is based on >> '$(KBUILD_DEFCONFIG)'" >>> $(Q)$< $(silent) >> --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig) >>> +else + @$(kecho) "*** Default configuration is based on target >> '$(KBUILD_DEFCONFIG)'" >>> + $(Q)$(MAKE) -f $(srctree)/Makefile $(KBUILD_DEFCONFIG) endif >> >> What is the anticipated usage of this? The patch is not needed to >> make >> >> make ppc64le_defconfig >> >> work with the second patch. If it was, this would create a loop >> anyway. > > The idea is to make 'make defconfig' work when KBUILD_DEFCONFIG is > ppc64le_defconfig (which happens for us when uname returns ppc64le) > and additionally when ppc64le_defconfig is not a real file. Ah, that makes sense. You can add Acked-by: Michal Marek <mmarek@suse.com> if you want. Michal ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RFC PATCH 1/2] scripts/kconfig/Makefile: Allow KBUILD_DEFCONFIG to be a target 2015-09-25 20:46 ` Michal Marek @ 2015-10-01 6:14 ` Michael Ellerman 2015-10-01 6:50 ` Michal Marek 0 siblings, 1 reply; 15+ messages in thread From: Michael Ellerman @ 2015-10-01 6:14 UTC (permalink / raw) To: Michal Marek; +Cc: linuxppc-dev, linux-kernel, linux-kbuild, yann.morin.1998 On Fri, 2015-09-25 at 22:46 +0200, Michal Marek wrote: > Dne 24.9.2015 v 00:16 Michael Ellerman napsal(a): > > > > > > On 23 September 2015 19:50:52 GMT+10:00, Michal Marek > > <mmarek@suse.com> wrote: > >> On 2015-09-23 07:40, Michael Ellerman wrote: > >>> +else ifneq ($(wildcard > >> arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),) > >>> @$(kecho) "*** Default configuration is based on > >> '$(KBUILD_DEFCONFIG)'" > >>> $(Q)$< $(silent) > >> --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig) > >>> +else + @$(kecho) "*** Default configuration is based on target > >> '$(KBUILD_DEFCONFIG)'" > >>> + $(Q)$(MAKE) -f $(srctree)/Makefile $(KBUILD_DEFCONFIG) endif > >> > >> What is the anticipated usage of this? The patch is not needed to > >> make > >> > >> make ppc64le_defconfig > >> > >> work with the second patch. If it was, this would create a loop > >> anyway. > > > > The idea is to make 'make defconfig' work when KBUILD_DEFCONFIG is > > ppc64le_defconfig (which happens for us when uname returns ppc64le) > > and additionally when ppc64le_defconfig is not a real file. > > Ah, that makes sense. You can add > > Acked-by: Michal Marek <mmarek@suse.com> > > if you want. Thanks. I'll assume by that you mean you're happy if I take both patches through the powerpc tree. cheers ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RFC PATCH 1/2] scripts/kconfig/Makefile: Allow KBUILD_DEFCONFIG to be a target 2015-10-01 6:14 ` Michael Ellerman @ 2015-10-01 6:50 ` Michal Marek 2015-10-01 7:05 ` Michael Ellerman 0 siblings, 1 reply; 15+ messages in thread From: Michal Marek @ 2015-10-01 6:50 UTC (permalink / raw) To: Michael Ellerman Cc: linuxppc-dev, linux-kernel, linux-kbuild, yann.morin.1998 On 2015-10-01 08:14, Michael Ellerman wrote: > On Fri, 2015-09-25 at 22:46 +0200, Michal Marek wrote: >> Dne 24.9.2015 v 00:16 Michael Ellerman napsal(a): >>> >>> >>> On 23 September 2015 19:50:52 GMT+10:00, Michal Marek >>> <mmarek@suse.com> wrote: >>>> On 2015-09-23 07:40, Michael Ellerman wrote: >>>>> +else ifneq ($(wildcard >>>> arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),) >>>>> @$(kecho) "*** Default configuration is based on >>>> '$(KBUILD_DEFCONFIG)'" >>>>> $(Q)$< $(silent) >>>> --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig) >>>>> +else + @$(kecho) "*** Default configuration is based on target >>>> '$(KBUILD_DEFCONFIG)'" >>>>> + $(Q)$(MAKE) -f $(srctree)/Makefile $(KBUILD_DEFCONFIG) endif >>>> >>>> What is the anticipated usage of this? The patch is not needed to >>>> make >>>> >>>> make ppc64le_defconfig >>>> >>>> work with the second patch. If it was, this would create a loop >>>> anyway. >>> >>> The idea is to make 'make defconfig' work when KBUILD_DEFCONFIG is >>> ppc64le_defconfig (which happens for us when uname returns ppc64le) >>> and additionally when ppc64le_defconfig is not a real file. >> >> Ah, that makes sense. You can add >> >> Acked-by: Michal Marek <mmarek@suse.com> >> >> if you want. > > Thanks. I'll assume by that you mean you're happy if I take both patches > through the powerpc tree. Yes, I assumed that this was your plan. Michal ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RFC PATCH 1/2] scripts/kconfig/Makefile: Allow KBUILD_DEFCONFIG to be a target 2015-10-01 6:50 ` Michal Marek @ 2015-10-01 7:05 ` Michael Ellerman 0 siblings, 0 replies; 15+ messages in thread From: Michael Ellerman @ 2015-10-01 7:05 UTC (permalink / raw) To: Michal Marek; +Cc: linuxppc-dev, linux-kernel, linux-kbuild, yann.morin.1998 On Thu, 2015-10-01 at 08:50 +0200, Michal Marek wrote: > On 2015-10-01 08:14, Michael Ellerman wrote: > > On Fri, 2015-09-25 at 22:46 +0200, Michal Marek wrote: > >> Dne 24.9.2015 v 00:16 Michael Ellerman napsal(a): > >>> On 23 September 2015 19:50:52 GMT+10:00, Michal Marek > >>> <mmarek@suse.com> wrote: > >>>> On 2015-09-23 07:40, Michael Ellerman wrote: > >>>>> +else ifneq ($(wildcard > >>>> arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),) > >>>>> @$(kecho) "*** Default configuration is based on > >>>> '$(KBUILD_DEFCONFIG)'" > >>>>> $(Q)$< $(silent) > >>>> --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig) > >>>>> +else + @$(kecho) "*** Default configuration is based on target > >>>> '$(KBUILD_DEFCONFIG)'" > >>>>> + $(Q)$(MAKE) -f $(srctree)/Makefile $(KBUILD_DEFCONFIG) endif > >>>> > >>>> What is the anticipated usage of this? The patch is not needed to > >>>> make > >>>> > >>>> make ppc64le_defconfig > >>>> > >>>> work with the second patch. If it was, this would create a loop > >>>> anyway. > >>> > >>> The idea is to make 'make defconfig' work when KBUILD_DEFCONFIG is > >>> ppc64le_defconfig (which happens for us when uname returns ppc64le) > >>> and additionally when ppc64le_defconfig is not a real file. > >> > >> Ah, that makes sense. You can add > >> > >> Acked-by: Michal Marek <mmarek@suse.com> > >> > >> if you want. > > > > Thanks. I'll assume by that you mean you're happy if I take both patches > > through the powerpc tree. > > Yes, I assumed that this was your plan. I didn't really have a plan :) It's certainly easiest if I take it in my tree along with the new ppc64le_defconfig, so I'll do that. Thanks. cheers ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RFC, 1/2] scripts/kconfig/Makefile: Allow KBUILD_DEFCONFIG to be a target 2015-09-23 5:40 [RFC PATCH 1/2] scripts/kconfig/Makefile: Allow KBUILD_DEFCONFIG to be a target Michael Ellerman 2015-09-23 5:40 ` [RFC PATCH 2/2] powerpc: Add ppc64le_defconfig Michael Ellerman 2015-09-23 9:50 ` [RFC PATCH 1/2] scripts/kconfig/Makefile: Allow KBUILD_DEFCONFIG to be a target Michal Marek @ 2015-10-02 7:47 ` Michael Ellerman 2015-10-13 21:02 ` Olof Johansson 2 siblings, 1 reply; 15+ messages in thread From: Michael Ellerman @ 2015-10-02 7:47 UTC (permalink / raw) To: Michael Ellerman, linuxppc-dev Cc: mmarek, linux-kernel, yann.morin.1998, linux-kbuild On Wed, 2015-23-09 at 05:40:34 UTC, Michael Ellerman wrote: > Arch Makefiles can set KBUILD_DEFCONFIG to tell kbuild the name of the > defconfig that should be built by default. > > However currently there is an assumption that KBUILD_DEFCONFIG points to > a file at arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG). > > We would like to use a target, using merge_config, as our defconfig, so > adapt the logic in scripts/kconfig/Makefile to allow that. > > To minimise the chance of breaking anything, we first check if > KBUILD_DEFCONFIG is a file, and if so we do the old logic. If it's not a > file, then we call the top-level Makefile with KBUILD_DEFCONFIG as the > target. > > Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> > Acked-by: Michal Marek <mmarek@suse.com> Applied to powerpc next. https://git.kernel.org/powerpc/c/d2036f30cfe1daa19e63ce75 cheers ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RFC, 1/2] scripts/kconfig/Makefile: Allow KBUILD_DEFCONFIG to be a target 2015-10-02 7:47 ` [RFC, " Michael Ellerman @ 2015-10-13 21:02 ` Olof Johansson 2015-10-13 23:43 ` Michael Ellerman 0 siblings, 1 reply; 15+ messages in thread From: Olof Johansson @ 2015-10-13 21:02 UTC (permalink / raw) To: Michael Ellerman Cc: linuxppc-dev, mmarek, linux-kernel@vger.kernel.org, yann.morin.1998, linux-kbuild@vger.kernel.org On Fri, Oct 2, 2015 at 12:47 AM, Michael Ellerman <mpe@ellerman.id.au> wrote: > On Wed, 2015-23-09 at 05:40:34 UTC, Michael Ellerman wrote: >> Arch Makefiles can set KBUILD_DEFCONFIG to tell kbuild the name of the >> defconfig that should be built by default. >> >> However currently there is an assumption that KBUILD_DEFCONFIG points to >> a file at arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG). >> >> We would like to use a target, using merge_config, as our defconfig, so >> adapt the logic in scripts/kconfig/Makefile to allow that. >> >> To minimise the chance of breaking anything, we first check if >> KBUILD_DEFCONFIG is a file, and if so we do the old logic. If it's not a >> file, then we call the top-level Makefile with KBUILD_DEFCONFIG as the >> target. >> >> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> >> Acked-by: Michal Marek <mmarek@suse.com> > > Applied to powerpc next. > > https://git.kernel.org/powerpc/c/d2036f30cfe1daa19e63ce75 This breaks arm64 defconfig for me: mkdir obj-tmp make -f Makefile O=obj-tmp ARCH=arm64 defconfig ... watch loop of: *** Default configuration is based on target 'defconfig' GEN ./Makefile -Olof ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RFC, 1/2] scripts/kconfig/Makefile: Allow KBUILD_DEFCONFIG to be a target 2015-10-13 21:02 ` Olof Johansson @ 2015-10-13 23:43 ` Michael Ellerman 2015-10-14 16:54 ` Olof Johansson 0 siblings, 1 reply; 15+ messages in thread From: Michael Ellerman @ 2015-10-13 23:43 UTC (permalink / raw) To: Olof Johansson Cc: linuxppc-dev, mmarek, linux-kernel@vger.kernel.org, yann.morin.1998, linux-kbuild@vger.kernel.org On Tue, 2015-10-13 at 14:02 -0700, Olof Johansson wrote: > On Fri, Oct 2, 2015 at 12:47 AM, Michael Ellerman <mpe@ellerman.id.au> wrote: > > On Wed, 2015-23-09 at 05:40:34 UTC, Michael Ellerman wrote: > >> Arch Makefiles can set KBUILD_DEFCONFIG to tell kbuild the name of the > >> defconfig that should be built by default. > >> > >> However currently there is an assumption that KBUILD_DEFCONFIG points to > >> a file at arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG). > >> > >> We would like to use a target, using merge_config, as our defconfig, so > >> adapt the logic in scripts/kconfig/Makefile to allow that. > >> > >> To minimise the chance of breaking anything, we first check if > >> KBUILD_DEFCONFIG is a file, and if so we do the old logic. If it's not a > >> file, then we call the top-level Makefile with KBUILD_DEFCONFIG as the > >> target. > >> > >> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> > >> Acked-by: Michal Marek <mmarek@suse.com> > > > > Applied to powerpc next. > > > > https://git.kernel.org/powerpc/c/d2036f30cfe1daa19e63ce75 > > This breaks arm64 defconfig for me: > > mkdir obj-tmp > make -f Makefile O=obj-tmp ARCH=arm64 defconfig > ... watch loop of: > *** Default configuration is based on target 'defconfig' > GEN ./Makefile Crap, sorry. I knew I shouldn't have touched that code! Does this fix it for you? diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index b2b9c87..3043d6b 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -96,7 +96,7 @@ savedefconfig: $(obj)/conf defconfig: $(obj)/conf ifeq ($(KBUILD_DEFCONFIG),) $< $(silent) --defconfig $(Kconfig) -else ifneq ($(wildcard arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),) +else ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),) @$(kecho) "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'" $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig) else $ make O=obj CROSS_COMPILE=/opt/cross/gcc-4.9.0-nolibc/aarch64-linux/bin/aarch64-linux- ARCH=arm64 defconfig make[1]: Entering directory '/home/michael/kernels/linux-next/obj' HOSTCC scripts/basic/fixdep GEN ./Makefile HOSTCC scripts/kconfig/conf.o SHIPPED scripts/kconfig/zconf.tab.c SHIPPED scripts/kconfig/zconf.lex.c SHIPPED scripts/kconfig/zconf.hash.c HOSTCC scripts/kconfig/zconf.tab.o HOSTLD scripts/kconfig/conf *** Default configuration is based on 'defconfig' # # configuration written to .config # make[1]: Leaving directory '/home/michael/kernels/linux-next/obj' $ head obj/.config # # Automatically generated file; DO NOT EDIT. # Linux/arm64 4.3.0-rc5 Kernel Configuration # CONFIG_ARM64=y CONFIG_64BIT=y CONFIG_ARCH_PHYS_ADDR_T_64BIT=y CONFIG_MMU=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000 cheers ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [RFC, 1/2] scripts/kconfig/Makefile: Allow KBUILD_DEFCONFIG to be a target 2015-10-13 23:43 ` Michael Ellerman @ 2015-10-14 16:54 ` Olof Johansson 2015-10-15 3:27 ` Michael Ellerman 0 siblings, 1 reply; 15+ messages in thread From: Olof Johansson @ 2015-10-14 16:54 UTC (permalink / raw) To: Michael Ellerman Cc: linuxppc-dev, mmarek, linux-kernel@vger.kernel.org, yann.morin.1998, linux-kbuild@vger.kernel.org On Tue, Oct 13, 2015 at 4:43 PM, Michael Ellerman <mpe@ellerman.id.au> wrote: > On Tue, 2015-10-13 at 14:02 -0700, Olof Johansson wrote: >> On Fri, Oct 2, 2015 at 12:47 AM, Michael Ellerman <mpe@ellerman.id.au> wrote: >> > On Wed, 2015-23-09 at 05:40:34 UTC, Michael Ellerman wrote: >> >> Arch Makefiles can set KBUILD_DEFCONFIG to tell kbuild the name of the >> >> defconfig that should be built by default. >> >> >> >> However currently there is an assumption that KBUILD_DEFCONFIG points to >> >> a file at arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG). >> >> >> >> We would like to use a target, using merge_config, as our defconfig, so >> >> adapt the logic in scripts/kconfig/Makefile to allow that. >> >> >> >> To minimise the chance of breaking anything, we first check if >> >> KBUILD_DEFCONFIG is a file, and if so we do the old logic. If it's not a >> >> file, then we call the top-level Makefile with KBUILD_DEFCONFIG as the >> >> target. >> >> >> >> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> >> >> Acked-by: Michal Marek <mmarek@suse.com> >> > >> > Applied to powerpc next. >> > >> > https://git.kernel.org/powerpc/c/d2036f30cfe1daa19e63ce75 >> >> This breaks arm64 defconfig for me: >> >> mkdir obj-tmp >> make -f Makefile O=obj-tmp ARCH=arm64 defconfig >> ... watch loop of: >> *** Default configuration is based on target 'defconfig' >> GEN ./Makefile > > Crap, sorry. I knew I shouldn't have touched that code! > > Does this fix it for you? Yes, it does, however: > > diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile > index b2b9c87..3043d6b 100644 > --- a/scripts/kconfig/Makefile > +++ b/scripts/kconfig/Makefile > @@ -96,7 +96,7 @@ savedefconfig: $(obj)/conf > defconfig: $(obj)/conf > ifeq ($(KBUILD_DEFCONFIG),) > $< $(silent) --defconfig $(Kconfig) > -else ifneq ($(wildcard arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),) > +else ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),) > @$(kecho) "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'" > $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig) Do you need a $(srctree) prefix here too? I'm not entirely sure what I would do to reproduce a run that goes down this path so I can't confirm. -Olof ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RFC, 1/2] scripts/kconfig/Makefile: Allow KBUILD_DEFCONFIG to be a target 2015-10-14 16:54 ` Olof Johansson @ 2015-10-15 3:27 ` Michael Ellerman 2015-10-15 7:34 ` Michal Marek 0 siblings, 1 reply; 15+ messages in thread From: Michael Ellerman @ 2015-10-15 3:27 UTC (permalink / raw) To: Olof Johansson Cc: linuxppc-dev, mmarek, linux-kernel@vger.kernel.org, yann.morin.1998, linux-kbuild@vger.kernel.org On Wed, 2015-10-14 at 09:54 -0700, Olof Johansson wrote: > On Tue, Oct 13, 2015 at 4:43 PM, Michael Ellerman <mpe@ellerman.id.au> wrote: > > On Tue, 2015-10-13 at 14:02 -0700, Olof Johansson wrote: > >> On Fri, Oct 2, 2015 at 12:47 AM, Michael Ellerman <mpe@ellerman.id.au> wrote: > >> > On Wed, 2015-23-09 at 05:40:34 UTC, Michael Ellerman wrote: > >> >> Arch Makefiles can set KBUILD_DEFCONFIG to tell kbuild the name of the > >> >> defconfig that should be built by default. > >> >> > >> >> However currently there is an assumption that KBUILD_DEFCONFIG points to > >> >> a file at arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG). > >> >> > >> >> We would like to use a target, using merge_config, as our defconfig, so > >> >> adapt the logic in scripts/kconfig/Makefile to allow that. > >> >> > >> >> To minimise the chance of breaking anything, we first check if > >> >> KBUILD_DEFCONFIG is a file, and if so we do the old logic. If it's not a > >> >> file, then we call the top-level Makefile with KBUILD_DEFCONFIG as the > >> >> target. > >> >> > >> >> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> > >> >> Acked-by: Michal Marek <mmarek@suse.com> > >> > > >> > Applied to powerpc next. > >> > > >> > https://git.kernel.org/powerpc/c/d2036f30cfe1daa19e63ce75 > >> > >> This breaks arm64 defconfig for me: > >> > >> mkdir obj-tmp > >> make -f Makefile O=obj-tmp ARCH=arm64 defconfig > >> ... watch loop of: > >> *** Default configuration is based on target 'defconfig' > >> GEN ./Makefile > > > > Crap, sorry. I knew I shouldn't have touched that code! > > > > Does this fix it for you? > > Yes, it does, however: > > > diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile > > index b2b9c87..3043d6b 100644 > > --- a/scripts/kconfig/Makefile > > +++ b/scripts/kconfig/Makefile > > @@ -96,7 +96,7 @@ savedefconfig: $(obj)/conf > > defconfig: $(obj)/conf > > ifeq ($(KBUILD_DEFCONFIG),) > > $< $(silent) --defconfig $(Kconfig) > > -else ifneq ($(wildcard arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),) > > +else ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),) > > @$(kecho) "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'" > > $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig) > > Do you need a $(srctree) prefix here too? I'm not entirely sure what I > would do to reproduce a run that goes down this path so I can't > confirm. That is the path you're going down, now that it's fixed. That's the path where KBUILD_DEFCONFIG is a real file, ie. the old behaviour. I'm not sure why it doesn't have a $(srctree) there, but it's never had one. It looks like it eventually boils down to zconf_fopen() which looks for the file in both . and $(srctree). So I think we could add a $(srctree) there, it would be more obvious and not rely on the zconf_fopen() behaviour, but I'd rather leave it as is and let Michal do that as a cleanup later. cheers ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RFC, 1/2] scripts/kconfig/Makefile: Allow KBUILD_DEFCONFIG to be a target 2015-10-15 3:27 ` Michael Ellerman @ 2015-10-15 7:34 ` Michal Marek 0 siblings, 0 replies; 15+ messages in thread From: Michal Marek @ 2015-10-15 7:34 UTC (permalink / raw) To: Michael Ellerman Cc: Olof Johansson, linuxppc-dev, linux-kernel@vger.kernel.org, yann.morin.1998, linux-kbuild@vger.kernel.org Dne 15.10.2015 v 05:27 Michael Ellerman napsal(a): > On Wed, 2015-10-14 at 09:54 -0700, Olof Johansson wrote: >> On Tue, Oct 13, 2015 at 4:43 PM, Michael Ellerman <mpe@ellerman.id.au> wrote: >>> On Tue, 2015-10-13 at 14:02 -0700, Olof Johansson wrote: >>>> On Fri, Oct 2, 2015 at 12:47 AM, Michael Ellerman <mpe@ellerman.id.au> wrote: >>>>> On Wed, 2015-23-09 at 05:40:34 UTC, Michael Ellerman wrote: >>>>>> Arch Makefiles can set KBUILD_DEFCONFIG to tell kbuild the name of the >>>>>> defconfig that should be built by default. >>>>>> >>>>>> However currently there is an assumption that KBUILD_DEFCONFIG points to >>>>>> a file at arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG). >>>>>> >>>>>> We would like to use a target, using merge_config, as our defconfig, so >>>>>> adapt the logic in scripts/kconfig/Makefile to allow that. >>>>>> >>>>>> To minimise the chance of breaking anything, we first check if >>>>>> KBUILD_DEFCONFIG is a file, and if so we do the old logic. If it's not a >>>>>> file, then we call the top-level Makefile with KBUILD_DEFCONFIG as the >>>>>> target. >>>>>> >>>>>> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> >>>>>> Acked-by: Michal Marek <mmarek@suse.com> >>>>> >>>>> Applied to powerpc next. >>>>> >>>>> https://git.kernel.org/powerpc/c/d2036f30cfe1daa19e63ce75 >>>> >>>> This breaks arm64 defconfig for me: >>>> >>>> mkdir obj-tmp >>>> make -f Makefile O=obj-tmp ARCH=arm64 defconfig >>>> ... watch loop of: >>>> *** Default configuration is based on target 'defconfig' >>>> GEN ./Makefile >>> >>> Crap, sorry. I knew I shouldn't have touched that code! >>> >>> Does this fix it for you? >> >> Yes, it does, however: >> >>> diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile >>> index b2b9c87..3043d6b 100644 >>> --- a/scripts/kconfig/Makefile >>> +++ b/scripts/kconfig/Makefile >>> @@ -96,7 +96,7 @@ savedefconfig: $(obj)/conf >>> defconfig: $(obj)/conf >>> ifeq ($(KBUILD_DEFCONFIG),) >>> $< $(silent) --defconfig $(Kconfig) >>> -else ifneq ($(wildcard arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),) >>> +else ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),) >>> @$(kecho) "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'" >>> $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig) >> >> Do you need a $(srctree) prefix here too? I'm not entirely sure what I >> would do to reproduce a run that goes down this path so I can't >> confirm. > > That is the path you're going down, now that it's fixed. That's the path where > KBUILD_DEFCONFIG is a real file, ie. the old behaviour. > > I'm not sure why it doesn't have a $(srctree) there, but it's never had one. > > It looks like it eventually boils down to zconf_fopen() which looks for the > file in both . and $(srctree). Yes, the kconfig frontends do part of what would ideally be the job of make or the Makefile. Michal ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2015-10-15 7:34 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-09-23 5:40 [RFC PATCH 1/2] scripts/kconfig/Makefile: Allow KBUILD_DEFCONFIG to be a target Michael Ellerman 2015-09-23 5:40 ` [RFC PATCH 2/2] powerpc: Add ppc64le_defconfig Michael Ellerman 2015-10-02 7:47 ` [RFC,2/2] " Michael Ellerman 2015-09-23 9:50 ` [RFC PATCH 1/2] scripts/kconfig/Makefile: Allow KBUILD_DEFCONFIG to be a target Michal Marek 2015-09-23 22:16 ` Michael Ellerman 2015-09-25 20:46 ` Michal Marek 2015-10-01 6:14 ` Michael Ellerman 2015-10-01 6:50 ` Michal Marek 2015-10-01 7:05 ` Michael Ellerman 2015-10-02 7:47 ` [RFC, " Michael Ellerman 2015-10-13 21:02 ` Olof Johansson 2015-10-13 23:43 ` Michael Ellerman 2015-10-14 16:54 ` Olof Johansson 2015-10-15 3:27 ` Michael Ellerman 2015-10-15 7:34 ` Michal Marek
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).