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: 2817131 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3A69ABF4A1 for ; Wed, 3 Jul 2013 14:02:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E9B752018F for ; Wed, 3 Jul 2013 14:02:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6F1E12019C for ; Wed, 3 Jul 2013 14:02:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932461Ab3GCOCU (ORCPT ); Wed, 3 Jul 2013 10:02:20 -0400 Received: from mail-wg0-f51.google.com ([74.125.82.51]:61458 "EHLO mail-wg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932369Ab3GCOCS (ORCPT ); Wed, 3 Jul 2013 10:02:18 -0400 Received: by mail-wg0-f51.google.com with SMTP id e11so157543wgh.30 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=h1zItjedlVAUl5Lg+PrnhSm0OfXUf7d/GRk6STJ74iS7kXXFTtvr8rhujUzJqnLmaf N7cTwVAr6q8BVnR7zIj9OTwvkIgarsFvnz6BLhYF2tyhPnOAH6Kslub1kY3kmha9eFf+ 87b4aF/AjfJPP8HLCzZ4y920vynASSGhxRl2PTm84+R6jFsad5zxp+aTgPYA6OvhCLMk 87dohKMVx4xlnwbIUwi0hDV4RAvfeiucvykFfBJmiCV3cGjNKtnBKpirj3imA0oGyUNX GXTVW98GtTrdoifL0sFCPM+3bMs6X7SnwA7y4CAvN4WeDM5lXBXkzedN2xrVEjmJlugm IBkQ== 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 Cc: debian-kernel@lists.debian.org, kernel-team@lists.ubuntu.com, Ben Hutchings , Michal Marek , maximilian attems , Anisse Astier 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: ALoCoQnqbxCt64WZDrabSovtPSb7BIwQCKhVMd3Cq+7WSki8eUt4VqyWXKDCVKYE1XZJU9041ddp Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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