From patchwork Fri Jun 14 09:46:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anisse Astier X-Patchwork-Id: 251302 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 AAA9B2C007E for ; Fri, 14 Jun 2013 19:47:29 +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 1UnQbL-00085c-Ov; Fri, 14 Jun 2013 09:47:23 +0000 Received: from mail-wi0-f180.google.com ([209.85.212.180]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1UnQbD-00084N-Vz for kernel-team@lists.ubuntu.com; Fri, 14 Jun 2013 09:47:16 +0000 Received: by mail-wi0-f180.google.com with SMTP id c10so104318wiw.7 for ; Fri, 14 Jun 2013 02:47:15 -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=naZPTszSISga1cHhWYNlGfTP2g/xQbhIVo1hwuvp1Do=; b=D6SGiavoom2UWwRWZ4dIse7f3pGPSBLp+C+6dLchDjuqWljqNZm/Q/IbPcgw50uZTF YM38fbhVbdESJC+WitmAyuFehMs1n4YPqg/0PHx1owztFUAz6qsuUnJEThVtgKO85ei6 HQs5rB4SGqS1a9NMQwwuDi5QqyC0idWxZwLEP98Ktxa+v/Yakg8ep8xBJFEb6KfXwwOz rOZA3+iHSm8wN2Q3z+QASAxdmqQRS+R8EAj/eAkFJphznxk/1i3MoXOcrBR+g0HfSk4P QTGyJvcUr6JqS6aGbMNp1ixLlvDhgMTkOKKQ8wOcFSgcl6dt7nqsOJx70JO0YgDdcNza AQxg== X-Received: by 10.194.24.225 with SMTP id x1mr899706wjf.62.1371203235823; Fri, 14 Jun 2013 02:47:15 -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 b19sm1906568wik.10.2013.06.14.02.47.14 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Jun 2013 02:47:15 -0700 (PDT) From: Anisse Astier To: linux-kbuild@vger.kernel.org Subject: [PATCH v5 3/4] deb-pkg: fix installed image path on parisc, mips and powerpc Date: Fri, 14 Jun 2013 11:46:56 +0200 Message-Id: <1371203217-19572-4-git-send-email-anisse@astier.eu> X-Mailer: git-send-email 1.8.3.rc1 In-Reply-To: <1371203217-19572-1-git-send-email-anisse@astier.eu> References: <1371203217-19572-1-git-send-email-anisse@astier.eu> X-Gm-Message-State: ALoCoQkpiHSe+EDjnL8XHOBTydVLp7WooRoiUpRaw9rfov8pqe8pOIu53d1tc1By4uLXuHu2MOyc 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 7c5703a..0dbada8 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