aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2017-09-02 04:05:34 -0400
committerMasahiro Yamada <yamada.masahiro@socionext.com>2017-09-12 11:20:31 -0400
commitdd965f1f0857e72eb6d4cfb28769ba01465ba01b (patch)
treee80c0568ae92f76d75a6dc7e823b69dd4f5e6921
parentcfd63736726a7fabb3dd89ea91cff143ac4dc8a7 (diff)
kbuild: buildtar: fix tar error when CONFIG_MODULES is disabled
$tmpdir/lib is created by "make modules_install". It does not exist if CONFIG_MODULES is disabled, then tar reports the following messages: tar: lib: Cannot stat: No such file or directory tar: Exiting with failure status due to previous errors Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
-rwxr-xr-xscripts/package/buildtar5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/package/buildtar b/scripts/package/buildtar
index 483ba00524d5..60dd836a0214 100755
--- a/scripts/package/buildtar
+++ b/scripts/package/buildtar
@@ -51,13 +51,14 @@ esac
51# 51#
52rm -rf -- "${tmpdir}" 52rm -rf -- "${tmpdir}"
53mkdir -p -- "${tmpdir}/boot" 53mkdir -p -- "${tmpdir}/boot"
54 54dirs=boot
55 55
56# 56#
57# Try to install modules 57# Try to install modules
58# 58#
59if grep -q '^CONFIG_MODULES=y' "${KCONFIG_CONFIG}"; then 59if grep -q '^CONFIG_MODULES=y' "${KCONFIG_CONFIG}"; then
60 make ARCH="${ARCH}" O="${objtree}" KBUILD_SRC= INSTALL_MOD_PATH="${tmpdir}" modules_install 60 make ARCH="${ARCH}" O="${objtree}" KBUILD_SRC= INSTALL_MOD_PATH="${tmpdir}" modules_install
61 dirs="$dirs lib"
61fi 62fi
62 63
63 64
@@ -129,7 +130,7 @@ esac
129 if tar --owner=root --group=root --help >/dev/null 2>&1; then 130 if tar --owner=root --group=root --help >/dev/null 2>&1; then
130 opts="--owner=root --group=root" 131 opts="--owner=root --group=root"
131 fi 132 fi
132 tar cf - -C "$tmpdir" boot/ lib/ $opts | ${compress} > "${tarball}${file_ext}" 133 tar cf - -C "$tmpdir" $dirs $opts | ${compress} > "${tarball}${file_ext}"
133) 134)
134 135
135echo "Tarball successfully created in ${tarball}${file_ext}" 136echo "Tarball successfully created in ${tarball}${file_ext}"