* [PATCH 0/3] MIPS: Generic defconfig Makefile improvements
@ 2018-02-09 16:11 James Hogan
2018-02-09 16:11 ` [PATCH 1/3] MIPS: Refactor legacy defconfigs James Hogan
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: James Hogan @ 2018-02-09 16:11 UTC (permalink / raw)
To: linux-mips
Cc: James Hogan, Ralf Baechle, Masahiro Yamada, Michal Marek,
Paul Burton, Matt Redfearn, linux-kbuild
This series adds the following MIPS Makefile targets and improves the
MIPS "make help" text to list these things too:
- list_generic_defconfigs - list specific generic defconfig names
- list_generic_boards - list boards that can be passed to BOARDS
- list_legacy_defconfigs - list legacy defconfigs
This will be helpful for CI builders to be able to automatically pick up
generic defconfigs that aren't directly represented as files in
arch/mips/configs/.
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Matt Redfearn <matt.redfearn@mips.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kbuild@vger.kernel.org
James Hogan (3):
MIPS: Refactor legacy defconfigs
MIPS: Add generic list_* Makefile targets
MIPS: Expand help text to list generic defconfigs
Makefile | 2 +-
arch/mips/Makefile | 89 ++++++++++++++++++++++++++++++++---------------
2 files changed, 63 insertions(+), 28 deletions(-)
base-commit: 791412dafbbfd860e78983d45cf71db603a82f67
--
git-series 0.9.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] MIPS: Refactor legacy defconfigs
2018-02-09 16:11 [PATCH 0/3] MIPS: Generic defconfig Makefile improvements James Hogan
@ 2018-02-09 16:11 ` James Hogan
2018-02-09 16:11 ` [PATCH 2/3] MIPS: Add generic list_* Makefile targets James Hogan
2018-02-09 16:11 ` [PATCH 3/3] MIPS: Expand help text to list generic defconfigs James Hogan
2 siblings, 0 replies; 5+ messages in thread
From: James Hogan @ 2018-02-09 16:11 UTC (permalink / raw)
To: linux-mips
Cc: James Hogan, Ralf Baechle, Paul Burton, Matt Redfearn, linux-kbuild
Define legacy defconfigs which have been converted to the generic
platform more programatically, so that they can be listed in the
Makefile help text and as a separate Makefile target without
duplication.
Signed-off-by: James Hogan <jhogan@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Matt Redfearn <matt.redfearn@mips.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kbuild@vger.kernel.org
---
arch/mips/Makefile | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index d1ca839c3981..6f368b5cdf29 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -543,14 +543,15 @@ generic_defconfig:
# now that the boards have been converted to use the generic kernel they are
# wrappers around the generic rules above.
#
-.PHONY: sead3_defconfig
-sead3_defconfig:
- $(Q)$(MAKE) -f $(srctree)/Makefile 32r2el_defconfig BOARDS=sead-3
+legacy_defconfigs += sead3_defconfig
+sead3_defconfig-y := 32r2el_defconfig BOARDS=sead-3
-.PHONY: sead3micro_defconfig
-sead3micro_defconfig:
- $(Q)$(MAKE) -f $(srctree)/Makefile micro32r2el_defconfig BOARDS=sead-3
+legacy_defconfigs += sead3micro_defconfig
+sead3micro_defconfig-y := micro32r2el_defconfig BOARDS=sead-3
-.PHONY: xilfpga_defconfig
-xilfpga_defconfig:
- $(Q)$(MAKE) -f $(srctree)/Makefile 32r2el_defconfig BOARDS=xilfpga
+legacy_defconfigs += xilfpga_defconfig
+xilfpga_defconfig-y := 32r2el_defconfig BOARDS=xilfpga
+
+.PHONY: $(legacy_defconfigs)
+$(legacy_defconfigs):
+ $(Q)$(MAKE) -f $(srctree)/Makefile $($@-y)
--
git-series 0.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] MIPS: Add generic list_* Makefile targets
2018-02-09 16:11 [PATCH 0/3] MIPS: Generic defconfig Makefile improvements James Hogan
2018-02-09 16:11 ` [PATCH 1/3] MIPS: Refactor legacy defconfigs James Hogan
@ 2018-02-09 16:11 ` James Hogan
2018-02-21 3:56 ` Masahiro Yamada
2018-02-09 16:11 ` [PATCH 3/3] MIPS: Expand help text to list generic defconfigs James Hogan
2 siblings, 1 reply; 5+ messages in thread
From: James Hogan @ 2018-02-09 16:11 UTC (permalink / raw)
To: linux-mips
Cc: James Hogan, Ralf Baechle, Masahiro Yamada, Michal Marek,
Paul Burton, Matt Redfearn, linux-kbuild
Add MIPS specific Makefile targets for listing generic defconfigs
(list_generic_defconfigs), generic board types (list_generic_boards),
and legacy defconfigs which have been converted to generic
(list_legacy_defconfigs).
This is useful for quick reference and for buildbots to be able to
automatically build all supported default configurations without parsing
of the generic_defconfig error output.
In order for these to work without .config being updated or
CROSS_COMPILE being needed, list_%s is added to no-dot-config-targets in
the main Makefile.
Signed-off-by: James Hogan <jhogan@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Matt Redfearn <matt.redfearn@mips.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kbuild@vger.kernel.org
---
Makefile | 2 +-
arch/mips/Makefile | 51 ++++++++++++++++++++++++++++++-----------------
2 files changed, 34 insertions(+), 19 deletions(-)
diff --git a/Makefile b/Makefile
index 3f4d157add54..635015848a2c 100644
--- a/Makefile
+++ b/Makefile
@@ -223,7 +223,7 @@ old_version_h := include/linux/version.h
no-dot-config-targets := clean mrproper distclean \
cscope gtags TAGS tags help% %docs check% coccicheck \
$(version_h) headers_% archheaders archscripts \
- kernelversion %src-pkg
+ kernelversion %src-pkg list_%s
config-targets := 0
mixed-targets := 0
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 6f368b5cdf29..9ba487c1c4d2 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -447,24 +447,27 @@ archclean:
$(Q)$(MAKE) $(clean)=arch/mips/lasat
define archhelp
- echo ' install - install kernel into $(INSTALL_PATH)'
- echo ' vmlinux.ecoff - ECOFF boot image'
- echo ' vmlinux.bin - Raw binary boot image'
- echo ' vmlinux.srec - SREC boot image'
- echo ' vmlinux.32 - 64-bit boot image wrapped in 32bits (IP22/IP32)'
- echo ' vmlinuz - Compressed boot(zboot) image'
- echo ' vmlinuz.ecoff - ECOFF zboot image'
- echo ' vmlinuz.bin - Raw binary zboot image'
- echo ' vmlinuz.srec - SREC zboot image'
- echo ' uImage - U-Boot image'
- echo ' uImage.bin - U-Boot image (uncompressed)'
- echo ' uImage.bz2 - U-Boot image (bz2)'
- echo ' uImage.gz - U-Boot image (gzip)'
- echo ' uImage.lzma - U-Boot image (lzma)'
- echo ' uImage.lzo - U-Boot image (lzo)'
- echo ' uzImage.bin - U-Boot image (self-extracting)'
- echo ' dtbs - Device-tree blobs for enabled boards'
- echo ' dtbs_install - Install dtbs to $(INSTALL_DTBS_PATH)'
+ echo ' install - install kernel into $(INSTALL_PATH)'
+ echo ' vmlinux.ecoff - ECOFF boot image'
+ echo ' vmlinux.bin - Raw binary boot image'
+ echo ' vmlinux.srec - SREC boot image'
+ echo ' vmlinux.32 - 64-bit boot image wrapped in 32bits (IP22/IP32)'
+ echo ' vmlinuz - Compressed boot(zboot) image'
+ echo ' vmlinuz.ecoff - ECOFF zboot image'
+ echo ' vmlinuz.bin - Raw binary zboot image'
+ echo ' vmlinuz.srec - SREC zboot image'
+ echo ' uImage - U-Boot image'
+ echo ' uImage.bin - U-Boot image (uncompressed)'
+ echo ' uImage.bz2 - U-Boot image (bz2)'
+ echo ' uImage.gz - U-Boot image (gzip)'
+ echo ' uImage.lzma - U-Boot image (lzma)'
+ echo ' uImage.lzo - U-Boot image (lzo)'
+ echo ' uzImage.bin - U-Boot image (self-extracting)'
+ echo ' dtbs - Device-tree blobs for enabled boards'
+ echo ' dtbs_install - Install dtbs to $(INSTALL_DTBS_PATH)'
+ echo ' list_generic_defconfigs - List available generic defconfigs'
+ echo ' list_generic_boards - List available generic boards'
+ echo ' list_legacy_defconfigs - List available legacy defconfigs'
echo
echo ' These will be default as appropriate for a configured platform.'
echo
@@ -538,6 +541,14 @@ generic_defconfig:
$(Q)echo
$(Q)false
+.PHONY: list_generic_defconfigs
+list_generic_defconfigs:
+ $(Q)for cfg in $(generic_defconfigs); do echo "$${cfg}"; done
+
+.PHONY: list_generic_boards
+list_generic_boards:
+ $(Q)for board in $(sort $(BOARDS)); do echo "$${board}"; done
+
#
# Legacy defconfig compatibility - these targets used to be real defconfigs but
# now that the boards have been converted to use the generic kernel they are
@@ -555,3 +566,7 @@ xilfpga_defconfig-y := 32r2el_defconfig BOARDS=xilfpga
.PHONY: $(legacy_defconfigs)
$(legacy_defconfigs):
$(Q)$(MAKE) -f $(srctree)/Makefile $($@-y)
+
+.PHONY: list_legacy_defconfigs
+list_legacy_defconfigs:
+ $(Q)for cfg in $(sort $(legacy_defconfigs)); do echo "$${cfg}"; done
--
git-series 0.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] MIPS: Expand help text to list generic defconfigs
2018-02-09 16:11 [PATCH 0/3] MIPS: Generic defconfig Makefile improvements James Hogan
2018-02-09 16:11 ` [PATCH 1/3] MIPS: Refactor legacy defconfigs James Hogan
2018-02-09 16:11 ` [PATCH 2/3] MIPS: Add generic list_* Makefile targets James Hogan
@ 2018-02-09 16:11 ` James Hogan
2 siblings, 0 replies; 5+ messages in thread
From: James Hogan @ 2018-02-09 16:11 UTC (permalink / raw)
To: linux-mips
Cc: James Hogan, Ralf Baechle, Paul Burton, Matt Redfearn, linux-kbuild
Expand the MIPS Makefile help text to list generic board names, generic
defconfigs, and legacy defconfigs which have been converted to generic
and are still usable.
Here's a snippet of the new "make ARCH=mips help" output:
...
If you are targeting a system supported by generic kernels you may
configure the kernel for a given architecture target like so:
{micro32,32,64}{r1,r2,r6}{el,}_defconfig <BOARDS="list of boards">
Where BOARDS is some subset of the following:
boston
ni169445
ranchu
sead-3
xilfpga
Specifically the following generic default configurations are
supported:
32r1_defconfig - Build generic kernel for MIPS32 r1
32r1el_defconfig - Build generic kernel for MIPS32 r1 little endian
32r2_defconfig - Build generic kernel for MIPS32 r2
32r2el_defconfig - Build generic kernel for MIPS32 r2 little endian
32r6_defconfig - Build generic kernel for MIPS32 r6
32r6el_defconfig - Build generic kernel for MIPS32 r6 little endian
64r1_defconfig - Build generic kernel for MIPS64 r1
64r1el_defconfig - Build generic kernel for MIPS64 r1 little endian
64r2_defconfig - Build generic kernel for MIPS64 r2
64r2el_defconfig - Build generic kernel for MIPS64 r2 little endian
64r6_defconfig - Build generic kernel for MIPS64 r6
64r6el_defconfig - Build generic kernel for MIPS64 r6 little endian
micro32r2_defconfig - Build generic kernel for microMIPS32 r2
micro32r2el_defconfig - Build generic kernel for microMIPS32 r2 little endian
The following legacy default configurations have been converted to
generic and can still be used:
sead3_defconfig - Build 32r2el_defconfig BOARDS=sead-3
sead3micro_defconfig - Build micro32r2el_defconfig BOARDS=sead-3
xilfpga_defconfig - Build 32r2el_defconfig BOARDS=xilfpga
...
Signed-off-by: James Hogan <jhogan@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Matt Redfearn <matt.redfearn@mips.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kbuild@vger.kernel.org
---
arch/mips/Makefile | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 9ba487c1c4d2..e7a9ec56aa51 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -476,6 +476,21 @@ define archhelp
echo
echo ' {micro32,32,64}{r1,r2,r6}{el,}_defconfig <BOARDS="list of boards">'
echo
+ echo ' Where BOARDS is some subset of the following:'
+ for board in $(sort $(BOARDS)); do echo " $${board}"; done
+ echo
+ echo ' Specifically the following generic default configurations are'
+ echo ' supported:'
+ echo
+ $(foreach cfg,$(generic_defconfigs),
+ printf " %-24s - Build generic kernel for $(call describe_generic_defconfig,$(cfg))\n" $(cfg);)
+ echo
+ echo ' The following legacy default configurations have been converted to'
+ echo ' generic and can still be used:'
+ echo
+ $(foreach cfg,$(sort $(legacy_defconfigs)),
+ printf " %-24s - Build $($(cfg)-y)\n" $(cfg);)
+ echo
echo ' Otherwise, the following default configurations are available:'
endef
@@ -510,6 +525,10 @@ endef
$(eval $(call gen_generic_defconfigs,32 64,r1 r2 r6,eb el))
$(eval $(call gen_generic_defconfigs,micro32,r2,eb el))
+define describe_generic_defconfig
+$(subst 32r,MIPS32 r,$(subst 64r,MIPS64 r,$(subst el, little endian,$(patsubst %_defconfig,%,$(1)))))
+endef
+
.PHONY: $(generic_defconfigs)
$(generic_defconfigs):
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \
--
git-series 0.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/3] MIPS: Add generic list_* Makefile targets
2018-02-09 16:11 ` [PATCH 2/3] MIPS: Add generic list_* Makefile targets James Hogan
@ 2018-02-21 3:56 ` Masahiro Yamada
0 siblings, 0 replies; 5+ messages in thread
From: Masahiro Yamada @ 2018-02-21 3:56 UTC (permalink / raw)
To: James Hogan
Cc: Linux-MIPS, Ralf Baechle, Michal Marek, Paul Burton,
Matt Redfearn, Linux Kbuild mailing list
2018-02-10 1:11 GMT+09:00 James Hogan <jhogan@kernel.org>:
> Add MIPS specific Makefile targets for listing generic defconfigs
> (list_generic_defconfigs), generic board types (list_generic_boards),
> and legacy defconfigs which have been converted to generic
> (list_legacy_defconfigs).
>
> This is useful for quick reference and for buildbots to be able to
> automatically build all supported default configurations without parsing
> of the generic_defconfig error output.
>
> In order for these to work without .config being updated or
> CROSS_COMPILE being needed, list_%s is added to no-dot-config-targets in
> the main Makefile.
>
> Signed-off-by: James Hogan <jhogan@kernel.org>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> Cc: Michal Marek <michal.lkml@markovi.net>
> Cc: Paul Burton <paul.burton@mips.com>
> Cc: Matt Redfearn <matt.redfearn@mips.com>
> Cc: linux-mips@linux-mips.org
> Cc: linux-kbuild@vger.kernel.org
> ---
> Makefile | 2 +-
> arch/mips/Makefile | 51 ++++++++++++++++++++++++++++++-----------------
> 2 files changed, 34 insertions(+), 19 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 3f4d157add54..635015848a2c 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -223,7 +223,7 @@ old_version_h := include/linux/version.h
> no-dot-config-targets := clean mrproper distclean \
> cscope gtags TAGS tags help% %docs check% coccicheck \
> $(version_h) headers_% archheaders archscripts \
> - kernelversion %src-pkg
> + kernelversion %src-pkg list_%s
>
> config-targets := 0
> mixed-targets := 0
Unfortunately, there is no way to specify arch-specific
no-dot-config-targets.
This patch made me upset a bit.
Some solutions.
[1] Decide list_% is the right thing
[2] Invent a way to add arch-specific no-dot-config-targets
For example, add arch/mips/no-dot-config
Then, append it as follows:
no-dot-config-targets := clean mrproper distclean \
cscope gtags TAGS tags help% %docs
check% coccicheck \
$(version_h) headers_% archheaders archscripts \
kernelversion %src-pkg
kernelversion %src-pkg $(shell cat
arch/$(SRCARCH)/no-dot-config)
(This needs to tweak the top Makefile a bit more)
[3] (Ab)use the existing name convention
For example, if you rename as follow,
list_generic_defconfigs -> list_generic_defconfig
list_legacy_defconfigs -> list_legacy_defconfig
This works without adding 'list_%s'
The hack of arch/mips/Makefile is so ugly,
but adding two more would not hurt.
> diff --git a/arch/mips/Makefile b/arch/mips/Makefile
> index 6f368b5cdf29..9ba487c1c4d2 100644
> --- a/arch/mips/Makefile
> +++ b/arch/mips/Makefile
> @@ -447,24 +447,27 @@ archclean:
> $(Q)$(MAKE) $(clean)=arch/mips/lasat
>
> define archhelp
> - echo ' install - install kernel into $(INSTALL_PATH)'
> - echo ' vmlinux.ecoff - ECOFF boot image'
> - echo ' vmlinux.bin - Raw binary boot image'
> - echo ' vmlinux.srec - SREC boot image'
> - echo ' vmlinux.32 - 64-bit boot image wrapped in 32bits (IP22/IP32)'
> - echo ' vmlinuz - Compressed boot(zboot) image'
> - echo ' vmlinuz.ecoff - ECOFF zboot image'
> - echo ' vmlinuz.bin - Raw binary zboot image'
> - echo ' vmlinuz.srec - SREC zboot image'
> - echo ' uImage - U-Boot image'
> - echo ' uImage.bin - U-Boot image (uncompressed)'
> - echo ' uImage.bz2 - U-Boot image (bz2)'
> - echo ' uImage.gz - U-Boot image (gzip)'
> - echo ' uImage.lzma - U-Boot image (lzma)'
> - echo ' uImage.lzo - U-Boot image (lzo)'
> - echo ' uzImage.bin - U-Boot image (self-extracting)'
> - echo ' dtbs - Device-tree blobs for enabled boards'
> - echo ' dtbs_install - Install dtbs to $(INSTALL_DTBS_PATH)'
> + echo ' install - install kernel into $(INSTALL_PATH)'
> + echo ' vmlinux.ecoff - ECOFF boot image'
> + echo ' vmlinux.bin - Raw binary boot image'
> + echo ' vmlinux.srec - SREC boot image'
> + echo ' vmlinux.32 - 64-bit boot image wrapped in 32bits (IP22/IP32)'
> + echo ' vmlinuz - Compressed boot(zboot) image'
> + echo ' vmlinuz.ecoff - ECOFF zboot image'
> + echo ' vmlinuz.bin - Raw binary zboot image'
> + echo ' vmlinuz.srec - SREC zboot image'
> + echo ' uImage - U-Boot image'
> + echo ' uImage.bin - U-Boot image (uncompressed)'
> + echo ' uImage.bz2 - U-Boot image (bz2)'
> + echo ' uImage.gz - U-Boot image (gzip)'
> + echo ' uImage.lzma - U-Boot image (lzma)'
> + echo ' uImage.lzo - U-Boot image (lzo)'
> + echo ' uzImage.bin - U-Boot image (self-extracting)'
> + echo ' dtbs - Device-tree blobs for enabled boards'
> + echo ' dtbs_install - Install dtbs to $(INSTALL_DTBS_PATH)'
> + echo ' list_generic_defconfigs - List available generic defconfigs'
> + echo ' list_generic_boards - List available generic boards'
> + echo ' list_legacy_defconfigs - List available legacy defconfigs'
> echo
> echo ' These will be default as appropriate for a configured platform.'
> echo
> @@ -538,6 +541,14 @@ generic_defconfig:
> $(Q)echo
> $(Q)false
>
> +.PHONY: list_generic_defconfigs
> +list_generic_defconfigs:
> + $(Q)for cfg in $(generic_defconfigs); do echo "$${cfg}"; done
> +
> +.PHONY: list_generic_boards
> +list_generic_boards:
> + $(Q)for board in $(sort $(BOARDS)); do echo "$${board}"; done
> +
> #
> # Legacy defconfig compatibility - these targets used to be real defconfigs but
> # now that the boards have been converted to use the generic kernel they are
> @@ -555,3 +566,7 @@ xilfpga_defconfig-y := 32r2el_defconfig BOARDS=xilfpga
> .PHONY: $(legacy_defconfigs)
> $(legacy_defconfigs):
> $(Q)$(MAKE) -f $(srctree)/Makefile $($@-y)
> +
> +.PHONY: list_legacy_defconfigs
> +list_legacy_defconfigs:
> + $(Q)for cfg in $(sort $(legacy_defconfigs)); do echo "$${cfg}"; done
> --
> git-series 0.9.1
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-02-21 3:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-09 16:11 [PATCH 0/3] MIPS: Generic defconfig Makefile improvements James Hogan
2018-02-09 16:11 ` [PATCH 1/3] MIPS: Refactor legacy defconfigs James Hogan
2018-02-09 16:11 ` [PATCH 2/3] MIPS: Add generic list_* Makefile targets James Hogan
2018-02-21 3:56 ` Masahiro Yamada
2018-02-09 16:11 ` [PATCH 3/3] MIPS: Expand help text to list generic defconfigs James Hogan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.