From patchwork Thu Sep 29 14:46:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vadim Lomovtsev X-Patchwork-Id: 9356555 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 C5F04600C8 for ; Thu, 29 Sep 2016 14:48:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B788029AF6 for ; Thu, 29 Sep 2016 14:48:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ABF4729AF9; Thu, 29 Sep 2016 14:48:39 +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=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A305129AF6 for ; Thu, 29 Sep 2016 14:48:38 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bpccD-0005qJ-AC; Thu, 29 Sep 2016 14:47:13 +0000 Received: from mail-co1nam03on0071.outbound.protection.outlook.com ([104.47.40.71] helo=NAM03-CO1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bpcc8-0005l3-Nb for linux-arm-kernel@lists.infradead.org; Thu, 29 Sep 2016 14:47:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-caviumnetworks-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=vzL/ukcgTK3Xhc6/GlUT/0aX+hFkRxrHNroY39fC+pQ=; b=B+L4A1L3kfFhp9EWOs6UZqVuBR+UPOtHeKi5fX9hFcO27+coGF1h2nqd2E3DSHqvIO3FM1zJa9KMVh6AAXzofOt95gnNtNMhPMRnoh6vQCFrq5tBuMDYuZMn1hNhIYReybzKguRcHM2dQuSXI305SWG5lYzGaU4LfhVNmDQNckA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Vadim.Lomovtsev@caviumnetworks.com; Received: from localhost.localdomain.localdomain (50.233.148.156) by CO2PR07MB2645.namprd07.prod.outlook.com (10.166.213.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.639.5; Thu, 29 Sep 2016 14:46:46 +0000 From: Vadim Lomovtsev To: , Subject: [PATCH v2] arm64: make rpm failed due to incorrect path to Image.gz Date: Thu, 29 Sep 2016 07:46:07 -0700 Message-ID: <1475160367-2633-1-git-send-email-Vadim.Lomovtsev@caviumnetworks.com> X-Mailer: git-send-email 2.4.11 MIME-Version: 1.0 X-Originating-IP: [50.233.148.156] X-ClientProxiedBy: BY1PR20CA0008.namprd20.prod.outlook.com (10.162.140.18) To CO2PR07MB2645.namprd07.prod.outlook.com (10.166.213.144) X-MS-Office365-Filtering-Correlation-Id: c5ac2e81-7e75-44ea-bfa0-08d3e8776ffd X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2645; 2:gRTuw9iP2VIL4ZfrKj0+NuleQ5LSuqEPMar0WrzPHvZ7JMr2vQ1b6idgpxEcbtwo1uRrncIyk6HXWUCE7dBXMVYL3/tJ4ZrY+dhQozifPl/C8DiXQADj6bAIHhOcXyAO9YGizXD9OLYuTPthbTsI+ZRXd0P+AtUVZkK5qrQhzd2V8Mek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T2oGU6at/u8qBY7zoPuBlwkGcZ/9CvSty/pykhLXvbpvCh6lF2Gg6+ZSsTP2d1cLjqST+2GTq9iIK2OUJRTrBtgyAQ7DdYMqHeW+HL04o4Ke7wtRcEew1dWBauF+HjtprZ8Y0KLvKUUaZA/oTgs+XMV+5ERCvn9lBKO/m0Zd3/64OSQT2iSX08TO1LlsUWgSoKpRRFt1szJO3LpYQmMkJO1OKv0YPDiHSit0ytaTmbF4BK2AiJa0rJf2NrJD+CsNqcHcrZBrdKcw8VdcDOflIn+0ALYcZRdGwR+cGEKvdgByenWOkCs0BPgRFQzcuNsYwbfcRn4cuowg73rXW5x8gyFWN6KMSFvz0xN4Ru5WwWDZjEMESLXb6gI4HOJDt02318GDNL3KezLYjSpgD+6mdoXKxB3wcuEngJHkoTRt80fgWz2k1UNjovSYDCm2O6G4vtPeWW+uSjVoDQ= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046); SRVR:CO2PR07MB2645; BCL:0; PCL:0; RULEID:; SRVR:CO2PR07MB2645; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2645; 4:r4Y8AYAkH8BurfBw79tqs17LohLZSoCu4qSjNxdeTrYKbtdrZVbqD9rySWmE7Lx18qYN8Zv0HzfBpY+JoTcbeJUYHlt2rSFJLUYjDozHwteS6MYdjy+lfOJH0NKHgkGoX10NQ26dFAilvTwBEz+6J+b8saizF43vbZh40T6lfsqXoq3wj8/E1qTADyrIrBSUvuThmHO7VsA7ad4nA0gM+RvzI42K0Z/q39j6EmWNBRuAOO1uO4sMJoXEyS4eYHqg89vo43CNkZcqcUCPJinBnUoiGQ6+6+lcmyHtZgvo6FL8hRrHg0iYPLXbfr/B0mIBOhsHnkOxlP7ilqLafPozcFEA+4KUxQL6pNPCZrKJUQhTNkdP/jCi5CeIlwAszFzZUCx3mMRMo18/Lpm5nr53vQ== X-Forefront-PRVS: 00808B16F3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(189002)(199003)(50986999)(68736007)(3846002)(6116002)(5660300001)(586003)(4001430100002)(92566002)(229853001)(36756003)(81156014)(189998001)(2906002)(97736004)(8676002)(50226002)(106356001)(81166006)(4326007)(19580405001)(77096005)(19580395003)(6666003)(5001770100001)(101416001)(105586002)(107886002)(42186005)(48376002)(66066001)(5003940100001)(47776003)(50466002)(7846002)(86362001)(7736002)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR07MB2645; H:localhost.localdomain.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: caviumnetworks.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR07MB2645; 23:Gc2YhURIjrePkF8VlvzTmjfuTQNP8m85EtA4XoPDQ?= =?us-ascii?Q?aHjXHeFncJzKtO1B+gGphKIOUD7Wb7zKxAEskjgahFvqK+zYGPmZK/AeKQrG?= =?us-ascii?Q?WWx5mrQB+apysDaTvVAF2vqvxRnJoyf2ozr4l1aB9irn6Lxdk8Pq/yilbUdG?= =?us-ascii?Q?wk8lEItbnDsaWlU24uGBuyDrhhk+6rCD/Vdy8vh2DwRqGhmdxDRPW8t01vRT?= =?us-ascii?Q?8dPrT/R9DbPb4PXwKILC/dDn7dwIsNIrv/OosJIgRQEJMj0KmJIuM35WDnaQ?= =?us-ascii?Q?OoPCSxCtGkBQ1aEf3/J2H1bh1JeM2QweBX6pPqAUrrh8/UPWYHlihVG4FNcy?= =?us-ascii?Q?VXtB6V258pjGbFv+WDOzDSHlus8mR8w4Nq/FUoaiRwDBEuMJ/CbdqvuwAQeT?= =?us-ascii?Q?K9UxJHv6H+7ryr2+XMksElwJ7sRRsjnxev/a4LfAC94tc8vFi9hAGbDBbiUW?= =?us-ascii?Q?EUFT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HXJak2hJ96ItOa2uGaeUsNV7Xkxo7pdFUEID3YFniPk11D7XujIqVOs8aycdiuMZ2CrhEhZvC+jqjos3Cwx4glfqsWuXuM=; 5:NApqVn8yzVUXxl72Wkr122JFtsxf4J2r31GwC/4wqEI32+XS1Zg90AXnlJQwn1HorqYyI+1D8hhydz96+POphzcTr84FkSzEO9T1q7T1Xj9WAM7VWF9vmynOkJhzWp7ODSrFP0qHjsw9yjLWdQeCpg==; 24:EAAuRG3y7b3VEYX75WR0INknTwGOcSAK7rsFky4D9wIsi/MmJ7t6/P9Qxaf2kadUeq9bOJRROSKAIkkCYEeBt/Cr/VYcXhD4DsRH3TaWi3c=; 7:uyVes9e3hayNCmzcIyWzw5w6ofmh4gOI4/gbtjEHvD+/d8LUAWmP/nc2bU1zfg4MYcJ9tPAx8gwPxseoBtU5vksKFQZci1XpQiiu514uNP22v3VByvVFFXW4vqK4Ym7YA2DwZJAJ1vsm4cnV9IaJYXqbOMUci512BQgkDgGnwsPhwPfdJ903GK2ZlSYu05jv+/qaBKqLs8FGRXLLeLsiGDottgVyEbhiWaMhsUqaBHg2uiOyV/jF7Bj4TWn+kUdr66j5a6/+WunzUbfvDxYSY1MWPmcZA6ARUzGcYSPa5hDm2wqSRjcMjxlc7Ed0dD8p SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Sep 2016 14:46:46.5383 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB2645 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160929_074708_891388_71F13648 X-CRM114-Status: UNSURE ( 8.24 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vadim Lomovtsev Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The "make rpm" and "make rpm-pkg" commands for arm64 platform are broken due to rpmbuild couldn't find Image.gz file at default location (which is kernel src root): cp: cannot stat 'Image.gz': No such file or directory error: Bad exit status from /var/tmp/rpm-tmp.ocFBmP (%install) While the correct path to arm64 kernel image file is "arch/arm64/boot/Image.gz". The exact file name (Image.gz) is stored at KBUILD_IMAGE variable and read by rpmbuild with "make image_name" command at install phase after kernel build is complete. Accordingly to Michal's Marek comment the KBUILD_IMAGE variable has to be set to point to actual file. Since the KBUILD_IMAGE variable is used in general cases of build we need to prevent other build types breakage by changing it. The solution is to add to arch/arm64/Makefie extra target "image_name" with dependency "KBUILD_IMAGE:=". Thus it will allow to set proper path to Image.gz file only for the "image_name" build target and this exact value will be picked up while rpm build install phase. Signed-off-by: Vadim Lomovtsev --- arch/arm64/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index ab51aed..09926d3 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -101,6 +101,8 @@ all: $(KBUILD_IMAGE) $(KBUILD_DTBS) boot := arch/arm64/boot +image_name: KBUILD_IMAGE :=$(boot)/$(KBUILD_IMAGE) + Image: vmlinux $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@