From patchwork Wed Jul 3 14:02:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anisse Astier X-Patchwork-Id: 256639 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 0E0F02C0092 for ; Thu, 4 Jul 2013 00:02:39 +1000 (EST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1UuNdd-0000BG-Pk; Wed, 03 Jul 2013 14:02:29 +0000 Received: from mail-we0-f178.google.com ([74.125.82.178]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1UuNdR-000090-Qu for kernel-team@lists.ubuntu.com; Wed, 03 Jul 2013 14:02:17 +0000 Received: by mail-we0-f178.google.com with SMTP id u53so158797wes.9 for ; Wed, 03 Jul 2013 07:02:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=6cVKi13EwP27ZF+XdMfTaY7IlwOjVYHXeb7o7aAoDto=; b=kAcjfAS/DTNJnaYgDH7jY6pJUu1e1/10V6XYBLnWdwv8cavcsQsM4voVlD8p2OeuPl 1OVldiv772SHpY8pjVRz8uiAjflV0cKSUrZLZG/dmq2rUYSvt4vbRYOKH9LvfSF0PJSy /ndJN3mX0OIyOfFsjRkXzXgDznyupkzokBH4sJjOAJd3UIDAceX4i2+cpHZclB3br68A lINFoZkFIoXs2LL32TYT66ojoftbAdwop5v2/pMXWApuSkyupbWct26PBiMF/o44tN/Z TK2YWVbOcKiJo8g3yTIEYe65P7h6MBXjcq6x2mUWcTHcADqiU4CK9qc1CXiA+HBn30G0 GnKg== X-Received: by 10.180.80.6 with SMTP id n6mr18533966wix.59.1372860137701; Wed, 03 Jul 2013 07:02:17 -0700 (PDT) Received: from serenity.substantiel.local (mar92-17-78-228-214-160.fbx.proxad.net. [78.228.214.160]) by mx.google.com with ESMTPSA id nb12sm28995189wic.7.2013.07.03.07.02.16 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Jul 2013 07:02:16 -0700 (PDT) From: Anisse Astier To: linux-kbuild@vger.kernel.org Subject: [PATCH v6 3/4] deb-pkg: fix installed image path on parisc, mips and powerpc Date: Wed, 3 Jul 2013 16:02:05 +0200 Message-Id: <1372860126-8909-4-git-send-email-anisse@astier.eu> X-Mailer: git-send-email 1.8.3.rc1 In-Reply-To: <1372860126-8909-1-git-send-email-anisse@astier.eu> References: <1372860126-8909-1-git-send-email-anisse@astier.eu> X-Gm-Message-State: ALoCoQnY8w5wR/zWjHcc2UuEE8K7zc2gY++PEhvjlZbYrXCARGibD4J1DZiJedB+zGGOE13iuy24 Cc: Michal Marek , maximilian attems , kernel-team@lists.ubuntu.com, debian-kernel@lists.debian.org X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com Signed-off-by: Anisse Astier Reviewed-by: Ben Hutchings --- scripts/package/builddeb | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 541a1cf..aebc66e 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -89,6 +89,20 @@ if [ "$ARCH" = "um" ] ; then packagename=user-mode-linux-$version fi +# Not all arches have the same installed path in debian +# XXX: have each arch Makefile export a variable of the canonical image install +# path instead +case $ARCH in +um) + installed_image_path="usr/bin/linux-$version" + ;; +parisc|mips|powerpc) + installed_image_path="boot/vmlinux-$version" + ;; +*) + installed_image_path="boot/vmlinuz-$version" +esac + BUILD_DEBUG="$(grep -s '^CONFIG_DEBUG_INFO=y' $KCONFIG_CONFIG || true)" # Setup the directory structure @@ -116,16 +130,15 @@ if [ "$ARCH" = "um" ] ; then cp System.map "$tmpdir/usr/lib/uml/modules/$version/System.map" cp $KCONFIG_CONFIG "$tmpdir/usr/share/doc/$packagename/config" gzip "$tmpdir/usr/share/doc/$packagename/config" - cp $KBUILD_IMAGE "$tmpdir/usr/bin/linux-$version" else cp System.map "$tmpdir/boot/System.map-$version" cp $KCONFIG_CONFIG "$tmpdir/boot/config-$version" - # Not all arches include the boot path in KBUILD_IMAGE - if [ -e $KBUILD_IMAGE ]; then - cp $KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version" - else - cp arch/$ARCH/boot/$KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version" - fi +fi +# Not all arches include the boot path in KBUILD_IMAGE +if [ -e $KBUILD_IMAGE ]; then + cp $KBUILD_IMAGE "$tmpdir/$installed_image_path" +else + cp arch/$ARCH/boot/$KBUILD_IMAGE "$tmpdir/$installed_image_path" fi if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then