[ARM] Fix warning in arch/arm/mach-sa1100/generic.c
[firewire-audio.git] / scripts / package / buildtar
blobd8fffe6f890657b3b42c32639ad8bc5313880328
1 #!/bin/sh
4 # buildtar 0.0.3
6 # (C) 2004-2005 by Jan-Benedict Glaw <jbglaw@lug-owl.de>
8 # This script is used to compile a tarball from the currently
9 # prepared kernel. Based upon the builddeb script from
10 # Wichert Akkerman <wichert@wiggy.net>.
13 set -e
16 # Some variables and settings used throughout the script
18 version="${VERSION}.${PATCHLEVEL}.${SUBLEVEL}${EXTRAVERSION}${EXTRANAME}"
19 tmpdir="${objtree}/tar-install"
20 tarball="${objtree}/linux-${version}.tar"
24 # Figure out how to compress, if requested at all
26 case "${1}" in
27 tar-pkg)
28 compress="cat"
29 file_ext=""
31 targz-pkg)
32 compress="gzip -c9"
33 file_ext=".gz"
35 tarbz2-pkg)
36 compress="bzip2 -c9"
37 file_ext=".bz2"
40 echo "Unknown tarball target \"${1}\" requested, please add it to ${0}." >&2
41 exit 1
43 esac
47 # Clean-up and re-create the temporary directory
49 rm -rf -- "${tmpdir}"
50 mkdir -p -- "${tmpdir}/boot"
54 # Try to install modules
56 if ! make INSTALL_MOD_PATH="${tmpdir}" modules_install; then
57 echo "" >&2
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
66 # Install basic kernel files
68 cp -v -- System.map "${tmpdir}/boot/System.map-${version}"
69 cp -v -- .config "${tmpdir}/boot/config-${version}"
70 cp -v -- vmlinux "${tmpdir}/boot/vmlinux-${version}"
74 # Install arch-specific kernel image(s)
76 case "${ARCH}" in
77 i386)
78 [ -f arch/i386/boot/bzImage ] && cp -v -- arch/i386/boot/bzImage "${tmpdir}/boot/vmlinuz-${version}"
80 alpha)
81 [ -f arch/alpha/boot/vmlinux.gz ] && cp -v -- arch/alpha/boot/vmlinux.gz "${tmpdir}/boot/vmlinuz-${version}"
83 vax)
84 [ -f vmlinux.SYS ] && cp -v -- vmlinux.SYS "${tmpdir}/boot/vmlinux-${version}.SYS"
85 [ -f vmlinux.dsk ] && cp -v -- vmlinux.dsk "${tmpdir}/boot/vmlinux-${version}.dsk"
88 [ -f "${KBUILD_IMAGE}" ] && cp -v -- "${KBUILD_IMAGE}" "${tmpdir}/boot/vmlinux-kbuild-${version}"
89 echo "" >&2
90 echo '** ** ** WARNING ** ** **' >&2
91 echo "" >&2
92 echo "Your architecture did not define any architecture-dependant files" >&2
93 echo "to be placed into the tarball. Please add those to ${0} ..." >&2
94 echo "" >&2
95 sleep 5
97 esac
101 # Create the tarball
104 cd "${tmpdir}"
105 tar cf - . | ${compress} > "${tarball}${file_ext}"
108 echo "Tarball successfully created in ${tarball}${file_ext}"
110 exit 0