[PATCH] Create a dummy zImage if no valid platform has been selected.

STALE7048d

2 messages, 2 authors, 2007-06-06 · open the first message on its own page

[PATCH] Create a dummy zImage if no valid platform has been selected.

From: Tony Breeds <hidden>
Date: 2007-06-06 07:01:15

Signed-off-by: Tony Breeds <redacted>

---
This is mostly aimed at getting allnoconfig to complete.

 arch/powerpc/boot/Makefile |    8 ++++++++
 1 file changed, 8 insertions(+)

Index: working/arch/powerpc/boot/Makefile
===================================================================
--- working.orig/arch/powerpc/boot/Makefile
+++ working/arch/powerpc/boot/Makefile
@@ -188,6 +188,9 @@ $(obj)/zImage.%: vmlinux $(wrapperbits)
 $(obj)/zImage.ps3: vmlinux
 	$(STRIP) -s -R .comment $< -o $@
 
+$(obj)/zImage.strip: vmlinux
+	$(STRIP) -s -R .comment $< -o $@
+
 $(obj)/zImage.initrd.ps3: vmlinux
 	@echo "  WARNING zImage.initrd.ps3 not supported (yet)"
 
@@ -213,6 +216,11 @@ $(obj)/treeImage.initrd.%: vmlinux $(dts
 $(obj)/treeImage.%: vmlinux $(dts) $(wrapperbits)
 	$(call if_changed,wrap,treeboot-$*,$(dts))
 
+# If we don't have a platform selected then just strip the vmlinux.
+ifeq ("$(image-y)", "")
+image-y := zImage.strip
+endif
+
 $(obj)/zImage:		$(addprefix $(obj)/, $(image-y))
 	@rm -f $@; ln $< $@
 $(obj)/zImage.initrd:	$(addprefix $(obj)/, $(initrd-y))

Yours Tony

  linux.conf.au        http://linux.conf.au/ || http://lca2008.linux.org.au/
  Jan 28 - Feb 02 2008 The Australian Linux Technical Conference!

Re: [PATCH] Create a dummy zImage if no valid platform has been selected.

From: Segher Boessenkool <hidden>
Date: 2007-06-06 09:27:59

+$(obj)/zImage.strip: vmlinux
+	$(STRIP) -s -R .comment $< -o $@
Bad name, you are not creating a stripped zImage, but
a stripped vmlinux.
+# If we don't have a platform selected then just strip the vmlinux.
Why do anything at all when no platform is selected?
+ifeq ("$(image-y)", "")
No quotes needed, standard style is

ifeq (,$(image-y))
+image-y := zImage.strip
+endif
+
 $(obj)/zImage:		$(addprefix $(obj)/, $(image-y))
 	@rm -f $@; ln $< $@
Perhaps the minimal change (this is a degenerated case
anyway) would be to make this command non-failing?  Or
maybe that's not desired for "normal" builds?  Hard to
see how it ever could go wrong then, but that's wishful
thinking.  Maybe  ln -sf  would be best, it would just
create a dangling softlink in the allno case (and remove
the need for the rm command, too).

What do y'all think?


Segher
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help