From: Masahiro Yamada <masahiroy@kernel.org>
To: x86@kernel.org, Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Borislav Petkov <bp@alien8.de>, "H . Peter Anvin" <hpa@zytor.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>,
Ard Biesheuvel <ardb@kernel.org>,
Bruce Ashfield <bruce.ashfield@gmail.com>,
Daniel Kiper <daniel.kiper@oracle.com>,
Ingo Molnar <mingo@redhat.com>,
Ross Philipson <ross.philipson@oracle.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] x86/boot/build: make 'make bzlilo' not depend on vmlinux or $(obj)/bzImage
Date: Sat, 15 Feb 2020 15:38:51 +0900 [thread overview]
Message-ID: <20200215063852.8298-1-masahiroy@kernel.org> (raw)
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
next reply other threads:[~2020-02-15 6:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-15 6:38 Masahiro Yamada [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200215063852.8298-1-masahiroy@kernel.org \
--to=masahiroy@kernel.org \
--cc=ardb@kernel.org \
--cc=bp@alien8.de \
--cc=bruce.ashfield@gmail.com \
--cc=daniel.kiper@oracle.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=ross.philipson@oracle.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome