From patchwork Sat Mar 11 23:59:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 9619181 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3FE8B604CC for ; Sat, 11 Mar 2017 23:59:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1CE8928477 for ; Sat, 11 Mar 2017 23:59:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F20522850D; Sat, 11 Mar 2017 23:59:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4E58E28477 for ; Sat, 11 Mar 2017 23:59:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755383AbdCKX7I (ORCPT ); Sat, 11 Mar 2017 18:59:08 -0500 Received: from mail-qk0-f195.google.com ([209.85.220.195]:33967 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754980AbdCKX7H (ORCPT ); Sat, 11 Mar 2017 18:59:07 -0500 Received: by mail-qk0-f195.google.com with SMTP id v125so33116301qkh.1; Sat, 11 Mar 2017 15:59:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=iWflBP6qiqqAH2cBwe141/miqyULty0bhtLxw3GPIoc=; b=oMiXIIGauz4WkYihXZ9EMcaCVGavlmUUQKj6MOrNOr5pGkoCVUbrhd555LoTZWeqMm zTjuTyDlzcsSS12STjF0UEUk3G66NBuHqJa+XTO3Z85Q/atL+jkbzJ19dnhHaeCSjQP7 kqIa5QbvcnFhJaZAqtdg8cznUNQ1r1rdZSGmDfVERwHya2kTZ6ClNUlmBw+Qmg7gvmbr 2MYICSeom0b1baU2hnjQ9bXXSJanqq/AgESGZaXjKck4v6Og5jwenI+d8yiOB9AN4U6H b066U4d+utQfW8wxhRBAZzpkXYlLsEKgR0avzLnPJsXVeQS4nju1wSC2SrLAzH/Xyto/ H3FA== X-Gm-Message-State: AFeK/H1ItdvB2VEVe/aLQ/26bMHWlXbrocRUF+K9zM7ouLIskYclcEBggQdp89N876mT7A== X-Received: by 10.55.131.68 with SMTP id f65mr25341639qkd.1.1489276746352; Sat, 11 Mar 2017 15:59:06 -0800 (PST) Received: from localhost.localdomain (cpe-75-180-228-133.ec.res.rr.com. [75.180.228.133]) by smtp.gmail.com with ESMTPSA id y52sm9252283qty.60.2017.03.11.15.59.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 11 Mar 2017 15:59:05 -0800 (PST) From: Tom Rini To: linux-kbuild@vger.kernel.org Cc: Michal Marek , linux-kernel@vger.kernel.org, Catalin Marinas , Will Deacon Subject: [PATCH] kbuild/mkspec: Fix architectures where KBUILD_IMAGE isn't a full path Date: Sat, 11 Mar 2017 23:59:22 +0000 Message-Id: <1489276762-22280-1-git-send-email-trini@konsulko.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On some architectures, such as arm64, KBUILD_IMAGE is not a full path but instead just the build target. The builddeb script handles this case correctly today and will try arch/$ARCH/boot/$KBUILD_IMAGE so we can just borrow that logic and adapt it slightly for spec file syntax. Cc: Michal Marek Cc: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Tom Rini --- It is currently a mixed-bag on if architectures will use a build target (arm, arm64, arc are certainly by inspection and a few others 'may') or a full path (x86, blackfin, s390). Given that builddeb gets this case correct, I think changing mkspec is the right way to go here. --- scripts/package/mkspec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/package/mkspec b/scripts/package/mkspec index bb43f153fd8e..aa5f3db43f12 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -101,7 +101,11 @@ echo "%ifarch ppc64" echo "cp vmlinux arch/powerpc/boot" echo "cp arch/powerpc/boot/"'$KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE" echo "%else" -echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE" +echo "if [ -e $KBUILD_IMAGE ]; then" +echo ' cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE" +echo "else" +echo ' cp arch/$ARCH/boot/$KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE" +echo "fi" echo "%endif" echo "%endif"