aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/package/buildtar
diff options
context:
space:
mode:
authorJan-Benedict Glaw <jbglaw@lug-owl.de>2006-01-01 08:23:47 -0500
committer <sam@mars.ravnborg.org>2006-01-01 13:31:30 -0500
commit6073aa643f52fd12b02f0532dc96287f4c3293b5 (patch)
tree272fc07333289b0a788996dcd2034b80d1693178 /scripts/package/buildtar
parent752625cff3eba81cbc886988d5b420064c033948 (diff)
kbuild: tar-pkg with out-out-tree building
Fix out-of-tree builds for the tar-pkg targets When I wrote the buildtar script, I didn't even think about out-of-tree builds because I didn't use these back then. This patch throughoutly uses ${objtree} instead of `pwd`. Also, the kernel version is no longer manually built. Instead, it will properly use $KERNELRELEASE . Installing modules is only done if CONFIG_MODULES is set. Signed-off-by: Jan-Benedict Glaw <jbglaw@lug-owl.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/package/buildtar')
-rw-r--r--scripts/package/buildtar31
1 files changed, 13 insertions, 18 deletions
diff --git a/scripts/package/buildtar b/scripts/package/buildtar
index d8fffe6f890..88b5281ac41 100644
--- a/scripts/package/buildtar
+++ b/scripts/package/buildtar
@@ -1,9 +1,9 @@
1#!/bin/sh 1#!/bin/sh
2 2
3# 3#
4# buildtar 0.0.3 4# buildtar 0.0.4
5# 5#
6# (C) 2004-2005 by Jan-Benedict Glaw <jbglaw@lug-owl.de> 6# (C) 2004-2006 by Jan-Benedict Glaw <jbglaw@lug-owl.de>
7# 7#
8# This script is used to compile a tarball from the currently 8# This script is used to compile a tarball from the currently
9# prepared kernel. Based upon the builddeb script from 9# prepared kernel. Based upon the builddeb script from
@@ -15,9 +15,8 @@ set -e
15# 15#
16# Some variables and settings used throughout the script 16# Some variables and settings used throughout the script
17# 17#
18version="${VERSION}.${PATCHLEVEL}.${SUBLEVEL}${EXTRAVERSION}${EXTRANAME}"
19tmpdir="${objtree}/tar-install" 18tmpdir="${objtree}/tar-install"
20tarball="${objtree}/linux-${version}.tar" 19tarball="${objtree}/linux-${KERNELRELEASE}.tar"
21 20
22 21
23# 22#
@@ -53,21 +52,17 @@ mkdir -p -- "${tmpdir}/boot"
53# 52#
54# Try to install modules 53# Try to install modules
55# 54#
56if ! make INSTALL_MOD_PATH="${tmpdir}" modules_install; then 55if grep -q '^CONFIG_MODULES=y' "${objtree}/.config"; then
57 echo "" >&2 56 make ARCH="${ARCH}" O="${objtree}" KBUILD_SRC= INSTALL_MOD_PATH="${tmpdir}" modules_install
58 echo "Ignoring error at module_install time, since that could be" >&2
59 echo "a result of missing local modutils/module-init-tools," >&2
60 echo "or you just didn't compile in module support at all..." >&2
61 echo "" >&2
62fi 57fi
63 58
64 59
65# 60#
66# Install basic kernel files 61# Install basic kernel files
67# 62#
68cp -v -- System.map "${tmpdir}/boot/System.map-${version}" 63cp -v -- "${objtree}/System.map" "${tmpdir}/boot/System.map-${KERNELRELEASE}"
69cp -v -- .config "${tmpdir}/boot/config-${version}" 64cp -v -- "${objtree}/.config" "${tmpdir}/boot/config-${KERNELRELEASE}"
70cp -v -- vmlinux "${tmpdir}/boot/vmlinux-${version}" 65cp -v -- "${objtree}/vmlinux" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}"
71 66
72 67
73# 68#
@@ -75,17 +70,17 @@ cp -v -- vmlinux "${tmpdir}/boot/vmlinux-${version}"
75# 70#
76case "${ARCH}" in 71case "${ARCH}" in
77 i386) 72 i386)
78 [ -f arch/i386/boot/bzImage ] && cp -v -- arch/i386/boot/bzImage "${tmpdir}/boot/vmlinuz-${version}" 73 [ -f "${objtree}/arch/i386/boot/bzImage" ] && cp -v -- "${objtree}/arch/i386/boot/bzImage" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}"
79 ;; 74 ;;
80 alpha) 75 alpha)
81 [ -f arch/alpha/boot/vmlinux.gz ] && cp -v -- arch/alpha/boot/vmlinux.gz "${tmpdir}/boot/vmlinuz-${version}" 76 [ -f "${objtree}/arch/alpha/boot/vmlinux.gz" ] && cp -v -- "${objtree}/arch/alpha/boot/vmlinux.gz" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}"
82 ;; 77 ;;
83 vax) 78 vax)
84 [ -f vmlinux.SYS ] && cp -v -- vmlinux.SYS "${tmpdir}/boot/vmlinux-${version}.SYS" 79 [ -f "${objtree}/vmlinux.SYS" ] && cp -v -- "${objtree}/vmlinux.SYS" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}.SYS"
85 [ -f vmlinux.dsk ] && cp -v -- vmlinux.dsk "${tmpdir}/boot/vmlinux-${version}.dsk" 80 [ -f "${objtree}/vmlinux.dsk" ] && cp -v -- "${objtree}/vmlinux.dsk" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}.dsk"
86 ;; 81 ;;
87 *) 82 *)
88 [ -f "${KBUILD_IMAGE}" ] && cp -v -- "${KBUILD_IMAGE}" "${tmpdir}/boot/vmlinux-kbuild-${version}" 83 [ -f "${KBUILD_IMAGE}" ] && cp -v -- "${KBUILD_IMAGE}" "${tmpdir}/boot/vmlinux-kbuild-${KERNELRELEASE}"
89 echo "" >&2 84 echo "" >&2
90 echo '** ** ** WARNING ** ** **' >&2 85 echo '** ** ** WARNING ** ** **' >&2
91 echo "" >&2 86 echo "" >&2