Skip to content

Commit

Permalink
feat: support zstd compression
Browse files Browse the repository at this point in the history
This adds zstd binaries and libraries and enables zstd in the
mksquashfs.

Signed-off-by: Andrey Smirnov <[email protected]>
  • Loading branch information
smira committed Feb 7, 2022
1 parent 67314b1 commit d33b4b6
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
3 changes: 2 additions & 1 deletion squashfs-tools/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ dependencies:
- stage: base
- stage: xz
- stage: zlib
- stage: zstd
- stage: patch
steps:
- sources:
Expand All @@ -18,7 +19,7 @@ steps:
build:
- |
cd squashfs-tools
make LDFLAGS="$LDFLAGS -Wl,-rpath=/toolchain/lib" XZ_SUPPORT=1 LZMA_XZ_SUPPORT=0 LZMA_SUPPORT=0
make LDFLAGS="$LDFLAGS -Wl,-rpath=/toolchain/lib" XZ_SUPPORT=1 LZMA_XZ_SUPPORT=0 LZMA_SUPPORT=0 ZSTD_SUPPORT=1
install:
- |
cd squashfs-tools
Expand Down
1 change: 1 addition & 0 deletions tools/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ dependencies:
- stage: util-linux
- stage: xz
- stage: zlib
- stage: zstd
steps:
- prepare:
- |
Expand Down
25 changes: 25 additions & 0 deletions zstd/pkg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: zstd
dependencies:
- stage: base
steps:
- sources:
- url: https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.gz
destination: zstd.tar.gz
sha256: 7c42d56fac126929a6a85dbc73ff1db2411d04f104fae9bdea51305663a83fd0
sha512: 96dbd2eb6623e3564a0fd36489b61bc3cb27758a584fdc9f064f3985d2e8b5605d7022890d00a6d15464d3cd0707d7e75d8cf6210323782d0af406b90a6d6784
env:
PREFIX: /toolchain
CFLAGS: -O2
prepare:
- |
tar -xzf zstd.tar.gz --strip-components=1
build:
- |
make -j $(nproc) -C lib HAVE_PTHREAD=1 HAVE_ZLIB=0 HAVE_LZMA=0 HAVE_LZ4=0 lib-mt
make -j $(nproc) -C programs HAVE_PTHREAD=1 HAVE_ZLIB=0 HAVE_LZMA=0 HAVE_LZ4=0
install:
- |
make DESTDIR=/rootfs install
finalize:
- from: /rootfs
to: /

0 comments on commit d33b4b6

Please sign in to comment.