Skip to content

Commit 88f5e1e

Browse files
pj1031999masahir0y
authored andcommitted
kbuild: Add make tarzst-pkg build option
Add tarzst-pkg and perf-tarzst-src-pkg targets to build zstd compressed tarballs. Signed-off-by: Paweł Jasiak <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 2216cf6 commit 88f5e1e

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

scripts/Makefile.package

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ snap-pkg:
103103

104104
# tarball targets
105105
# ---------------------------------------------------------------------------
106-
tar-pkgs := dir-pkg tar-pkg targz-pkg tarbz2-pkg tarxz-pkg
106+
tar-pkgs := dir-pkg tar-pkg targz-pkg tarbz2-pkg tarxz-pkg tarzst-pkg
107107
PHONY += $(tar-pkgs)
108108
$(tar-pkgs):
109109
$(MAKE) -f $(srctree)/Makefile
@@ -130,10 +130,12 @@ $(if $(findstring tar-src,$@),, \
130130
$(if $(findstring bz2,$@),$(KBZIP2), \
131131
$(if $(findstring gz,$@),$(KGZIP), \
132132
$(if $(findstring xz,$@),$(XZ), \
133-
$(error unknown target $@)))) \
133+
$(if $(findstring zst,$@),$(ZSTD), \
134+
$(error unknown target $@))))) \
134135
-f -9 $(perf-tar).tar)
135136

136-
perf-tar-pkgs := perf-tar-src-pkg perf-targz-src-pkg perf-tarbz2-src-pkg perf-tarxz-src-pkg
137+
perf-tar-pkgs := perf-tar-src-pkg perf-targz-src-pkg perf-tarbz2-src-pkg \
138+
perf-tarxz-src-pkg perf-tarzst-src-pkg
137139
PHONY += $(perf-tar-pkgs)
138140
$(perf-tar-pkgs):
139141
$(call cmd,perf_tar)
@@ -153,9 +155,11 @@ help:
153155
@echo ' targz-pkg - Build the kernel as a gzip compressed tarball'
154156
@echo ' tarbz2-pkg - Build the kernel as a bzip2 compressed tarball'
155157
@echo ' tarxz-pkg - Build the kernel as a xz compressed tarball'
158+
@echo ' tarzst-pkg - Build the kernel as a zstd compressed tarball'
156159
@echo ' perf-tar-src-pkg - Build $(perf-tar).tar source tarball'
157160
@echo ' perf-targz-src-pkg - Build $(perf-tar).tar.gz source tarball'
158161
@echo ' perf-tarbz2-src-pkg - Build $(perf-tar).tar.bz2 source tarball'
159162
@echo ' perf-tarxz-src-pkg - Build $(perf-tar).tar.xz source tarball'
163+
@echo ' perf-tarzst-src-pkg - Build $(perf-tar).tar.zst source tarball'
160164

161165
.PHONY: $(PHONY)

scripts/package/buildtar

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ case "${1}" in
3939
opts="-I ${XZ}"
4040
tarball=${tarball}.xz
4141
;;
42+
tarzst-pkg)
43+
opts="-I ${ZSTD}"
44+
tarball=${tarball}.zst
45+
;;
4246
*)
4347
echo "Unknown tarball target \"${1}\" requested, please add it to ${0}." >&2
4448
exit 1

0 commit comments

Comments
 (0)