* [PATCH] MIPS: do not allow building vmlinuz when !ZBOOT
@ 2013-08-28 15:42 Florian Fainelli
2013-08-29 12:54 ` James Hogan
0 siblings, 1 reply; 3+ messages in thread
From: Florian Fainelli @ 2013-08-28 15:42 UTC (permalink / raw)
To: linux-mips; +Cc: ralf, blogic, richard, james.hogan, Florian Fainelli
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.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
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) arch/mips/boot/$@
+ifdef CONFIG_SYS_SUPPORTS_ZBOOT
# 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) $@
+else
+vmlinuz:
+ @echo ' CONFIG_SYS_SUPPORTS_ZBOOT is not enabled'
+endif
CLEAN_FILES += vmlinux.32 vmlinux.64
--
1.8.1.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] MIPS: do not allow building vmlinuz when !ZBOOT
@ 2013-08-29 12:54 ` James Hogan
0 siblings, 0 replies; 3+ messages in thread
From: James Hogan @ 2013-08-29 12:54 UTC (permalink / raw)
To: Florian Fainelli; +Cc: linux-mips, ralf, blogic, richard
Hi Florian,
On 28/08/13 16:42, Florian Fainelli wrote:
> +ifdef CONFIG_SYS_SUPPORTS_ZBOOT
> # 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) $@
> +else
> +vmlinuz:
Does this need a dependency on FORCE so that if you switched config and
had a valid vmlinuz lying around it doesn't do nothing as a result of
vmlinuz having no dependencies and existing?
> + @echo ' CONFIG_SYS_SUPPORTS_ZBOOT is not enabled'
Also it may be worth adding false here too so that make's exit code
reports failure correctly.
Cheers
James
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] MIPS: do not allow building vmlinuz when !ZBOOT
@ 2013-08-29 12:54 ` James Hogan
0 siblings, 0 replies; 3+ messages in thread
From: James Hogan @ 2013-08-29 12:54 UTC (permalink / raw)
To: Florian Fainelli; +Cc: linux-mips, ralf, blogic, richard
Hi Florian,
On 28/08/13 16:42, Florian Fainelli wrote:
> +ifdef CONFIG_SYS_SUPPORTS_ZBOOT
> # 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) $@
> +else
> +vmlinuz:
Does this need a dependency on FORCE so that if you switched config and
had a valid vmlinuz lying around it doesn't do nothing as a result of
vmlinuz having no dependencies and existing?
> + @echo ' CONFIG_SYS_SUPPORTS_ZBOOT is not enabled'
Also it may be worth adding false here too so that make's exit code
reports failure correctly.
Cheers
James
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-08-29 12:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-28 15:42 [PATCH] MIPS: do not allow building vmlinuz when !ZBOOT Florian Fainelli
2013-08-29 12:54 ` James Hogan
2013-08-29 12:54 ` James Hogan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.