All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] xtensa: boot targets cleanup
@ 2020-07-22  5:34 Max Filippov
  2020-07-22  5:34 ` [PATCH 1/2] xtensa: move vmlinux.bin[.gz] to boot subdirectory Max Filippov
  2020-07-22  5:34 ` [PATCH 2/2] xtensa: add uImage and xipImage to targets Max Filippov
  0 siblings, 2 replies; 5+ messages in thread
From: Max Filippov @ 2020-07-22  5:34 UTC (permalink / raw)
  To: linux-xtensa; +Cc: Chris Zankel, linux-kernel, linux-kbuild, Max Filippov

Hello,

this small clean up in the xtensa boot subdirectory adds more targets to
the 'targets' variable to avoid unnecessary rebuils.

Max Filippov (2):
  xtensa: move vmlinux.bin[.gz] to boot subdirectory
  xtensa: add uImage and xipImage to targets

 arch/xtensa/boot/Makefile              | 12 +++++++-----
 arch/xtensa/boot/boot-elf/Makefile     |  4 ++--
 arch/xtensa/boot/boot-redboot/Makefile |  4 ++--
 3 files changed, 11 insertions(+), 9 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] xtensa: move vmlinux.bin[.gz] to boot subdirectory
  2020-07-22  5:34 [PATCH 0/2] xtensa: boot targets cleanup Max Filippov
@ 2020-07-22  5:34 ` Max Filippov
  2020-07-24 17:21   ` Masahiro Yamada
  2020-07-22  5:34 ` [PATCH 2/2] xtensa: add uImage and xipImage to targets Max Filippov
  1 sibling, 1 reply; 5+ messages in thread
From: Max Filippov @ 2020-07-22  5:34 UTC (permalink / raw)
  To: linux-xtensa; +Cc: Chris Zankel, linux-kernel, linux-kbuild, Max Filippov

vmlinux.bin and vmlinux.bin.gz are always rebuilt in the kernel build
process. Add them to 'targets' and move them to the boot subdirectory
where their rules are. Update make rules that refer to them.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
 arch/xtensa/boot/Makefile              | 11 ++++++-----
 arch/xtensa/boot/boot-elf/Makefile     |  4 ++--
 arch/xtensa/boot/boot-redboot/Makefile |  4 ++--
 3 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/arch/xtensa/boot/Makefile b/arch/xtensa/boot/Makefile
index 1a14d38d9b33..801fe30b4dfe 100644
--- a/arch/xtensa/boot/Makefile
+++ b/arch/xtensa/boot/Makefile
@@ -17,6 +17,7 @@ BIG_ENDIAN	:= $(shell echo __XTENSA_EB__ | $(CC) -E - | grep -v "\#")
 export BIG_ENDIAN
 
 subdir-y	:= lib
+targets		+= vmlinux.bin vmlinux.bin.gz
 
 # Subdirs for the boot loader(s)
 
@@ -35,19 +36,19 @@ boot-elf boot-redboot: $(addprefix $(obj)/,$(subdir-y))
 
 OBJCOPYFLAGS = --strip-all -R .comment -R .notes -O binary
 
-vmlinux.bin: vmlinux FORCE
+$(obj)/vmlinux.bin: vmlinux FORCE
 	$(call if_changed,objcopy)
 
-vmlinux.bin.gz: vmlinux.bin FORCE
+$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
 	$(call if_changed,gzip)
 
-boot-elf: vmlinux.bin
-boot-redboot: vmlinux.bin.gz
+boot-elf: $(obj)/vmlinux.bin
+boot-redboot: $(obj)/vmlinux.bin.gz
 
 UIMAGE_LOADADDR = $(CONFIG_KERNEL_LOAD_ADDRESS)
 UIMAGE_COMPRESSION = gzip
 
-$(obj)/uImage: vmlinux.bin.gz FORCE
+$(obj)/uImage: $(obj)/vmlinux.bin.gz FORCE
 	$(call if_changed,uimage)
 	$(Q)$(kecho) '  Kernel: $@ is ready'
 
diff --git a/arch/xtensa/boot/boot-elf/Makefile b/arch/xtensa/boot/boot-elf/Makefile
index badee63dae27..0ebc9827f7e5 100644
--- a/arch/xtensa/boot/boot-elf/Makefile
+++ b/arch/xtensa/boot/boot-elf/Makefile
@@ -19,9 +19,9 @@ targets		+= $(boot-y) boot.lds
 
 OBJS		:= $(addprefix $(obj)/,$(boot-y))
 
-$(obj)/Image.o: vmlinux.bin $(OBJS)
+$(obj)/Image.o: $(obj)/../vmlinux.bin $(OBJS)
 	$(Q)$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
-		--add-section image=vmlinux.bin \
+		--add-section image=$< \
 		--set-section-flags image=contents,alloc,load,load,data \
 		$(OBJS) $@
 
diff --git a/arch/xtensa/boot/boot-redboot/Makefile b/arch/xtensa/boot/boot-redboot/Makefile
index 1a277dd57b2a..07cb24afedc2 100644
--- a/arch/xtensa/boot/boot-redboot/Makefile
+++ b/arch/xtensa/boot/boot-redboot/Makefile
@@ -20,9 +20,9 @@ LIBS	:= arch/xtensa/boot/lib/lib.a arch/xtensa/lib/lib.a
 
 LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
 
-$(obj)/zImage.o: vmlinux.bin.gz $(OBJS)
+$(obj)/zImage.o: $(obj)/../vmlinux.bin.gz $(OBJS)
 	$(Q)$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
-		--add-section image=vmlinux.bin.gz \
+		--add-section image=$< \
 		--set-section-flags image=contents,alloc,load,load,data \
 		$(OBJS) $@
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] xtensa: add uImage and xipImage to targets
  2020-07-22  5:34 [PATCH 0/2] xtensa: boot targets cleanup Max Filippov
  2020-07-22  5:34 ` [PATCH 1/2] xtensa: move vmlinux.bin[.gz] to boot subdirectory Max Filippov
@ 2020-07-22  5:34 ` Max Filippov
  2020-07-24 17:21   ` Masahiro Yamada
  1 sibling, 1 reply; 5+ messages in thread
From: Max Filippov @ 2020-07-22  5:34 UTC (permalink / raw)
  To: linux-xtensa; +Cc: Chris Zankel, linux-kernel, linux-kbuild, Max Filippov

uImage and xipImage are always rebuilt in the xtensa kernel build
process. Add them to 'targets' to avoid that.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
 arch/xtensa/boot/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/xtensa/boot/Makefile b/arch/xtensa/boot/Makefile
index 801fe30b4dfe..f6bb352f94b4 100644
--- a/arch/xtensa/boot/Makefile
+++ b/arch/xtensa/boot/Makefile
@@ -18,6 +18,7 @@ export BIG_ENDIAN
 
 subdir-y	:= lib
 targets		+= vmlinux.bin vmlinux.bin.gz
+targets		+= uImage xipImage
 
 # Subdirs for the boot loader(s)
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] xtensa: move vmlinux.bin[.gz] to boot subdirectory
  2020-07-22  5:34 ` [PATCH 1/2] xtensa: move vmlinux.bin[.gz] to boot subdirectory Max Filippov
@ 2020-07-24 17:21   ` Masahiro Yamada
  0 siblings, 0 replies; 5+ messages in thread
From: Masahiro Yamada @ 2020-07-24 17:21 UTC (permalink / raw)
  To: Max Filippov
  Cc: open list:TENSILICA XTENSA PORT (xtensa),
	Chris Zankel, Linux Kernel Mailing List, linux-kbuild

On Wed, Jul 22, 2020 at 2:34 PM Max Filippov <jcmvbkbc@gmail.com> wrote:
>
> vmlinux.bin and vmlinux.bin.gz are always rebuilt in the kernel build
> process. Add them to 'targets' and move them to the boot subdirectory
> where their rules are. Update make rules that refer to them.
>
> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
> ---

Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>


>  arch/xtensa/boot/Makefile              | 11 ++++++-----
>  arch/xtensa/boot/boot-elf/Makefile     |  4 ++--
>  arch/xtensa/boot/boot-redboot/Makefile |  4 ++--
>  3 files changed, 10 insertions(+), 9 deletions(-)
>
> diff --git a/arch/xtensa/boot/Makefile b/arch/xtensa/boot/Makefile
> index 1a14d38d9b33..801fe30b4dfe 100644
> --- a/arch/xtensa/boot/Makefile
> +++ b/arch/xtensa/boot/Makefile
> @@ -17,6 +17,7 @@ BIG_ENDIAN    := $(shell echo __XTENSA_EB__ | $(CC) -E - | grep -v "\#")
>  export BIG_ENDIAN
>
>  subdir-y       := lib
> +targets                += vmlinux.bin vmlinux.bin.gz
>
>  # Subdirs for the boot loader(s)
>
> @@ -35,19 +36,19 @@ boot-elf boot-redboot: $(addprefix $(obj)/,$(subdir-y))
>
>  OBJCOPYFLAGS = --strip-all -R .comment -R .notes -O binary
>
> -vmlinux.bin: vmlinux FORCE
> +$(obj)/vmlinux.bin: vmlinux FORCE
>         $(call if_changed,objcopy)
>
> -vmlinux.bin.gz: vmlinux.bin FORCE
> +$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
>         $(call if_changed,gzip)
>
> -boot-elf: vmlinux.bin
> -boot-redboot: vmlinux.bin.gz
> +boot-elf: $(obj)/vmlinux.bin
> +boot-redboot: $(obj)/vmlinux.bin.gz
>
>  UIMAGE_LOADADDR = $(CONFIG_KERNEL_LOAD_ADDRESS)
>  UIMAGE_COMPRESSION = gzip
>
> -$(obj)/uImage: vmlinux.bin.gz FORCE
> +$(obj)/uImage: $(obj)/vmlinux.bin.gz FORCE
>         $(call if_changed,uimage)
>         $(Q)$(kecho) '  Kernel: $@ is ready'
>
> diff --git a/arch/xtensa/boot/boot-elf/Makefile b/arch/xtensa/boot/boot-elf/Makefile
> index badee63dae27..0ebc9827f7e5 100644
> --- a/arch/xtensa/boot/boot-elf/Makefile
> +++ b/arch/xtensa/boot/boot-elf/Makefile
> @@ -19,9 +19,9 @@ targets               += $(boot-y) boot.lds
>
>  OBJS           := $(addprefix $(obj)/,$(boot-y))
>
> -$(obj)/Image.o: vmlinux.bin $(OBJS)
> +$(obj)/Image.o: $(obj)/../vmlinux.bin $(OBJS)
>         $(Q)$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
> -               --add-section image=vmlinux.bin \
> +               --add-section image=$< \
>                 --set-section-flags image=contents,alloc,load,load,data \
>                 $(OBJS) $@
>
> diff --git a/arch/xtensa/boot/boot-redboot/Makefile b/arch/xtensa/boot/boot-redboot/Makefile
> index 1a277dd57b2a..07cb24afedc2 100644
> --- a/arch/xtensa/boot/boot-redboot/Makefile
> +++ b/arch/xtensa/boot/boot-redboot/Makefile
> @@ -20,9 +20,9 @@ LIBS  := arch/xtensa/boot/lib/lib.a arch/xtensa/lib/lib.a
>
>  LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
>
> -$(obj)/zImage.o: vmlinux.bin.gz $(OBJS)
> +$(obj)/zImage.o: $(obj)/../vmlinux.bin.gz $(OBJS)
>         $(Q)$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
> -               --add-section image=vmlinux.bin.gz \
> +               --add-section image=$< \
>                 --set-section-flags image=contents,alloc,load,load,data \
>                 $(OBJS) $@
>
> --
> 2.20.1
>


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] xtensa: add uImage and xipImage to targets
  2020-07-22  5:34 ` [PATCH 2/2] xtensa: add uImage and xipImage to targets Max Filippov
@ 2020-07-24 17:21   ` Masahiro Yamada
  0 siblings, 0 replies; 5+ messages in thread
From: Masahiro Yamada @ 2020-07-24 17:21 UTC (permalink / raw)
  To: Max Filippov
  Cc: open list:TENSILICA XTENSA PORT (xtensa),
	Chris Zankel, Linux Kernel Mailing List, linux-kbuild

On Wed, Jul 22, 2020 at 2:34 PM Max Filippov <jcmvbkbc@gmail.com> wrote:
>
> uImage and xipImage are always rebuilt in the xtensa kernel build
> process. Add them to 'targets' to avoid that.
>
> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
> ---


Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>


>  arch/xtensa/boot/Makefile | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/xtensa/boot/Makefile b/arch/xtensa/boot/Makefile
> index 801fe30b4dfe..f6bb352f94b4 100644
> --- a/arch/xtensa/boot/Makefile
> +++ b/arch/xtensa/boot/Makefile
> @@ -18,6 +18,7 @@ export BIG_ENDIAN
>
>  subdir-y       := lib
>  targets                += vmlinux.bin vmlinux.bin.gz
> +targets                += uImage xipImage
>
>  # Subdirs for the boot loader(s)
>
> --
> 2.20.1
>


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-07-24 17:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-22  5:34 [PATCH 0/2] xtensa: boot targets cleanup Max Filippov
2020-07-22  5:34 ` [PATCH 1/2] xtensa: move vmlinux.bin[.gz] to boot subdirectory Max Filippov
2020-07-24 17:21   ` Masahiro Yamada
2020-07-22  5:34 ` [PATCH 2/2] xtensa: add uImage and xipImage to targets Max Filippov
2020-07-24 17:21   ` Masahiro Yamada

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.