Skip to content

Commit

Permalink
kbuild: Add make dir-pkg build option
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
  • Loading branch information
teknoraver authored and masahir0y committed Nov 11, 2019
1 parent 4234448 commit af7db99
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion scripts/Makefile.package
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ snap-pkg:

# tarball targets
# ---------------------------------------------------------------------------
tar-pkgs := tar-pkg targz-pkg tarbz2-pkg tarxz-pkg
tar-pkgs := dir-pkg tar-pkg targz-pkg tarbz2-pkg tarxz-pkg
PHONY += $(tar-pkgs)
$(tar-pkgs):
$(MAKE) -f $(srctree)/Makefile
Expand Down Expand Up @@ -148,6 +148,7 @@ help:
@echo ' bindeb-pkg - Build only the binary kernel deb package'
@echo ' snap-pkg - Build only the binary kernel snap package'
@echo ' (will connect to external hosts)'
@echo ' dir-pkg - Build the kernel as a plain directory structure'
@echo ' tar-pkg - Build the kernel as an uncompressed tarball'
@echo ' targz-pkg - Build the kernel as a gzip compressed tarball'
@echo ' tarbz2-pkg - Build the kernel as a bzip2 compressed tarball'
Expand Down
8 changes: 6 additions & 2 deletions scripts/package/buildtar
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-License-Identifier: GPL-2.0

#
# buildtar 0.0.4
# buildtar 0.0.5
#
# (C) 2004-2006 by Jan-Benedict Glaw <[email protected]>
#
Expand All @@ -24,7 +24,7 @@ tarball="${objtree}/linux-${KERNELRELEASE}-${ARCH}.tar"
# Figure out how to compress, if requested at all
#
case "${1}" in
tar-pkg)
dir-pkg|tar-pkg)
opts=
;;
targz-pkg)
Expand Down Expand Up @@ -125,6 +125,10 @@ case "${ARCH}" in
;;
esac

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

#
# Create the tarball
Expand Down

0 comments on commit af7db99

Please sign in to comment.