Patchwork sparc64: build compressed image (zImage) by default

login
register
mail settings
Submitter Frans Pop
Date June 29, 2009, 10:45 a.m.
Message ID <200906291245.59887.elendil@planet.nl>
Download mbox | patch
Permalink /patch/29268/
State Accepted
Delegated to: David Miller
Headers show

Comments

Frans Pop - June 29, 2009, 10:45 a.m.
From: Jurij Smakov <jurij@wooyd.org>
Subject: sparc64: build compressed image (zImage) by default

Besides creating the uncompressed vmlinux image for sparc64, also
create a compressed zImage. This is more consistent with other
architectures and required to make the 'deb-pkg' target work.

Signed-off-by: Jurij Smakov <jurij@wooyd.org>
Signed-off-by: Frans Pop <elendil@planet.nl>

---
The patch was taken from the Debian kernel package. It was written by
Jurij. I added his Signed-off-by with his permission.

The patch was tested to work during my recent tests for the cmd64x issue.

--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Aug. 17, 2009, 3:23 a.m.
From: Frans Pop <elendil@planet.nl>
Date: Mon, 29 Jun 2009 12:45:59 +0200

> From: Jurij Smakov <jurij@wooyd.org>
> Subject: sparc64: build compressed image (zImage) by default
> 
> Besides creating the uncompressed vmlinux image for sparc64, also
> create a compressed zImage. This is more consistent with other
> architectures and required to make the 'deb-pkg' target work.
> 
> Signed-off-by: Jurij Smakov <jurij@wooyd.org>
> Signed-off-by: Frans Pop <elendil@planet.nl>

This is fine, however:

> @@ -91,6 +91,9 @@ endif
>  
>  boot := arch/sparc/boot
>  
> +# Default target
> +all: zImage
> +
>  image zImage tftpboot.img vmlinux.aout: vmlinux
>  	$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
>  

If we are going to add this target to the 32/64 agnostic part of the
Makefile, we should remove the identical chunk earlier in the 32-bit
specific section.

I took the liberty of making that cleanup when applying this,
thanks!

--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
index 2003ded..2adc5ea 100644
--- a/arch/sparc/Makefile
+++ b/arch/sparc/Makefile
@@ -91,6 +91,9 @@  endif
 
 boot := arch/sparc/boot
 
+# Default target
+all: zImage
+
 image zImage tftpboot.img vmlinux.aout: vmlinux
 	$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
 
diff --git a/arch/sparc/boot/Makefile b/arch/sparc/boot/Makefile
index 1ff0fd9..97e3feb 100644
--- a/arch/sparc/boot/Makefile
+++ b/arch/sparc/boot/Makefile
@@ -79,6 +79,9 @@  $(obj)/image: vmlinux FORCE
 	$(call if_changed,strip)
 	@echo '  kernel: $@ is ready'
 
+$(obj)/zImage: $(obj)/image
+	$(call if_changed,gzip)
+
 $(obj)/tftpboot.img: $(obj)/image $(obj)/piggyback_64 System.map $(ROOT_IMG) FORCE
 	$(call if_changed,elftoaout)
 	$(call if_changed,piggy)