]> git.karo-electronics.de Git - karo-tx-linux.git/commit
MIPS: Kbuild: Do not allow building vmlinuz when !ZBOOT
authorFlorian Fainelli <f.fainelli@gmail.com>
Wed, 11 Sep 2013 10:34:48 +0000 (11:34 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 25 Sep 2013 16:07:06 +0000 (18:07 +0200)
commitdda6f80dbdbcff8e39ce48dfaa8b75db6c8b13a4
tree027e692cc280b1d8d79cb8fd33c1161d1d002930
parent536c7ace58a5f72d109425ae4998daa27903f0b0
MIPS: Kbuild: Do not allow building vmlinuz when !ZBOOT

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
CONFIG_SYS_SUPPORTS_ZBOOT is not enabled.

[ralf@linux-mips.org: Cleanup the makefile rule as suggested by James
Hogan.]

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: James Hogan <james.hogan@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: blogic@openwrt.org
Cc: richard@nod.at
Patchwork: https://patchwork.linux-mips.org/patch/5817/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/Makefile