linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Vadim.Lomovtsev@caviumnetworks.com (Vadim Lomovtsev)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] arm64: make rpm failed due to incorrect path to Image.gz
Date: Fri, 30 Sep 2016 00:03:26 -0700	[thread overview]
Message-ID: <20160930070325.GA3834@localhost.localdomain> (raw)
In-Reply-To: <1475160367-2633-1-git-send-email-Vadim.Lomovtsev@caviumnetworks.com>

[Adding Will Deacon]
Sorry, should do this at the very beginning. (

On Thu, Sep 29, 2016 at 07:46:07AM -0700, Vadim Lomovtsev wrote:
> 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:=<proper path to Image.gz file>".
> 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 <Vadim.Lomovtsev@caviumnetworks.com>
> ---
>  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)/$@
>  
> -- 
> 1.8.3.1
> 

  reply	other threads:[~2016-09-30  7:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-29 14:46 [PATCH v2] arm64: make rpm failed due to incorrect path to Image.gz Vadim Lomovtsev
2016-09-30  7:03 ` Vadim Lomovtsev [this message]
2016-09-30  9:14   ` Will Deacon
2016-09-30 12:55     ` Vadim Lomovtsev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160930070325.GA3834@localhost.localdomain \
    --to=vadim.lomovtsev@caviumnetworks.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).