Skip to content

Commit af7db99

Browse files
teknoravermasahir0y
authored andcommitted
kbuild: Add make dir-pkg build option
Add a 'dir-pkg' target which just creates the same directory structures as in tar-pkg, but doesn't package anything. Useful when the user wants to copy the kernel tree on a machine using ssh, rsync or whatever. Signed-off-by: Matteo Croce <mcroce@redhat.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
1 parent 4234448 commit af7db99

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

‎scripts/Makefile.package‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ snap-pkg:
103103

104104
# tarball targets
105105
# ---------------------------------------------------------------------------
106-
tar-pkgs := tar-pkg targz-pkg tarbz2-pkg tarxz-pkg
106+
tar-pkgs := dir-pkg tar-pkg targz-pkg tarbz2-pkg tarxz-pkg
107107
PHONY += $(tar-pkgs)
108108
$(tar-pkgs):
109109
$(MAKE) -f $(srctree)/Makefile
@@ -148,6 +148,7 @@ help:
148148
@echo ' bindeb-pkg - Build only the binary kernel deb package'
149149
@echo ' snap-pkg - Build only the binary kernel snap package'
150150
@echo ' (will connect to external hosts)'
151+
@echo ' dir-pkg - Build the kernel as a plain directory structure'
151152
@echo ' tar-pkg - Build the kernel as an uncompressed tarball'
152153
@echo ' targz-pkg - Build the kernel as a gzip compressed tarball'
153154
@echo ' tarbz2-pkg - Build the kernel as a bzip2 compressed tarball'

‎scripts/package/buildtar‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-License-Identifier: GPL-2.0
33

44
#
5-
# buildtar 0.0.4
5+
# buildtar 0.0.5
66
#
77
# (C) 2004-2006 by Jan-Benedict Glaw <jbglaw@lug-owl.de>
88
#
@@ -24,7 +24,7 @@ tarball="${objtree}/linux-${KERNELRELEASE}-${ARCH}.tar"
2424
# Figure out how to compress, if requested at all
2525
#
2626
case "${1}" in
27-
tar-pkg)
27+
dir-pkg|tar-pkg)
2828
opts=
2929
;;
3030
targz-pkg)
@@ -125,6 +125,10 @@ case "${ARCH}" in
125125
;;
126126
esac
127127

128+
if [ "${1}" = dir-pkg ]; then
129+
echo "Kernel tree successfully created in $tmpdir"
130+
exit 0
131+
fi
128132

129133
#
130134
# Create the tarball

0 commit comments

Comments
 (0)