All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: linux-kernel@vger.kernel.org
Subject: [PATCH 1/1] kbuild: tar-pkg with out-out-tree building
Date: Tue, 3 Jan 2006 16:05:17 +0100	[thread overview]
Message-ID: <20060103150517.GD18012@mars.ravnborg.org> (raw)
In-Reply-To: <20060103150219.GC18012@mars.ravnborg.org>

diff-tree 6073aa643f52fd12b02f0532dc96287f4c3293b5 (from 752625cff3eba81cbc886988d5b420064c033948)
Author: Jan-Benedict Glaw <jbglaw@lug-owl.de>
Date:   Sun Jan 1 14:23:47 2006 +0100

    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>

diff --git a/scripts/package/Makefile b/scripts/package/Makefile
index f3e7e8e..c201ef0 100644
--- a/scripts/package/Makefile
+++ b/scripts/package/Makefile
@@ -82,11 +82,11 @@ clean-dirs += $(objtree)/debian/
 
 # tarball targets
 # ---------------------------------------------------------------------------
 .PHONY: tar%pkg
 tar%pkg:
-	$(MAKE)
+	$(MAKE) KBUILD_SRC=
 	$(CONFIG_SHELL) $(srctree)/scripts/package/buildtar $@
 
 clean-dirs += $(objtree)/tar-install/
 
 
diff --git a/scripts/package/buildtar b/scripts/package/buildtar
index d8fffe6..88b5281 100644
--- a/scripts/package/buildtar
+++ b/scripts/package/buildtar
@@ -1,11 +1,11 @@
 #!/bin/sh
 
 #
-# buildtar 0.0.3
+# buildtar 0.0.4
 #
-# (C) 2004-2005 by Jan-Benedict Glaw <jbglaw@lug-owl.de>
+# (C) 2004-2006 by Jan-Benedict Glaw <jbglaw@lug-owl.de>
 #
 # This script is used to compile a tarball from the currently
 # prepared kernel. Based upon the builddeb script from
 # Wichert Akkerman <wichert@wiggy.net>.
 #
@@ -13,13 +13,12 @@
 set -e
 
 #
 # Some variables and settings used throughout the script
 #
-version="${VERSION}.${PATCHLEVEL}.${SUBLEVEL}${EXTRAVERSION}${EXTRANAME}"
 tmpdir="${objtree}/tar-install"
-tarball="${objtree}/linux-${version}.tar"
+tarball="${objtree}/linux-${KERNELRELEASE}.tar"
 
 
 #
 # Figure out how to compress, if requested at all
 #
@@ -51,43 +50,39 @@ mkdir -p -- "${tmpdir}/boot"
 
 
 #
 # Try to install modules
 #
-if ! make INSTALL_MOD_PATH="${tmpdir}" modules_install; then
-	echo "" >&2
-	echo "Ignoring error at module_install time, since that could be" >&2
-	echo "a result of missing local modutils/module-init-tools," >&2
-	echo "or you just didn't compile in module support at all..." >&2
-	echo "" >&2
+if grep -q '^CONFIG_MODULES=y' "${objtree}/.config"; then
+	make ARCH="${ARCH}" O="${objtree}" KBUILD_SRC= INSTALL_MOD_PATH="${tmpdir}" modules_install
 fi
 
 
 #
 # Install basic kernel files
 #
-cp -v -- System.map "${tmpdir}/boot/System.map-${version}"
-cp -v -- .config "${tmpdir}/boot/config-${version}"
-cp -v -- vmlinux "${tmpdir}/boot/vmlinux-${version}"
+cp -v -- "${objtree}/System.map" "${tmpdir}/boot/System.map-${KERNELRELEASE}"
+cp -v -- "${objtree}/.config" "${tmpdir}/boot/config-${KERNELRELEASE}"
+cp -v -- "${objtree}/vmlinux" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}"
 
 
 #
 # Install arch-specific kernel image(s)
 #
 case "${ARCH}" in
 	i386)
-		[ -f arch/i386/boot/bzImage ] && cp -v -- arch/i386/boot/bzImage "${tmpdir}/boot/vmlinuz-${version}"
+		[ -f "${objtree}/arch/i386/boot/bzImage" ] && cp -v -- "${objtree}/arch/i386/boot/bzImage" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}"
 		;;
 	alpha)
-		[ -f arch/alpha/boot/vmlinux.gz ] && cp -v -- arch/alpha/boot/vmlinux.gz "${tmpdir}/boot/vmlinuz-${version}"
+		[ -f "${objtree}/arch/alpha/boot/vmlinux.gz" ] && cp -v -- "${objtree}/arch/alpha/boot/vmlinux.gz" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}"
 		;;
 	vax)
-		[ -f vmlinux.SYS ] && cp -v -- vmlinux.SYS "${tmpdir}/boot/vmlinux-${version}.SYS"
-		[ -f vmlinux.dsk ] && cp -v -- vmlinux.dsk "${tmpdir}/boot/vmlinux-${version}.dsk"
+		[ -f "${objtree}/vmlinux.SYS" ] && cp -v -- "${objtree}/vmlinux.SYS" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}.SYS"
+		[ -f "${objtree}/vmlinux.dsk" ] && cp -v -- "${objtree}/vmlinux.dsk" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}.dsk"
 		;;
 	*)
-		[ -f "${KBUILD_IMAGE}" ] && cp -v -- "${KBUILD_IMAGE}" "${tmpdir}/boot/vmlinux-kbuild-${version}"
+		[ -f "${KBUILD_IMAGE}" ] && cp -v -- "${KBUILD_IMAGE}" "${tmpdir}/boot/vmlinux-kbuild-${KERNELRELEASE}"
 		echo "" >&2
 		echo '** ** **  WARNING  ** ** **' >&2
 		echo "" >&2
 		echo "Your architecture did not define any architecture-dependant files" >&2
 		echo "to be placed into the tarball. Please add those to ${0} ..." >&2

      reply	other threads:[~2006-01-03 15:05 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-03 13:20 [PATCH] kbuild + kconfig updates for 2.6.16-rc Sam Ravnborg
2006-01-03 13:25 ` [PATCH 09/26] kconfig: move lxdialog to scripts/kconfig/lxdialog Sam Ravnborg
2006-01-03 13:25 ` [PATCH 12/26] kbuild: document INSTALL_MOD_PATH in 'make help' Sam Ravnborg
2006-01-03 13:25 ` [PATCH 06/26] kconfig: Fix indention when using menuconfig in text-onle consoles Sam Ravnborg
2006-01-03 13:25 ` [PATCH 13/26] kbuild: Fix crc-error warning on modules Sam Ravnborg
2006-01-03 13:25 ` [PATCH 02/26] kconfig: fixup after Lindent Sam Ravnborg
2006-01-03 13:25 ` [PATCH 10/26] kbuild: remove the deprecated check_gcc Sam Ravnborg
2006-01-03 13:25 ` [PATCH 11/26] kbuild: patch to Documentation/kbuild/modules.txt Sam Ravnborg
2006-01-03 13:25 ` [PATCH 08/26] kconfig: truncate too long menu lines in menuconfig Sam Ravnborg
2006-01-03 13:25 ` [PATCH 07/26] kconfig: make lxdialog/menubox.c more readable Sam Ravnborg
2006-01-03 13:25 ` [PATCH 04/26] kconfig: Add print_title helper in lxdialog Sam Ravnborg
2006-01-03 13:25 ` [PATCH 14/26] kbuild: Add ctags support for function prototypes and external variable declarations Sam Ravnborg
2006-01-03 13:25 ` [PATCH 03/26] kconfig: lxdialog is now sparse clean Sam Ravnborg
2006-01-03 13:25 ` [PATCH 05/26] kconfig: Left aling menu items in menuconfig Sam Ravnborg
2006-01-03 13:25 ` [PATCH 21/26] kbuild: always run 'make silentoldconfig' when tree is cleaned Sam Ravnborg
2006-01-03 13:25 ` [PATCH 15/26] kbuild: escape '#' in .target.cmd files Sam Ravnborg
2006-01-03 13:25 ` [PATCH 16/26] kbuild: set correct KBUILD_MODNAME when using well known kernel symbols as module names Sam Ravnborg
2006-01-03 13:25 ` [PATCH 20/26] kbuild: tags file generation fixup Sam Ravnborg
2006-01-03 13:25 ` [PATCH 17/26] kbuild: Fix genksyms handling of DEFINE_PER_CPU(struct foo_s *, bar); Sam Ravnborg
2006-01-03 14:46   ` Jan Engelhardt
2006-01-03 14:49     ` Sam Ravnborg
2006-01-03 14:51       ` Jan Engelhardt
2006-01-04 19:01   ` Robin Holt
2006-01-04 19:19     ` Sam Ravnborg
2006-01-03 13:25 ` [PATCH 25/26] kconfig: Remove support for lxdialog --checklist Sam Ravnborg
2006-01-03 13:25 ` [PATCH 24/26] gitignore: misc files Sam Ravnborg
2006-01-03 13:25 ` [PATCH 22/26] gitignore: asm-offsets.h Sam Ravnborg
2006-01-03 13:25 ` [PATCH 19/26] kbuild: remove EXPERIMENTAL tag from Module versioning Sam Ravnborg
2006-01-03 13:25 ` [PATCH 26/26] gitignore: ignore more generated files Sam Ravnborg
2006-01-03 13:25 ` [PATCH 23/26] gitignore: x86_64 files Sam Ravnborg
2006-01-03 16:39   ` Andi Kleen
2006-01-03 17:15     ` Sam Ravnborg
2006-01-03 17:26       ` Andi Kleen
2006-01-03 17:42         ` Olaf Hering
2006-01-03 19:24         ` Sam Ravnborg
2006-01-03 19:14     ` Brian Gerst
2006-01-03 15:02 ` [PATCH] kbuild + kconfig updates for 2.6.16-rc Sam Ravnborg
2006-01-03 15:05   ` Sam Ravnborg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060103150517.GD18012@mars.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.