* [PATCH v2] arm64: make rpm failed due to incorrect path to Image.gz
@ 2016-09-29 14:46 Vadim Lomovtsev
2016-09-30 7:03 ` Vadim Lomovtsev
0 siblings, 1 reply; 4+ messages in thread
From: Vadim Lomovtsev @ 2016-09-29 14:46 UTC (permalink / raw)
To: linux-arm-kernel
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2] arm64: make rpm failed due to incorrect path to Image.gz
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
2016-09-30 9:14 ` Will Deacon
0 siblings, 1 reply; 4+ messages in thread
From: Vadim Lomovtsev @ 2016-09-30 7:03 UTC (permalink / raw)
To: linux-arm-kernel
[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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] arm64: make rpm failed due to incorrect path to Image.gz
2016-09-30 7:03 ` Vadim Lomovtsev
@ 2016-09-30 9:14 ` Will Deacon
2016-09-30 12:55 ` Vadim Lomovtsev
0 siblings, 1 reply; 4+ messages in thread
From: Will Deacon @ 2016-09-30 9:14 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Sep 30, 2016 at 12:03:26AM -0700, Vadim Lomovtsev wrote:
> [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)/$@
It might be worth fixing the other architectures that just set KBUILD_IMAGE
to the filename too. Then you could remove the bodge from
scripts/package/builddeb that tries to support both formats.
Will
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] arm64: make rpm failed due to incorrect path to Image.gz
2016-09-30 9:14 ` Will Deacon
@ 2016-09-30 12:55 ` Vadim Lomovtsev
0 siblings, 0 replies; 4+ messages in thread
From: Vadim Lomovtsev @ 2016-09-30 12:55 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Sep 30, 2016 at 10:14:15AM +0100, Will Deacon wrote:
> On Fri, Sep 30, 2016 at 12:03:26AM -0700, Vadim Lomovtsev wrote:
> > [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)/$@
>
> It might be worth fixing the other architectures that just set KBUILD_IMAGE
> to the filename too. Then you could remove the bodge from
> scripts/package/builddeb that tries to support both formats.
>
> Will
>
Agree.
And I would do that but I have no other setup except arm64
and x86 to test such changes.
However, possible solution could be in the same manner:
add extra rule into make file to provide correct KBUILD_IMAGE
value by "make image_name" command. Also builddeb script should
be updated with such command call before copy. Thus for each
architecture it would be possible to provide correct path along
with filename.
Vadim
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-09-30 12:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2016-09-30 9:14 ` Will Deacon
2016-09-30 12:55 ` Vadim Lomovtsev
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.