diff options
author | Marcin Nowakowski <marcin.nowakowski@imgtec.com> | 2017-03-13 10:57:14 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2017-04-11 07:17:31 -0400 |
commit | 337b775b6cf5d093295961c1aa6ac76693b5f847 (patch) | |
tree | fb470995d50e0d571bc21f6074c9616d4dd8a47f /arch/mips/Makefile | |
parent | 9d7f29cdb4ca53506115cf1d7a02ce6013894df0 (diff) |
MIPS: generic: fix out-of-tree defconfig target builds
When specifying a generic defconfig target with O=... option set, make
is invoked in the output location before a target makefile wrapper is
created. Ensure that the correct makefile is used by specifying the
kernel source makefile during make invocation.
This fixes the either of the following errors:
$ make sead3_defoncifg ARCH=mips O=test
make[1]: Entering directory '/mnt/ssd/MIPS/linux-next/test'
make[2]: *** No rule to make target '32r2el_defconfig'. Stop.
arch/mips/Makefile:506: recipe for target 'sead3_defconfig' failed
make[1]: *** [sead3_defconfig] Error 2
make[1]: Leaving directory '/mnt/ssd/MIPS/linux-next/test'
Makefile:152: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
$ make 32r2el_defconfig ARCH=mips O=test
make[1]: Entering directory '/mnt/ssd/MIPS/linux-next/test'
Using ../arch/mips/configs/generic_defconfig as base
Merging ../arch/mips/configs/generic/32r2.config
Merging ../arch/mips/configs/generic/el.config
Merging ../arch/mips/configs/generic/board-sead-3.config
!
! merged configuration written to .config (needs make)
!
make[2]: *** No rule to make target 'olddefconfig'. Stop.
arch/mips/Makefile:489: recipe for target '32r2el_defconfig' failed
make[1]: *** [32r2el_defconfig] Error 2
make[1]: Leaving directory '/mnt/ssd/MIPS/linux-next/test'
Makefile:152: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
Fixes: eed0eabd12ef ('MIPS: generic: Introduce generic DT-based board support')
Fixes: 3f5f0a4475e1 ('MIPS: generic: Convert SEAD-3 to a generic board')
Signed-off-by: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/15464/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/Makefile')
-rw-r--r-- | arch/mips/Makefile | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 8ef9c02747fa..02a1787c888c 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
@@ -489,7 +489,7 @@ $(generic_defconfigs): | |||
489 | $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \ | 489 | $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \ |
490 | -m -O $(objtree) $(srctree)/arch/$(ARCH)/configs/generic_defconfig $^ \ | 490 | -m -O $(objtree) $(srctree)/arch/$(ARCH)/configs/generic_defconfig $^ \ |
491 | $(foreach board,$(BOARDS),$(generic_config_dir)/board-$(board).config) | 491 | $(foreach board,$(BOARDS),$(generic_config_dir)/board-$(board).config) |
492 | $(Q)$(MAKE) olddefconfig | 492 | $(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig |
493 | 493 | ||
494 | # | 494 | # |
495 | # Prevent generic merge_config rules attempting to merge single fragments | 495 | # Prevent generic merge_config rules attempting to merge single fragments |
@@ -503,8 +503,8 @@ $(generic_config_dir)/%.config: ; | |||
503 | # | 503 | # |
504 | .PHONY: sead3_defconfig | 504 | .PHONY: sead3_defconfig |
505 | sead3_defconfig: | 505 | sead3_defconfig: |
506 | $(Q)$(MAKE) 32r2el_defconfig BOARDS=sead-3 | 506 | $(Q)$(MAKE) -f $(srctree)/Makefile 32r2el_defconfig BOARDS=sead-3 |
507 | 507 | ||
508 | .PHONY: sead3micro_defconfig | 508 | .PHONY: sead3micro_defconfig |
509 | sead3micro_defconfig: | 509 | sead3micro_defconfig: |
510 | $(Q)$(MAKE) micro32r2el_defconfig BOARDS=sead-3 | 510 | $(Q)$(MAKE) -f $(srctree)/Makefile micro32r2el_defconfig BOARDS=sead-3 |