Skip to contentSkip to conversation

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

PATCH In review Tony Breeds 2 participants 2 messages Jun 6, 2007 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Create a dummy zImage if no valid platform has been selected.

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

 arch/powerpc/boot/Makefile |    8 ++++++++
 1 file changed, 8 insertions(+)
arch/powerpc/boot/Makefile +8 -0
Index: 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!

#1 lore raw

arch/powerpc/boot/Makefile $(obj)/zImage.%: vmlinux $(wrapperbits) · line 192

Quoted 2 lines

+$(obj)/zImage.strip: vmlinux

arch/powerpc/boot/Makefile +1 -0
+	$(STRIP) -s -R .comment $< -o $@

Bad name, you are not creating a stripped zImage, but a stripped vmlinux.

Quoted 1 line

+# If we don't have a platform selected then just strip the vmlinux.

Why do anything at all when no platform is selected?

Quoted 1 line

+ifeq ("$(image-y)", "")

No quotes needed, standard style is

ifeq (,$(image-y))

arch/powerpc/boot/Makefile $(obj)/treeImage.initrd.%: vmlinux $(dts · line 225

Quoted 5 lines
arch/powerpc/boot/Makefile +3 -0
+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