All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] x86/boot/build: make 'make bzlilo' not depend on vmlinux or $(obj)/bzImage
@ 2020-02-15  6:38 Masahiro Yamada
  2020-02-15  6:38 ` [PATCH 2/2] x86/boot/build: add phony targets in arch/x86/boot/Makefile to PHONY Masahiro Yamada
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Masahiro Yamada @ 2020-02-15  6:38 UTC (permalink / raw)
  To: x86, Ingo Molnar, Thomas Gleixner, Borislav Petkov, H . Peter Anvin
  Cc: Masahiro Yamada, Ard Biesheuvel, Bruce Ashfield, Daniel Kiper,
	Ingo Molnar, Ross Philipson, linux-kernel

bzlilo is an installation target because it copies files to
$(INSTALL_PATH)/, then runs 'lilo'.

However, arch/x86/Makefile and arch/x86/boot/Makefile have it depend on
vmlinux, $(obj)/bzImage, respectively.

'make bzlilo' may update some build artifacts in the source tree.

As commit 19514fc665ff ("arm, kbuild: make "make install" not depend
on vmlinux") explained, it should not happen.

Make 'bzlilo' not depend on any build artifact.

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

 arch/x86/Makefile      | 6 +++---
 arch/x86/boot/Makefile | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 94df0868804b..a034d7787b7e 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -267,7 +267,7 @@ drivers-$(CONFIG_FB) += arch/x86/video/
 
 boot := arch/x86/boot
 
-BOOT_TARGETS = bzlilo bzdisk fdimage fdimage144 fdimage288 isoimage
+BOOT_TARGETS = bzdisk fdimage fdimage144 fdimage288 isoimage
 
 PHONY += bzImage $(BOOT_TARGETS)
 
@@ -288,8 +288,8 @@ endif
 $(BOOT_TARGETS): vmlinux
 	$(Q)$(MAKE) $(build)=$(boot) $@
 
-PHONY += install
-install:
+PHONY += install bzlilo
+install bzlilo:
 	$(Q)$(MAKE) $(build)=$(boot) $@
 
 PHONY += vdso_install
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
index 050164ba3def..1b37746aab82 100644
--- a/arch/x86/boot/Makefile
+++ b/arch/x86/boot/Makefile
@@ -144,7 +144,7 @@ isoimage: $(obj)/bzImage
 	$(call cmd,genimage,isoimage,$(obj)/image.iso)
 	@$(kecho) 'Kernel: $(obj)/image.iso is ready'
 
-bzlilo: $(obj)/bzImage
+bzlilo:
 	if [ -f $(INSTALL_PATH)/vmlinuz ]; then mv $(INSTALL_PATH)/vmlinuz $(INSTALL_PATH)/vmlinuz.old; fi
 	if [ -f $(INSTALL_PATH)/System.map ]; then mv $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi
 	cat $(obj)/bzImage > $(INSTALL_PATH)/vmlinuz
-- 
2.17.1


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

* [PATCH 2/2] x86/boot/build: add phony targets in arch/x86/boot/Makefile to PHONY
  2020-02-15  6:38 [PATCH 1/2] x86/boot/build: make 'make bzlilo' not depend on vmlinux or $(obj)/bzImage Masahiro Yamada
@ 2020-02-15  6:38 ` Masahiro Yamada
  2020-04-21 18:30   ` [tip: x86/build] x86/boot/build: Add " tip-bot2 for Masahiro Yamada
  2020-03-30  6:40 ` [PATCH 1/2] x86/boot/build: make 'make bzlilo' not depend on vmlinux or $(obj)/bzImage Masahiro Yamada
  2020-04-21 18:30 ` [tip: x86/build] x86/boot/build: Make " tip-bot2 for Masahiro Yamada
  2 siblings, 1 reply; 5+ messages in thread
From: Masahiro Yamada @ 2020-02-15  6:38 UTC (permalink / raw)
  To: x86, Ingo Molnar, Thomas Gleixner, Borislav Petkov, H . Peter Anvin
  Cc: Masahiro Yamada, Ard Biesheuvel, Bruce Ashfield, Daniel Kiper,
	Ingo Molnar, Konrad Rzeszutek Wilk, Ross Burton, Ross Philipson,
	linux-kernel

These targets are correctly added to PHONY in arch/x86/Makefile, but
you need do so in arch/x86/boot/Makefile, too.

Otherwise, if you have a file 'install' in the top directory,
'make install' does nothing.

  $ touch install
  $ make install
  make[1]: 'install' is up to date.

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

 arch/x86/boot/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
index 1b37746aab82..fc889bcfc2f8 100644
--- a/arch/x86/boot/Makefile
+++ b/arch/x86/boot/Makefile
@@ -127,6 +127,8 @@ quiet_cmd_genimage = GENIMAGE $3
 cmd_genimage = sh $(srctree)/$(src)/genimage.sh $2 $3 $(obj)/bzImage \
 			$(obj)/mtools.conf '$(image_cmdline)' $(FDINITRD)
 
+PHONY += bzdisk fdimage fdimage144 fdimage288 isoimage bzlilo install
+
 # This requires write access to /dev/fd0
 bzdisk: $(obj)/bzImage $(obj)/mtools.conf
 	$(call cmd,genimage,bzdisk,/dev/fd0)
-- 
2.17.1


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

* Re: [PATCH 1/2] x86/boot/build: make 'make bzlilo' not depend on vmlinux or $(obj)/bzImage
  2020-02-15  6:38 [PATCH 1/2] x86/boot/build: make 'make bzlilo' not depend on vmlinux or $(obj)/bzImage Masahiro Yamada
  2020-02-15  6:38 ` [PATCH 2/2] x86/boot/build: add phony targets in arch/x86/boot/Makefile to PHONY Masahiro Yamada
@ 2020-03-30  6:40 ` Masahiro Yamada
  2020-04-21 18:30 ` [tip: x86/build] x86/boot/build: Make " tip-bot2 for Masahiro Yamada
  2 siblings, 0 replies; 5+ messages in thread
From: Masahiro Yamada @ 2020-03-30  6:40 UTC (permalink / raw)
  To: X86 ML, Ingo Molnar, Thomas Gleixner, Borislav Petkov, H . Peter Anvin
  Cc: Ard Biesheuvel, Bruce Ashfield, Daniel Kiper, Ingo Molnar,
	Ross Philipson, Linux Kernel Mailing List

Hi

On Sat, Feb 15, 2020 at 3:39 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> bzlilo is an installation target because it copies files to
> $(INSTALL_PATH)/, then runs 'lilo'.
>
> However, arch/x86/Makefile and arch/x86/boot/Makefile have it depend on
> vmlinux, $(obj)/bzImage, respectively.
>
> 'make bzlilo' may update some build artifacts in the source tree.
>
> As commit 19514fc665ff ("arm, kbuild: make "make install" not depend
> on vmlinux") explained, it should not happen.
>
> Make 'bzlilo' not depend on any build artifact.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


Ping.
Can you pick up this series?

Thanks.


> ---
>
>  arch/x86/Makefile      | 6 +++---
>  arch/x86/boot/Makefile | 2 +-
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/x86/Makefile b/arch/x86/Makefile
> index 94df0868804b..a034d7787b7e 100644
> --- a/arch/x86/Makefile
> +++ b/arch/x86/Makefile
> @@ -267,7 +267,7 @@ drivers-$(CONFIG_FB) += arch/x86/video/
>
>  boot := arch/x86/boot
>
> -BOOT_TARGETS = bzlilo bzdisk fdimage fdimage144 fdimage288 isoimage
> +BOOT_TARGETS = bzdisk fdimage fdimage144 fdimage288 isoimage
>
>  PHONY += bzImage $(BOOT_TARGETS)
>
> @@ -288,8 +288,8 @@ endif
>  $(BOOT_TARGETS): vmlinux
>         $(Q)$(MAKE) $(build)=$(boot) $@
>
> -PHONY += install
> -install:
> +PHONY += install bzlilo
> +install bzlilo:
>         $(Q)$(MAKE) $(build)=$(boot) $@
>
>  PHONY += vdso_install
> diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
> index 050164ba3def..1b37746aab82 100644
> --- a/arch/x86/boot/Makefile
> +++ b/arch/x86/boot/Makefile
> @@ -144,7 +144,7 @@ isoimage: $(obj)/bzImage
>         $(call cmd,genimage,isoimage,$(obj)/image.iso)
>         @$(kecho) 'Kernel: $(obj)/image.iso is ready'
>
> -bzlilo: $(obj)/bzImage
> +bzlilo:
>         if [ -f $(INSTALL_PATH)/vmlinuz ]; then mv $(INSTALL_PATH)/vmlinuz $(INSTALL_PATH)/vmlinuz.old; fi
>         if [ -f $(INSTALL_PATH)/System.map ]; then mv $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi
>         cat $(obj)/bzImage > $(INSTALL_PATH)/vmlinuz
> --
> 2.17.1
>


-- 
Best Regards
Masahiro Yamada

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

* [tip: x86/build] x86/boot/build: Add phony targets in arch/x86/boot/Makefile to PHONY
  2020-02-15  6:38 ` [PATCH 2/2] x86/boot/build: add phony targets in arch/x86/boot/Makefile to PHONY Masahiro Yamada
@ 2020-04-21 18:30   ` tip-bot2 for Masahiro Yamada
  0 siblings, 0 replies; 5+ messages in thread
From: tip-bot2 for Masahiro Yamada @ 2020-04-21 18:30 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Masahiro Yamada, Borislav Petkov, x86, LKML

The following commit has been merged into the x86/build branch of tip:

Commit-ID:     675a59b7dec6e03c5fb060f18fc25b2e56be3c7a
Gitweb:        https://git.kernel.org/tip/675a59b7dec6e03c5fb060f18fc25b2e56be3c7a
Author:        Masahiro Yamada <masahiroy@kernel.org>
AuthorDate:    Sat, 15 Feb 2020 15:38:52 +09:00
Committer:     Borislav Petkov <bp@suse.de>
CommitterDate: Tue, 21 Apr 2020 18:30:58 +02:00

x86/boot/build: Add phony targets in arch/x86/boot/Makefile to PHONY

These targets are correctly added to PHONY in arch/x86/Makefile, but
not in arch/x86/boot/Makefile. Thus, with a file 'install' in the top
directory, 'make install' does nothing:

  $ touch install
  $ make install
  make[1]: 'install' is up to date.

Add them to the PHONY targets in the boot Makefile too.

 [ bp: Massage. ]

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20200215063852.8298-2-masahiroy@kernel.org
---
 arch/x86/boot/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
index f1bf4a7..4c53556 100644
--- a/arch/x86/boot/Makefile
+++ b/arch/x86/boot/Makefile
@@ -128,6 +128,8 @@ quiet_cmd_genimage = GENIMAGE $3
 cmd_genimage = sh $(srctree)/$(src)/genimage.sh $2 $3 $(obj)/bzImage \
 			$(obj)/mtools.conf '$(image_cmdline)' $(FDINITRD)
 
+PHONY += bzdisk fdimage fdimage144 fdimage288 isoimage bzlilo install
+
 # This requires write access to /dev/fd0
 bzdisk: $(obj)/bzImage $(obj)/mtools.conf
 	$(call cmd,genimage,bzdisk,/dev/fd0)

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

* [tip: x86/build] x86/boot/build: Make 'make bzlilo' not depend on vmlinux or $(obj)/bzImage
  2020-02-15  6:38 [PATCH 1/2] x86/boot/build: make 'make bzlilo' not depend on vmlinux or $(obj)/bzImage Masahiro Yamada
  2020-02-15  6:38 ` [PATCH 2/2] x86/boot/build: add phony targets in arch/x86/boot/Makefile to PHONY Masahiro Yamada
  2020-03-30  6:40 ` [PATCH 1/2] x86/boot/build: make 'make bzlilo' not depend on vmlinux or $(obj)/bzImage Masahiro Yamada
@ 2020-04-21 18:30 ` tip-bot2 for Masahiro Yamada
  2 siblings, 0 replies; 5+ messages in thread
From: tip-bot2 for Masahiro Yamada @ 2020-04-21 18:30 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Masahiro Yamada, Borislav Petkov, x86, LKML

The following commit has been merged into the x86/build branch of tip:

Commit-ID:     30ce434e44d7e142e7a36c6b3eb2545adf692c67
Gitweb:        https://git.kernel.org/tip/30ce434e44d7e142e7a36c6b3eb2545adf692c67
Author:        Masahiro Yamada <masahiroy@kernel.org>
AuthorDate:    Sat, 15 Feb 2020 15:38:51 +09:00
Committer:     Borislav Petkov <bp@suse.de>
CommitterDate: Tue, 21 Apr 2020 18:10:28 +02:00

x86/boot/build: Make 'make bzlilo' not depend on vmlinux or $(obj)/bzImage

bzlilo is an installation target because it copies files to
$(INSTALL_PATH)/, then runs 'lilo'. However, arch/x86/Makefile and
arch/x86/boot/Makefile have it depend on vmlinux and $(obj)/bzImage,
respectively.

'make bzlilo' may update some build artifacts in the source tree.

As commit

  19514fc665ff ("arm, kbuild: make "make install" not depend on vmlinux")

explained, this should not happen.

Make 'bzlilo' not depend on any build artifact.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20200215063852.8298-1-masahiroy@kernel.org
---
 arch/x86/Makefile      | 6 +++---
 arch/x86/boot/Makefile | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index b65ec63..00e378d 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -246,7 +246,7 @@ drivers-$(CONFIG_FB) += arch/x86/video/
 
 boot := arch/x86/boot
 
-BOOT_TARGETS = bzlilo bzdisk fdimage fdimage144 fdimage288 isoimage
+BOOT_TARGETS = bzdisk fdimage fdimage144 fdimage288 isoimage
 
 PHONY += bzImage $(BOOT_TARGETS)
 
@@ -267,8 +267,8 @@ endif
 $(BOOT_TARGETS): vmlinux
 	$(Q)$(MAKE) $(build)=$(boot) $@
 
-PHONY += install
-install:
+PHONY += install bzlilo
+install bzlilo:
 	$(Q)$(MAKE) $(build)=$(boot) $@
 
 PHONY += vdso_install
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
index 02c8d1c..f1bf4a7 100644
--- a/arch/x86/boot/Makefile
+++ b/arch/x86/boot/Makefile
@@ -145,7 +145,7 @@ isoimage: $(obj)/bzImage
 	$(call cmd,genimage,isoimage,$(obj)/image.iso)
 	@$(kecho) 'Kernel: $(obj)/image.iso is ready'
 
-bzlilo: $(obj)/bzImage
+bzlilo:
 	if [ -f $(INSTALL_PATH)/vmlinuz ]; then mv $(INSTALL_PATH)/vmlinuz $(INSTALL_PATH)/vmlinuz.old; fi
 	if [ -f $(INSTALL_PATH)/System.map ]; then mv $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi
 	cat $(obj)/bzImage > $(INSTALL_PATH)/vmlinuz

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

end of thread, other threads:[~2020-04-21 18:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-15  6:38 [PATCH 1/2] x86/boot/build: make 'make bzlilo' not depend on vmlinux or $(obj)/bzImage Masahiro Yamada
2020-02-15  6:38 ` [PATCH 2/2] x86/boot/build: add phony targets in arch/x86/boot/Makefile to PHONY Masahiro Yamada
2020-04-21 18:30   ` [tip: x86/build] x86/boot/build: Add " tip-bot2 for Masahiro Yamada
2020-03-30  6:40 ` [PATCH 1/2] x86/boot/build: make 'make bzlilo' not depend on vmlinux or $(obj)/bzImage Masahiro Yamada
2020-04-21 18:30 ` [tip: x86/build] x86/boot/build: Make " tip-bot2 for 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.