diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2013-09-11 06:34:48 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-10-29 16:24:26 -0400 |
commit | 26fca83a22f66e2ea0339e6b1ee1bdc628c1508b (patch) | |
tree | 917789db840b983cf103885e3735bba61dbacd5a /arch | |
parent | f9a7febd82f413b9c8bafd40145bc398b7eb619f (diff) |
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/Makefile | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index f9a0c30976a5..de300b993607 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
@@ -306,10 +306,16 @@ $(boot-y): $(vmlinux-32) FORCE | |||
306 | $(Q)$(MAKE) $(build)=arch/mips/boot VMLINUX=$(vmlinux-32) \ | 306 | $(Q)$(MAKE) $(build)=arch/mips/boot VMLINUX=$(vmlinux-32) \ |
307 | $(bootvars-y) arch/mips/boot/$@ | 307 | $(bootvars-y) arch/mips/boot/$@ |
308 | 308 | ||
309 | ifdef CONFIG_SYS_SUPPORTS_ZBOOT | ||
309 | # boot/compressed | 310 | # boot/compressed |
310 | $(bootz-y): $(vmlinux-32) FORCE | 311 | $(bootz-y): $(vmlinux-32) FORCE |
311 | $(Q)$(MAKE) $(build)=arch/mips/boot/compressed \ | 312 | $(Q)$(MAKE) $(build)=arch/mips/boot/compressed \ |
312 | $(bootvars-y) 32bit-bfd=$(32bit-bfd) $@ | 313 | $(bootvars-y) 32bit-bfd=$(32bit-bfd) $@ |
314 | else | ||
315 | vmlinuz: FORCE | ||
316 | @echo ' CONFIG_SYS_SUPPORTS_ZBOOT is not enabled' | ||
317 | /bin/false | ||
318 | endif | ||
313 | 319 | ||
314 | 320 | ||
315 | CLEAN_FILES += vmlinux.32 vmlinux.64 | 321 | CLEAN_FILES += vmlinux.32 vmlinux.64 |