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>.
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
40 echo "Unknown tarball target \"${1}\" requested, please add it to ${0}." >&2
47 # Clean-up and re-create the temporary directory
50 mkdir
-p -- "${tmpdir}/boot"
54 # Try to install modules
56 if ! make INSTALL_MOD_PATH
="${tmpdir}" modules_install
; then
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
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)
78 [ -f arch
/i386
/boot
/bzImage
] && cp -v -- arch
/i386
/boot
/bzImage
"${tmpdir}/boot/vmlinuz-${version}"
81 [ -f arch
/alpha
/boot
/vmlinux.gz
] && cp -v -- arch
/alpha
/boot
/vmlinux.gz
"${tmpdir}/boot/vmlinuz-${version}"
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}"
90 echo '** ** ** WARNING ** ** **' >&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
105 tar cf
- . |
${compress} > "${tarball}${file_ext}"
108 echo "Tarball successfully created
in ${tarball}${file_ext}"