All of lore.kernel.org
 help / color / mirror / Atom feed
From: Asbjoern Sloth Toennesen <asbjorn@asbjorn.biz>
To: Michal Marek <mmarek@suse.cz>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	debian-kernel@lists.debian.org
Subject: [PATCH v2] kbuild, deb-pkg: support overriding userland architecture
Date: Wed,  8 Dec 2010 21:35:50 +0000	[thread overview]
Message-ID: <1291844150-4541-1-git-send-email-asbjorn@asbjorn.biz> (raw)
In-Reply-To: <20101125143739.GC8192@sepie.suse.cz>

Usefull if building for sparc64 userland, because the
sparc and sparc64 userlands use the same 64-bit kernel,
making it impossible to always select the correct userland
architecture for the resulting debian package.

Might also be usefull, if you want a i386 userland with a amd64 kernel.

Example usage:
	make DEBARCH=i386 deb-pkg

LKML-reference: <alpine.DEB.2.02.1011051437500.13287@aurora.sdinet.de>
Signed-off-by: Asbjoern Sloth Toennesen <asbjorn@asbjorn.biz>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Acked-by: maximilian attems <max@stro.at>
---
 Documentation/kbuild/kbuild.txt |    8 ++++++++
 scripts/package/builddeb        |    3 +++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt
index 634c625..2940df0 100644
--- a/Documentation/kbuild/kbuild.txt
+++ b/Documentation/kbuild/kbuild.txt
@@ -60,6 +60,14 @@ But some architectures such as x86 and sparc have aliases.
 x86: i386 for 32 bit, x86_64 for 64 bit
 sparc: sparc for 32 bit, sparc64 for 64 bit
 
+DEBARCH
+--------------------------------------------------
+For the deb-pkg target, allows overriding the normal heuristics deployed by
+deb-deb. Normally deb-pkg attempts to guess the right architecture based on
+the UTS_MACHINE variable, and on some architectures also the kernel config.
+The value of DEBARCH is assumed (not checked) to be a valid Debian
+architecture.
+
 CROSS_COMPILE
 --------------------------------------------------
 Specify an optional fixed part of the binutils filename.
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 5d6be3f..22b6995 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -54,6 +54,9 @@ create_package() {
 		echo "Please add support for $UTS_MACHINE to ${0} ..." >&2
 		echo "" >&2
 	esac
+	if [ -n "$DEBARCH" ] ; then
+		debarch="$DEBARCH"
+	fi
 	if [ -n "$debarch" ] ; then
 		forcearch="-DArchitecture=$debarch"
 	fi
-- 
1.7.2.3


  parent reply	other threads:[~2010-12-08 21:36 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-01 23:31 [PATCH] kbuild, deb-pkg: fix Architecture field when cross compiling Asbjoern Sloth Toennesen
2010-11-03 22:57 ` Michal Marek
2010-11-03 23:25   ` Michal Marek
2010-11-04  1:42   ` Asbjørn Sloth Tønnesen
2010-11-04  2:42     ` Asbjoern Sloth Toennesen
2010-11-04  3:38       ` Asbjørn Sloth Tønnesen
2010-11-04  3:44         ` Asbjoern Sloth Toennesen
2010-11-04  5:58           ` Sam Ravnborg
2010-11-04 12:29             ` Asbjørn Sloth Tønnesen
2010-11-04 12:36               ` Michal Marek
2010-11-04 13:33                 ` Asbjørn Sloth Tønnesen
2010-11-05 12:32                 ` [PATCH] kbuild, deb-pkg: select userland architectire based on UTS_MACHINE Asbjoern Sloth Toennesen
2010-11-05 12:41                   ` maximilian attems
2010-11-05 13:29                     ` Asbjørn Sloth Tønnesen
2010-11-05 13:30                       ` [PATCH] kbuild, deb-pkg: select userland architecture " Asbjoern Sloth Toennesen
2010-11-05 13:36                         ` maximilian attems
2010-11-05 13:42                         ` Sven-Haegar Koch
2010-11-06 19:04                           ` Asbjørn Sloth Tønnesen
2010-11-06 19:05                             ` [PATCH] kbuild, deb-pkg: support overriding userland architecture Asbjoern Sloth Toennesen
2010-11-07  8:24                               ` Américo Wang
2010-11-25 14:37                               ` Michal Marek
2010-11-25 19:10                                 ` Sam Ravnborg
2010-12-08 21:35                                 ` Asbjoern Sloth Toennesen [this message]
2010-12-09 14:24                                   ` [PATCH v2] " maximilian attems
2010-12-09 15:23                                     ` Asbjørn Sloth Tønnesen
2010-12-09 15:24                                       ` [PATCH v3] " Asbjoern Sloth Toennesen
2010-12-09 15:34                                         ` Michal Marek
2010-12-09 15:42                                           ` Asbjørn Sloth Tønnesen
2010-12-12 17:39                                           ` [PATCH v4] " Asbjoern Sloth Toennesen
2010-12-20 15:53                                             ` Michal Marek
2010-12-03 17:48                               ` [PATCH] " maximilian attems
2010-12-03 19:37                                 ` Asbjørn Sloth Tønnesen
2010-11-25 14:35                         ` [PATCH] kbuild, deb-pkg: select userland architecture based on UTS_MACHINE Michal Marek
2010-11-05 12:44                   ` [PATCH] kbuild, deb-pkg: select userland architectire " Asbjørn Sloth Tønnesen

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=1291844150-4541-1-git-send-email-asbjorn@asbjorn.biz \
    --to=asbjorn@asbjorn.biz \
    --cc=debian-kernel@lists.debian.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    /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.