[v6,1/2] kbuild: arm64: Add BOOT_TARGETS variable

Message ID 20231119150229.634424-2-sjg@chromium.org
State New
Headers
Series arm64: Add a build target for Flat Image Tree |

Commit Message

Simon Glass Nov. 19, 2023, 3:01 p.m. UTC
  Add a new variable containing a list of possible targets. Mark them as
phony. This matches the approach taken for arch/arm

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v6:
- Drop the unwanted .gz suffix

 arch/arm64/Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
  

Comments

Masahiro Yamada Nov. 22, 2023, 5:30 a.m. UTC | #1
On Mon, Nov 20, 2023 at 12:02 AM Simon Glass <sjg@chromium.org> wrote:
>
> Add a new variable containing a list of possible targets. Mark them as
> phony. This matches the approach taken for arch/arm
>
> Signed-off-by: Simon Glass <sjg@chromium.org>



I encounter difficulty in understanding your subject prefix policy.


You used the "arm:" prefix for a patch irrelevant to arm:
https://lore.kernel.org/linux-kbuild/CAK7LNAQN_qGYztWGDmQyfg+eZ5P7RkM47mpgp0dQn_iuhvTSWg@mail.gmail.com/




And, the one for this patch.

"kbuild: arm64: Add BOOT_TARGETS variable"

Please do not add "kbuild:" for a patch
that modifies arch/arm64, and that was not even
submitted to kbuild ML.




> ---
>
> Changes in v6:
> - Drop the unwanted .gz suffix
>
>  arch/arm64/Makefile | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
> index 4bd85cc0d32b..ae0c5ee8c78b 100644
> --- a/arch/arm64/Makefile
> +++ b/arch/arm64/Makefile
> @@ -150,6 +150,10 @@ libs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
>  # Default target when executing plain make
>  boot           := arch/arm64/boot
>
> +BOOT_TARGETS   := Image vmlinuz.efi
> +
> +PHONY += $(BOOT_TARGETS)
> +
>  ifeq ($(CONFIG_EFI_ZBOOT),)
>  KBUILD_IMAGE   := $(boot)/Image.gz
>  else
> @@ -159,7 +163,7 @@ endif
>  all:   $(notdir $(KBUILD_IMAGE))
>
>
> -Image vmlinuz.efi: vmlinux
> +$(BOOT_TARGETS): vmlinux
>         $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
>
>  Image.%: Image
> --
> 2.43.0.rc0.421.g78406f8d94-goog
>


--
Best Regards
Masahiro Yamada
  

Patch

diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index 4bd85cc0d32b..ae0c5ee8c78b 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -150,6 +150,10 @@  libs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
 # Default target when executing plain make
 boot		:= arch/arm64/boot
 
+BOOT_TARGETS	:= Image vmlinuz.efi
+
+PHONY += $(BOOT_TARGETS)
+
 ifeq ($(CONFIG_EFI_ZBOOT),)
 KBUILD_IMAGE	:= $(boot)/Image.gz
 else
@@ -159,7 +163,7 @@  endif
 all:	$(notdir $(KBUILD_IMAGE))
 
 
-Image vmlinuz.efi: vmlinux
+$(BOOT_TARGETS): vmlinux
 	$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
 
 Image.%: Image