Re: Sparc netboot image is too large to boot (again)

2012-02-19 Thread Jurij Smakov
On Sat, Feb 18, 2012 at 09:58:25PM +0100, Bastian Blank wrote:
> On Fri, Feb 17, 2012 at 08:00:24PM +, Jurij Smakov wrote:
> > Attached patch implements the switch. It's not particularly elegant, 
> > but minimally intrusive, only affecting the building ot sparc's 
> > netboot image. I would like to commit it some time next week, unless 
> > anyone objects.
> 
> I would do that for all architectures. There is no reason to use gzip on
> any of them.

I wouldn't want to break the netboot images for other arches by 
making changes which are not really required. Each architecture 
probably has some considerations I'm not necessarily aware of, so I 
would suggest to individual architecture porters to test xz 
compression out, paving the way to making it the default.

Best regards,  
-- 
Jurij Smakov   ju...@wooyd.org
Key: http://www.wooyd.org/pgpkey/  KeyID: C99E03CC


-- 
To UNSUBSCRIBE, email to debian-sparc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120219115009.ga3...@wooyd.org



Re: Sparc netboot image is too large to boot (again)

2012-02-18 Thread Bastian Blank
On Fri, Feb 17, 2012 at 08:00:24PM +, Jurij Smakov wrote:
> Attached patch implements the switch. It's not particularly elegant, 
> but minimally intrusive, only affecting the building ot sparc's 
> netboot image. I would like to commit it some time next week, unless 
> anyone objects.

I would do that for all architectures. There is no reason to use gzip on
any of them.

Bastian

-- 
"We have the right to survive!"
"Not by killing others."
-- Deela and Kirk, "Wink of An Eye", stardate 5710.5


-- 
To UNSUBSCRIBE, email to debian-sparc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120218205825.ga25...@wavehammer.waldi.eu.org



Re: Sparc netboot image is too large to boot (again)

2012-02-17 Thread Jurij Smakov
On Sun, Feb 05, 2012 at 03:11:48PM +0100, Samuel Thibault wrote:
> Bastian Blank, le Sun 05 Feb 2012 14:55:49 +0100, a écrit :
> > On Sun, Feb 05, 2012 at 02:09:11PM +0100, Samuel Thibault wrote:
> > > AIUI, linux can now have support for uncompressing bzip2, lzma and lzo.
> > 
> > CONFIG_RD_GZIP=y
> > CONFIG_RD_BZIP2=y
> > CONFIG_RD_LZMA=y
> > CONFIG_RD_XZ=y
> > CONFIG_RD_LZO=y
> > 
> > The amd64 image have support for gzip, bzip2, lzma and the xz variant.
> 
> Ah, right, it's not explicitly set in the linux-2.6 configs, but
> automatically enabled by Kconfig.
> 
> So, anything against using xz compression instead? (except that there
> might be quite a few scripts to update from initrd.gz to initrd.xz...)

Samuel, thanks a lot for all ideas. Using xz on the sparc's netboot 
initrd image reduces its size dramatically:

-rw-r--r--  1 jurij jurij 4341553 Feb 17 18:50 initrd.gz
-rw-r--r--  1 jurij jurij 3083408 Feb 17 18:51 initrd.xz

Attached patch implements the switch. It's not particularly elegant, 
but minimally intrusive, only affecting the building ot sparc's 
netboot image. I would like to commit it some time next week, unless 
anyone objects.

Best regards,
-- 
Jurij Smakov   ju...@wooyd.org
Key: http://www.wooyd.org/pgpkey/  KeyID: C99E03CC
>From 821362eaaba0982132ad2ed54c9aff4be01eee38 Mon Sep 17 00:00:00 2001
From: Jurij Smakov 
Date: Fri, 17 Feb 2012 19:07:45 +
Subject: [PATCH] Switch sparc netboot image to xz-compressed initrd to get
 its size under the magic limit of 10MB (otherwise it does
 not boot).

---
 build/config/sparc/netboot.cfg |   10 --
 debian/control |4 +++-
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/build/config/sparc/netboot.cfg b/build/config/sparc/netboot.cfg
index 23b3b46..828ce73 100644
--- a/build/config/sparc/netboot.cfg
+++ b/build/config/sparc/netboot.cfg
@@ -7,7 +7,13 @@ EXTRANAME = $(MEDIUM)/
 
 MANIFEST-BOOT = "tftp boot image for sparc64"
 
+TEMP_INITRD_XZ = $(TEMP)/initrd.xz
+
+$(TEMP_INITRD_XZ): $(TEMP_INITRD)
+	# xz options ensure that kernel's decoder can handle the image.
+	zcat $(TEMP_INITRD) | xz --check=crc32 --lzma2=dict=512KiB > $(TEMP_INITRD_XZ)
+
 .PHONY: arch_boot
-arch_boot:
+arch_boot: $(TEMP_INITRD_XZ)
 	gzip -c $(TEMP)/System.map-$(KERNELIMAGEVERSION) >$(TEMP)/System.map.gz
-	tftpboot.sh $(TEMP_KERNEL) $(TEMP)/System.map.gz $(TEMP_INITRD) $(TEMP_BOOT)
+	tftpboot.sh $(TEMP_KERNEL) $(TEMP)/System.map.gz $(TEMP_INITRD_XZ) $(TEMP_BOOT)
diff --git a/debian/control b/debian/control
index 5eef76a..949e14b 100644
--- a/debian/control
+++ b/debian/control
@@ -1,4 +1,4 @@
-Source: debian-installer
+source: debian-installer
 Section: devel
 Priority: optional
 Maintainer: Debian Install System Team 
@@ -78,6 +78,8 @@ Build-Depends:
 #		m68k uses it for atari floppies
 	cpio,
 #		For creating initramfs images.
+	xz-utils,
+#		For compressing initramfs images.
 	devio [armeb armel],
 #		Tool to read and write from block devices, used to byteswap
 #		kernels and add nslu2 boot magic.
-- 
1.7.9



Re: Sparc netboot image is too large to boot (again)

2012-02-05 Thread Samuel Thibault
Bastian Blank, le Sun 05 Feb 2012 14:55:49 +0100, a écrit :
> On Sun, Feb 05, 2012 at 02:09:11PM +0100, Samuel Thibault wrote:
> > AIUI, linux can now have support for uncompressing bzip2, lzma and lzo.
> 
> CONFIG_RD_GZIP=y
> CONFIG_RD_BZIP2=y
> CONFIG_RD_LZMA=y
> CONFIG_RD_XZ=y
> CONFIG_RD_LZO=y
> 
> The amd64 image have support for gzip, bzip2, lzma and the xz variant.

Ah, right, it's not explicitly set in the linux-2.6 configs, but
automatically enabled by Kconfig.

So, anything against using xz compression instead? (except that there
might be quite a few scripts to update from initrd.gz to initrd.xz...)

Samuel


-- 
To UNSUBSCRIBE, email to debian-sparc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120205141148.gb4...@type.famille.thibault.fr



Re: Sparc netboot image is too large to boot (again)

2012-02-05 Thread Bastian Blank
On Sun, Feb 05, 2012 at 02:09:11PM +0100, Samuel Thibault wrote:
> AIUI, linux can now have support for uncompressing bzip2, lzma and lzo.

CONFIG_RD_GZIP=y
CONFIG_RD_BZIP2=y
CONFIG_RD_LZMA=y
CONFIG_RD_XZ=y
CONFIG_RD_LZO=y

The amd64 image have support for gzip, bzip2, lzma and the xz variant.

Bastian

-- 
... bacteriological warfare ... hard to believe we were once foolish
enough to play around with that.
-- McCoy, "The Omega Glory", stardate unknown


-- 
To UNSUBSCRIBE, email to debian-sparc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120205135549.ga2...@wavehammer.waldi.eu.org



Re: Sparc netboot image is too large to boot (again)

2012-02-05 Thread Samuel Thibault
Jurij Smakov, le Sat 04 Feb 2012 12:16:25 +, a écrit :
> I've noticed that, yet again, sparc daily netboot image is too large 
> to boot. Last time we mitigated the problem by removing the support 
> for wireless networking. I'm going to poke around again to see what 
> else can be get rid of, please let me know if you have any ideas.

AIUI, linux can now have support for uncompressing bzip2, lzma and lzo.
Trying them on amd64's initrd:

-rw-r--r-- 1 samy samy 8,5M févr.  5 14:06 initrd.gz
-rw-r--r-- 1 samy samy 7,7M févr.  5 14:06 initrd.bz2
-rw-r--r-- 1 samy samy 6,2M févr.  5 14:06 initrd.lzma
-rw-r--r-- 1 samy samy 9,4M févr.  5 14:06 initrd.lzo
-rw-r--r-- 1 samy samy 6,2M févr.  5 14:07 initrd.xz (for comparison)

Doesn't it seem worthwhile to enable lzma support in the kernel to save
more than 2M here?

Samuel


-- 
To UNSUBSCRIBE, email to debian-sparc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120205130911.gm4...@type.famille.thibault.fr



Re: Sparc netboot image is too large to boot (again)

2012-02-04 Thread Samuel Thibault
Jurij Smakov, le Sat 04 Feb 2012 12:16:25 +, a écrit :
> I've noticed that, yet again, sparc daily netboot image is too large 
> to boot. Last time we mitigated the problem by removing the support 
> for wireless networking. I'm going to poke around again to see what 
> else can be get rid of, please let me know if you have any ideas.

Btw, we are adding hardening here and there, but that consumes
noticeable room. We can perhaps make sure that the core set does not
enable hardening (except gpg maybe?).

Samuel


-- 
To UNSUBSCRIBE, email to debian-sparc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120205015047.gn4...@type.famille.thibault.fr



Re: Sparc netboot image is too large to boot (again)

2012-02-04 Thread Samuel Thibault
Jurij Smakov, le Sat 04 Feb 2012 12:16:25 +, a écrit :
> I've noticed that, yet again, sparc daily netboot image is too large 
> to boot. Last time we mitigated the problem by removing the support 
> for wireless networking. I'm going to poke around again to see what 
> else can be get rid of, please let me know if you have any ideas.

I see 

113K ./usr/share/misc/pci.ids.gz

Is that really needed at that stage?

Samuel


-- 
To UNSUBSCRIBE, email to debian-sparc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120205013634.gk4...@type.famille.thibault.fr



Re: Sparc netboot image is too large to boot (again)

2012-02-04 Thread Jurij Smakov
[Corrected CC address]

On Sat, Feb 04, 2012 at 12:16:25PM +, Jurij Smakov wrote:
> Hello,
> 
> I've noticed that, yet again, sparc daily netboot image is too large 
> to boot. Last time we mitigated the problem by removing the support 
> for wireless networking. I'm going to poke around again to see what 
> else can be get rid of, please let me know if you have any ideas.
> 
> Best regards,
> -- 
> Jurij Smakov   ju...@wooyd.org
> Key: http://www.wooyd.org/pgpkey/  KeyID: C99E03CC
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
> Archive: http://lists.debian.org/20120204121625.ga6...@wooyd.org

-- 
Jurij Smakov   ju...@wooyd.org
Key: http://www.wooyd.org/pgpkey/  KeyID: C99E03CC


-- 
To UNSUBSCRIBE, email to debian-sparc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120204150914.ga3...@wooyd.org