squashfs-tools: Enable LZO support
PATCH 1/2 squashfs-tools: Enable LZO support
For systems looking for speed rather than size (e.g. booting from serial NOR flash) LZO is usually a good tradeoff, and usually boots faster than gzip or even an uncompressed filesystem.
--- .../squashfs-tools/squashfs-tools_4.2.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-devtools/squashfs-tools/squashfs-tools_4.2.bb +2 -2
@@ -6,7 +6,7 @@ LICENSE = "GPL-2 & PD" LIC_FILES_CHKSUM = "file://../COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ file://../../7zC.txt;beginline=12;endline=16;md5=2056cd6d919ebc3807602143c7449a7c \ " -DEPENDS = "attr zlib xz" +DEPENDS = "attr zlib xz lzo" PR = "r2" SRC_URI = "${SOURCEFORGE_MIRROR}/squashfs/squashfs${PV}.tar.gz;name=squashfs \
@@ -27,7 +27,7 @@ S = "${WORKDIR}/squashfs${PV}/squashfs-tools" # EXTRA_OEMAKE is typically: -e MAKEFLAGS= # the -e causes problems as CFLAGS is modified in the Makefile, so # we redefine EXTRA_OEMAKE here -EXTRA_OEMAKE = "MAKEFLAGS= LZMA_SUPPORT=1 LZMA_DIR=../.. XZ_SUPPORT=1" +EXTRA_OEMAKE = "MAKEFLAGS= LZMA_SUPPORT=1 LZMA_DIR=../.. LZO_SUPPORT=1 XZ_SUPPORT=1" do_compile() { oe_runmake mksquashfs
Signature · 1 line
1.7.9.5
PATCH 2/2 Support image type "squashfs-lzo"
Add "squashfs-lzo" to the image types. LZO compression support has been in both kernel and squashfs tools for many years, but OE never enabled it.
--- meta/classes/image_types.bbclass | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
meta/classes/image_types.bbclass +9 -7
@@ -176,6 +176,7 @@ IMAGE_CMD_btrfs () { } IMAGE_CMD_squashfs = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs ${EXTRA_IMAGECMD} -noappend" +IMAGE_CMD_squashfs-lzo = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs-lzo ${EXTRA_IMAGECMD} -noappend -comp lzo" IMAGE_CMD_squashfs-xz = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs-xz ${EXTRA_IMAGECMD} -noappend -comp xz" IMAGE_CMD_tar = "cd ${IMAGE_ROOTFS} && tar -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar ."
@@ -201,12 +202,12 @@ IMAGE_CMD_elf () { UBI_VOLNAME ?= "${MACHINE}-rootfs" IMAGE_CMD_ubi () { - echo \[ubifs\] > ubinize.cfg + echo \[ubifs\] > ubinize.cfg echo mode=ubi >> ubinize.cfg - echo image=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs >> ubinize.cfg - echo vol_id=0 >> ubinize.cfg - echo vol_type=dynamic >> ubinize.cfg - echo vol_name=${UBI_VOLNAME} >> ubinize.cfg + echo image=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs >> ubinize.cfg + echo vol_id=0 >> ubinize.cfg + echo vol_type=dynamic >> ubinize.cfg + echo vol_name=${UBI_VOLNAME} >> ubinize.cfg echo vol_flags=autoresize >> ubinize.cfg mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs ${MKUBIFS_ARGS} && ubinize -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubi ${UBINIZE_ARGS} ubinize.cfg }
@@ -235,13 +236,14 @@ IMAGE_DEPENDS_ext3 = "e2fsprogs-native" IMAGE_DEPENDS_ext4 = "e2fsprogs-native" IMAGE_DEPENDS_btrfs = "btrfs-tools-native" IMAGE_DEPENDS_squashfs = "squashfs-tools-native" +IMAGE_DEPENDS_squashfs-lzo = "squashfs-tools-native" IMAGE_DEPENDS_squashfs-xz = "squashfs-tools-native" IMAGE_DEPENDS_elf = "virtual/kernel mkelfimage-native" IMAGE_DEPENDS_ubi = "mtd-utils-native" IMAGE_DEPENDS_ubifs = "mtd-utils-native" # This variable is available to request which values are suitable for IMAGE_FSTYPES -IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs iso hddimg squashfs squashfs-xz ubi ubifs tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk elf" +IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs iso hddimg squashfs squashfs-lzo squashfs-xz ubi ubifs tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk elf" COMPRESSIONTYPES = "gz bz2 lzma xz" COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}"
@@ -256,7 +258,7 @@ COMPRESS_DEPENDS_xz = "xz-native" RUNNABLE_IMAGE_TYPES ?= "ext2 ext3" RUNNABLE_MACHINE_PATTERNS ?= "qemu" -DEPLOYABLE_IMAGE_TYPES ?= "hddimg iso" +DEPLOYABLE_IMAGE_TYPES ?= "hddimg iso" # Use IMAGE_EXTENSION_xxx to map image type 'xxx' with real image file extension name(s) for Hob IMAGE_EXTENSION_live = "hddimg iso"
Signature · 1 line
1.7.9.5
Sorry for having posted this multiple times, our local mail server bounced it as "spam" so I figured it never arrived, and retried it later.
Quoted 24 lines · Mike Looijmans
For systems looking for speed rather than size (e.g. booting from serial NOR flash) LZO is usually a good tradeoff, and usually boots faster than gzip or even an uncompressed filesystem.
Signed-off-by Mike Looijmans <[email protected]>--- .../squashfs-tools/squashfs-tools_4.2.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)meta/recipes-devtools/squashfs-tools/squashfs-tools_4.2.bb +1
-1@@ -6,7 +6,7 @@ LICENSE = "GPL-2 & PD" LIC_FILES_CHKSUM = "file://../COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ file://../../7zC.txt;beginline=12;endline=16;md5=2056cd6d919ebc3807602143c7449a7c \ " -DEPENDS = "attr zlib xz" +DEPENDS = "attr zlib xz lzo" PR = "r2" SRC_URI = "${SOURCEFORGE_MIRROR}/squashfs/squashfs${PV}.tar.gz;name=squashfs \
meta/recipes-devtools/squashfs-tools/squashfs-tools_4.2.bb S = "${WORKDIR}/squashfs${PV}/squashfs-tools" · line 33
Quoted 8 lines
meta/recipes-devtools/squashfs-tools/squashfs-tools_4.2.bb +1
-1@@ -27,7 +27,7 @@ S = "${WORKDIR}/squashfs${PV}/squashfs-tools" # EXTRA_OEMAKE is typically: -e MAKEFLAGS= # the -e causes problems as CFLAGS is modified in the Makefile, so # we redefine EXTRA_OEMAKE here -EXTRA_OEMAKE = "MAKEFLAGS= LZMA_SUPPORT=1 LZMA_DIR=../.. XZ_SUPPORT=1" +EXTRA_OEMAKE = "MAKEFLAGS= LZMA_SUPPORT=1 LZMA_DIR=../.. LZO_SUPPORT=1 XZ_SUPPORT=1" do_compile() { oe_runmake mksquashfs
Met vriendelijke groet / kind regards,
Mike Looijmans
TOPIC Embedded Systems Eindhovenseweg 32-C, NL-5683 KH Best Postbus 440, NL-5680 AK Best
Telefoon: (+31) (0) 499 33 69 79
Telefax: (+31) (0) 499 33 69 70
E-mail: [email protected]
Website: www.topic.nl
Please consider the environment before printing this e-mail
Bezoek ons op 9 en 10 september tijdens Technology for Health Den Bosch (stand 53)
http://www.technologyforhealth.nl
Quoted 23 lines · Mike Looijmans
For systems looking for speed rather than size (e.g. booting from serial NOR flash) LZO is usually a good tradeoff, and usually boots faster than gzip or even an uncompressed filesystem.
Signed-off-by Mike Looijmans <[email protected]>--- .../squashfs-tools/squashfs-tools_4.2.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)meta/recipes-devtools/squashfs-tools/squashfs-tools_4.2.bb +1
-1@@ -6,7 +6,7 @@ LICENSE = "GPL-2 & PD" LIC_FILES_CHKSUM = "file://../COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ file://../../7zC.txt;beginline=12;endline=16;md5=2056cd6d919ebc3807602143c7449a7c \ " -DEPENDS = "attr zlib xz" +DEPENDS = "attr zlib xz lzo" PR = "r2" SRC_URI = "${SOURCEFORGE_MIRROR}/squashfs/squashfs${PV}.tar.gz;name=squashfs \
meta/recipes-devtools/squashfs-tools/squashfs-tools_4.2.bb S = "${WORKDIR}/squashfs${PV}/squashfs-tools" · line 33
Quoted 8 lines
meta/recipes-devtools/squashfs-tools/squashfs-tools_4.2.bb +1
-1@@ -27,7 +27,7 @@ S = "${WORKDIR}/squashfs${PV}/squashfs-tools" # EXTRA_OEMAKE is typically: -e MAKEFLAGS= # the -e causes problems as CFLAGS is modified in the Makefile, so # we redefine EXTRA_OEMAKE here -EXTRA_OEMAKE = "MAKEFLAGS= LZMA_SUPPORT=1 LZMA_DIR=../.. XZ_SUPPORT=1" +EXTRA_OEMAKE = "MAKEFLAGS= LZMA_SUPPORT=1 LZMA_DIR=../.. LZO_SUPPORT=1 XZ_SUPPORT=1" do_compile() { oe_runmake mksquashfs
The patch is good but its against 4.2, 4.3 is now in master. Could you resend against master please?
Also, could you resend 2/2 without the whitespace changes (put them in a separate patch).
Cheers,
Richard
Quoted 30 lines · Richard Purdie
Quoted 29 lines · Mike Looijmans
For systems looking for speed rather than size (e.g. booting from serial NOR flash) LZO is usually a good tradeoff, and usually boots faster than gzip or even an uncompressed filesystem.
Signed-off-by Mike Looijmans <[email protected]>--- .../squashfs-tools/squashfs-tools_4.2.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)meta/recipes-devtools/squashfs-tools/squashfs-tools_4.2.bb +2
-2@@ -6,7 +6,7 @@ LICENSE = "GPL-2 & PD" LIC_FILES_CHKSUM = "file://../COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ file://../../7zC.txt;beginline=12;endline=16;md5=2056cd6d919ebc3807602143c7449a7c \ " -DEPENDS = "attr zlib xz" +DEPENDS = "attr zlib xz lzo" PR = "r2" SRC_URI = "${SOURCEFORGE_MIRROR}/squashfs/squashfs${PV}.tar.gz;name=squashfs \@@ -27,7 +27,7 @@ S = "${WORKDIR}/squashfs${PV}/squashfs-tools" # EXTRA_OEMAKE is typically: -e MAKEFLAGS= # the -e causes problems as CFLAGS is modified in the Makefile, so # we redefine EXTRA_OEMAKE here -EXTRA_OEMAKE = "MAKEFLAGS= LZMA_SUPPORT=1 LZMA_DIR=../.. XZ_SUPPORT=1" +EXTRA_OEMAKE = "MAKEFLAGS= LZMA_SUPPORT=1 LZMA_DIR=../.. LZO_SUPPORT=1 XZ_SUPPORT=1"
Quoted 5 lines
meta/recipes-devtools/squashfs-tools/squashfs-tools_4.2.bb S = "${WORKDIR}/squashfs${PV}/squashfs-tools" · line 33
Quoted 2 lines
meta/recipes-devtools/squashfs-tools/squashfs-tools_4.2.bb +0
-0do_compile() { oe_runmake mksquashfsThe patch is good but its against 4.2, 4.3 is now in master. Could you resend against master please?
Hmm, I've been using 4.2 for years, and just now they release a new version. Funky timing.
Quoted 2 lines
Also, could you resend 2/2 without the whitespace changes (put them in a separate patch).
Now you mention it, yeah, I probably forgot to set my editor's settings correctly.
I'll create new patches, it'll take a few days because I'll have to test them first, and my environment is a few weeks behind on master because of all the changes lately that break all kinds of existing recipes.
Mike.
Met vriendelijke groet / kind regards,
Mike Looijmans
TOPIC Embedded Systems Eindhovenseweg 32-C, NL-5683 KH Best Postbus 440, NL-5680 AK Best
Telefoon: (+31) (0) 499 33 69 79
Telefax: (+31) (0) 499 33 69 70
E-mail: [email protected]
Website: www.topic.nl
Please consider the environment before printing this e-mail
Bezoek ons op 9 en 10 september tijdens Technology for Health Den Bosch (stand 53)
http://www.technologyforhealth.nl
PATCH v2 1/2 squashfs-tools: Add support for LZO and LZ4 compression
In reply to Richard PurdieFor systems that want to optimize for speed rather than size, LZO is usually a better choice than gzip or XZ. Kernel support for LZO has been available since 2.6.29.
LZ4 support isn't in the mainline kernel yet, but we might as well add it now for those who want to experiment with it.
--- .../squashfs-tools/squashfs-tools_4.3.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-devtools/squashfs-tools/squashfs-tools_4.3.bb +2 -2
@@ -6,7 +6,7 @@ LICENSE = "GPL-2 & PD" LIC_FILES_CHKSUM = "file://../COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ file://../../7zC.txt;beginline=12;endline=16;md5=2056cd6d919ebc3807602143c7449a7c \ " -DEPENDS = "attr zlib xz" +DEPENDS = "attr zlib xz lzo lz4" SRC_URI = "${SOURCEFORGE_MIRROR}/squashfs/squashfs${PV}.tar.gz;name=squashfs \ http://downloads.sourceforge.net/sevenzip/lzma465.tar.bz2;name=lzma \
@@ -23,7 +23,7 @@ S = "${WORKDIR}/squashfs${PV}/squashfs-tools" # EXTRA_OEMAKE is typically: -e MAKEFLAGS= # the -e causes problems as CFLAGS is modified in the Makefile, so # we redefine EXTRA_OEMAKE here -EXTRA_OEMAKE = "MAKEFLAGS= LZMA_SUPPORT=1 LZMA_DIR=../.. XZ_SUPPORT=1" +EXTRA_OEMAKE = "MAKEFLAGS= LZMA_SUPPORT=1 LZMA_DIR=../.. XZ_SUPPORT=1 LZO_SUPPORT=1 LZ4_SUPPORT=1" do_compile() { oe_runmake mksquashfs
Signature · 1 line
1.7.9.5
PATCH v2 2/2 Support image type "squashfs-lzo"
Add "squashfs-lzo" to the image types. LZO compression support has been in both kernel and squashfs tools for many years, but OE never enabled it.
--- meta/classes/image_types.bbclass | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
meta/classes/image_types.bbclass +3 -1
@@ -63,6 +63,7 @@ IMAGE_CMD_btrfs () { IMAGE_CMD_squashfs = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs ${EXTRA_IMAGECMD} -noappend" IMAGE_CMD_squashfs-xz = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs-xz ${EXTRA_IMAGECMD} -noappend -comp xz" +IMAGE_CMD_squashfs-lzo = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs-lzo ${EXTRA_IMAGECMD} -noappend -comp lzo" IMAGE_CMD_tar = "tar -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar -C ${IMAGE_ROOTFS} ." IMAGE_CMD_cpio () {
@@ -121,12 +122,13 @@ IMAGE_DEPENDS_ext4 = "e2fsprogs-native" IMAGE_DEPENDS_btrfs = "btrfs-tools-native" IMAGE_DEPENDS_squashfs = "squashfs-tools-native" IMAGE_DEPENDS_squashfs-xz = "squashfs-tools-native" +IMAGE_DEPENDS_squashfs-lzo = "squashfs-tools-native" IMAGE_DEPENDS_elf = "virtual/kernel mkelfimage-native" IMAGE_DEPENDS_ubi = "mtd-utils-native" IMAGE_DEPENDS_ubifs = "mtd-utils-native" # This variable is available to request which values are suitable for IMAGE_FSTYPES -IMAGE_TYPES = "jffs2 jffs2.sum cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs iso hddimg squashfs squashfs-xz ubi ubifs tar tar.gz tar.bz2 tar.xz tar.lz4 cpio cpio.gz cpio.xz cpio.lzma cpio.lz4 vmdk elf" +IMAGE_TYPES = "jffs2 jffs2.sum cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs iso hddimg squashfs squashfs-xz squashfs-lzo ubi ubifs tar tar.gz tar.bz2 tar.xz tar.lz4 cpio cpio.gz cpio.xz cpio.lzma cpio.lz4 vmdk elf" COMPRESSIONTYPES = "gz bz2 lzma xz lz4 sum" COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}"
Signature · 1 line
1.7.9.5