Skip to content

Commit

Permalink
x86/boot/build: Make 'make bzlilo' not depend on vmlinux or $(obj)/bz…
Browse files Browse the repository at this point in the history
…Image

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

  19514fc ("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
  • Loading branch information
Masahiro Yamada authored and Borislav Petkov committed Apr 21, 2020
1 parent e3c7c10 commit 30ce434
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions arch/x86/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/boot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 30ce434

Please sign in to comment.