[Top] [All Lists]

[PATCH] MIPS: do not allow building vmlinuz when !ZBOOT

Subject: [PATCH] MIPS: do not allow building vmlinuz when !ZBOOT
From: "Florian Fainelli" <>
Date: Wed, 28 Aug 2013 16:42:49 +0100
Cc:,,,, "Florian Fainelli" <>
List-archive: <>
List-help: <>
List-id: linux-mips <>
List-owner: <>
List-post: <>
List-software: Ecartis version 1.0.0
List-subscribe: <>
List-unsubscribe: <>
Original-recipient: rfc822;
When CONFIG_SYS_SUPPORTS_ZBOOT is not enabled, we will still try to
build the decompressor code in arch/mips/boot/compressed as a
dependency for producing the vmlinuz target and this will result in
the following build failure:

  OBJCOPY arch/mips/boot/compressed/vmlinux.bin
arch/mips/boot/compressed/decompress.c: In function 'decompress_kernel':
arch/mips/boot/compressed/decompress.c:105:2: error: implicit
declaration of function 'decompress'
make[1]: *** [arch/mips/boot/compressed/decompress.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [vmlinuz] Error 2

This is a genuine build failure because we have no implementation for
the decompress() function body since no kernel compression method
defined in CONFIG_KERNEL_(GZIP,BZIP2...) has been enabled.

arch/mips/Makefile already guards the install target for the "vmlinuz"
binary with a proper ifdef CONFIG_SYS_SUPPORTS_ZBOOT, we now also do the
same if we attempt to do a "make vmlinuz" and show that

Signed-off-by: Florian Fainelli <>
 arch/mips/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 37f9ef3..8e67a32 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -283,10 +283,15 @@ all:      $(all-y)
 vmlinux.bin vmlinux.ecoff vmlinux.srec: $(vmlinux-32) FORCE
        $(Q)$(MAKE) $(build)=arch/mips/boot VMLINUX=$(vmlinux-32) 
 # boot/compressed
 vmlinuz vmlinuz.bin vmlinuz.ecoff vmlinuz.srec: $(vmlinux-32) FORCE
        $(Q)$(MAKE) $(build)=arch/mips/boot/compressed \
           VMLINUX_LOAD_ADDRESS=$(load-y) 32bit-bfd=$(32bit-bfd) $@
+       @echo '   CONFIG_SYS_SUPPORTS_ZBOOT is not enabled'
 CLEAN_FILES += vmlinux.32 vmlinux.64

<Prev in Thread] Current Thread [Next in Thread>