Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions packages/compress/lz4/package.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2015 Stephan Raue ([email protected])
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################

PKG_NAME="lz4"
PKG_VERSION="r131"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="BSD"
PKG_SITE="http://www.lz4.org/"
PKG_URL="https://github.com/Cyan4973/lz4/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_HOST=""
PKG_PRIORITY="optional"
PKG_SECTION="compress"
PKG_SHORTDESC="LZ4 compression library"
PKG_LONGDESC="LZ4 is a very fast lossless compression algorithm, providing compression speed at 400 MB/s per core, with near-linear scalability for multi-threaded applications. It also features an extremely fast decoder, with speed in multiple GB/s per core, typically reaching RAM speed limits on multi-core systems."

PKG_IS_ADDON="no"
PKG_AUTORECONF="no"

unpack() {
tar xzf sources/$PKG_NAME/$PKG_VERSION.tar.gz -C $BUILD
}

make_host() {
make all
}

makeinstall_host() {
mkdir -p $ROOT/$TOOLCHAIN/bin
cp -f programs/lz4 $ROOT/$TOOLCHAIN/bin
cp -f programs/lz4c $ROOT/$TOOLCHAIN/bin
mkdir -p $ROOT/$TOOLCHAIN/include
cp -f lib/lz4.h $ROOT/$TOOLCHAIN/include
cp -f lib/lz4hc.h $ROOT/$TOOLCHAIN/include
cp -f lib/lz4frame.h $ROOT/$TOOLCHAIN/include
mkdir -p $ROOT/$TOOLCHAIN/lib
cp -f lib/liblz4.a $ROOT/$TOOLCHAIN/lib
}
4 changes: 2 additions & 2 deletions packages/sysutils/squashfs/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ PKG_LICENSE="GPL"
PKG_SITE="http://squashfs.sourceforge.net/"
PKG_URL="$SOURCEFORGE_SRC/squashfs/squashfs/${PKG_NAME}${PKG_VERSION}/${PKG_NAME}${PKG_VERSION}.tar.gz"
PKG_SOURCE_DIR="${PKG_NAME}${PKG_VERSION}"
PKG_DEPENDS_HOST="ccache:host zlib:host lzo:host xz:host"
PKG_DEPENDS_HOST="ccache:host zlib:host lzo:host xz:host lz4:host"
PKG_PRIORITY="optional"
PKG_SECTION="sysutils"
PKG_SHORTDESC="squashfs-tools: A compressed read-only filesystem for Linux"
Expand All @@ -35,7 +35,7 @@ PKG_AUTORECONF="no"

make_host() {
make -C squashfs-tools mksquashfs \
XZ_SUPPORT=1 LZO_SUPPORT=1 \
XZ_SUPPORT=1 LZO_SUPPORT=1 LZ4_SUPPORT=1 \
INCLUDEDIR="-I. -I$ROOT/$TOOLCHAIN/include"
}

Expand Down
2 changes: 1 addition & 1 deletion projects/Generic/options
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
# GOLD (Google Linker) support
GOLD_SUPPORT="yes"

# SquashFS compression method (gzip / lzo / xz)
# SquashFS compression method (gzip / lzo / xz / lz4)
SQUASHFS_COMPRESSION="gzip"


Expand Down
2 changes: 1 addition & 1 deletion projects/Nvidia_Legacy/options
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
# GOLD (Google Linker) support
GOLD_SUPPORT="yes"

# SquashFS compression method (gzip / lzo / xz)
# SquashFS compression method (gzip / lzo / xz / lz4)
SQUASHFS_COMPRESSION="gzip"


Expand Down
2 changes: 1 addition & 1 deletion projects/RPi/options
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
# GOLD (Google Linker) support
GOLD_SUPPORT="yes"

# SquashFS compression method (gzip / lzo / xz)
# SquashFS compression method (gzip / lzo / xz / lz4)
SQUASHFS_COMPRESSION="lzo"


Expand Down
2 changes: 1 addition & 1 deletion projects/RPi2/options
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
# GOLD (Google Linker) support
GOLD_SUPPORT="yes"

# SquashFS compression method (gzip / lzo / xz)
# SquashFS compression method (gzip / lzo / xz / lz4)
SQUASHFS_COMPRESSION="lzo"


Expand Down
2 changes: 1 addition & 1 deletion projects/WeTek_Play/options
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
# GOLD (Google Linker) support
GOLD_SUPPORT="yes"

# SquashFS compression method (gzip / lzo / xz)
# SquashFS compression method (gzip / lzo / xz / lz4)
SQUASHFS_COMPRESSION="lzo"

################################################################################
Expand Down
2 changes: 1 addition & 1 deletion projects/imx6/options
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
# GOLD (Google Linker) support
GOLD_SUPPORT="yes"

# SquashFS compression method (gzip / lzo / xz)
# SquashFS compression method (gzip / lzo / xz / lz4)
SQUASHFS_COMPRESSION="gzip"


Expand Down
6 changes: 5 additions & 1 deletion scripts/image
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,12 @@ fi
SQUASHFS_COMPRESSION="gzip"
fi

if [ "$SQUASHFS_COMPRESSION" = "lz4" ]; then
SQUASHFS_COMPRESSION_LEVEL="-Xhc"
fi

echo "rm -rf $TARGET_IMG/$IMAGE_NAME.system" >> $FAKEROOT_SCRIPT
echo "$ROOT/$TOOLCHAIN/bin/mksquashfs $BUILD/image/system $TARGET_IMG/$IMAGE_NAME.system -noappend -comp $SQUASHFS_COMPRESSION" >> $FAKEROOT_SCRIPT
echo "$ROOT/$TOOLCHAIN/bin/mksquashfs $BUILD/image/system $TARGET_IMG/$IMAGE_NAME.system -noappend -comp $SQUASHFS_COMPRESSION $SQUASHFS_COMPRESSION_LEVEL" >> $FAKEROOT_SCRIPT

# run fakeroot
$ROOT/$TOOLCHAIN/bin/fakeroot -- $FAKEROOT_SCRIPT
Expand Down