* [PATCH 3/6] arc: Use full path in KBUILD_IMAGE definition
[not found] <20161122213434.14788-1-mmarek@suse.com>
@ 2016-11-22 21:34 ` Michal Marek
2016-11-23 19:40 ` Alexey Brodkin
2017-03-20 13:54 ` Masahiro Yamada
0 siblings, 2 replies; 4+ messages in thread
From: Michal Marek @ 2016-11-22 21:34 UTC (permalink / raw)
To: linux-snps-arc
The KBUILD_IMAGE variable is used by the rpm and deb-pkg targets, which
expect it to point to the image file in the build directory. The
builddeb script has a workaround for architectures which only provide
the basename, but let's provide a clean interface for packaging tools.
Cc: Vineet Gupta <vgupta at synopsys.com>
Cc: linux-snps-arc at lists.infradead.org
Signed-off-by: Michal Marek <mmarek at suse.com>
---
arch/arc/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arc/Makefile b/arch/arc/Makefile
index 19cce226d1a8..44ef35d33956 100644
--- a/arch/arc/Makefile
+++ b/arch/arc/Makefile
@@ -123,9 +123,9 @@ libs-y += arch/arc/lib/ $(LIBGCC)
boot := arch/arc/boot
#default target for make without any arguments.
-KBUILD_IMAGE := bootpImage
+KBUILD_IMAGE := $(boot)/bootpImage
-all: $(KBUILD_IMAGE)
+all: bootpImage
bootpImage: vmlinux
boot_targets += uImage uImage.bin uImage.gz
--
2.10.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/6] arc: Use full path in KBUILD_IMAGE definition
2016-11-22 21:34 ` [PATCH 3/6] arc: Use full path in KBUILD_IMAGE definition Michal Marek
@ 2016-11-23 19:40 ` Alexey Brodkin
2016-11-25 14:21 ` Michal Marek
2017-03-20 13:54 ` Masahiro Yamada
1 sibling, 1 reply; 4+ messages in thread
From: Alexey Brodkin @ 2016-11-23 19:40 UTC (permalink / raw)
To: linux-snps-arc
Hi Michal,
On Tue, 2016-11-22@22:34 +0100, Michal Marek wrote:
> The KBUILD_IMAGE variable is used by the rpm and deb-pkg targets, which
> expect it to point to the image file in the build directory. The
> builddeb script has a workaround for architectures which only provide
> the basename, but let's provide a clean interface for packaging tools.
>
> Cc: Vineet Gupta <vgupta at synopsys.com>
> Cc: linux-snps-arc at lists.infradead.org
> Signed-off-by: Michal Marek <mmarek at suse.com>
> ---
> ?arch/arc/Makefile | 4 ++--
> ?1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arc/Makefile b/arch/arc/Makefile
> index 19cce226d1a8..44ef35d33956 100644
> --- a/arch/arc/Makefile
> +++ b/arch/arc/Makefile
> @@ -123,9 +123,9 @@ libs-y += arch/arc/lib/ $(LIBGCC)
> ?boot := arch/arc/boot
> ?
> ?#default target for make without any arguments.
> -KBUILD_IMAGE := bootpImage
> +KBUILD_IMAGE := $(boot)/bootpImage
> ?
> -all: $(KBUILD_IMAGE)
> +all: bootpImage
> ?bootpImage: vmlinux
> ?
> ?boot_targets += uImage uImage.bin uImage.gz
I tried to find any examples on how that?KBUILD_IMAGE thingy is used
but to no avail. It looks like for ARC "bootpImage" makes not much
sense and if you really want to get something useful in .deb/.rpm
most probably something like below may work much better:
------------------------>8--------------------------
KBUILD_IMAGE := $(boot)/uImage
------------------------>8--------------------------
And I don't know context of KBUILD_IMAGE usage but in
case of ARC our default target is "vmlinux" so I'm not sure then if
KBUILD_IMAGE may point to non-default target.
For example in "arch/avr32/Makefile" I see more complicated construction:
------------------------>8--------------------------
? ? ? ? ? ? ?KBUILD_IMAGE := $(boot)/uImage
vmlinux.elf: KBUILD_IMAGE := $(boot)/vmlinux.elf
vmlinux.cso: KBUILD_IMAGE := $(boot)/vmlinux.cso
uImage.srec: KBUILD_IMAGE := $(boot)/uImage.srec
uImage:??????KBUILD_IMAGE := $(boot)/uImage
------------------------>8--------------------------
and may imagine that we need something similar for ARC obviously with
default being "$(boot)/vmlinux".
-Alexey
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 3/6] arc: Use full path in KBUILD_IMAGE definition
2016-11-23 19:40 ` Alexey Brodkin
@ 2016-11-25 14:21 ` Michal Marek
0 siblings, 0 replies; 4+ messages in thread
From: Michal Marek @ 2016-11-25 14:21 UTC (permalink / raw)
To: linux-snps-arc
Dne 23.11.2016 v 20:40 Alexey Brodkin napsal(a):
>> diff --git a/arch/arc/Makefile b/arch/arc/Makefile
>> index 19cce226d1a8..44ef35d33956 100644
>> --- a/arch/arc/Makefile
>> +++ b/arch/arc/Makefile
>> @@ -123,9 +123,9 @@ libs-y += arch/arc/lib/ $(LIBGCC)
>> boot := arch/arc/boot
>>
>> #default target for make without any arguments.
>> -KBUILD_IMAGE := bootpImage
>> +KBUILD_IMAGE := $(boot)/bootpImage
>>
>> -all: $(KBUILD_IMAGE)
>> +all: bootpImage
>> bootpImage: vmlinux
>>
>> boot_targets += uImage uImage.bin uImage.gz
>
> I tried to find any examples on how that KBUILD_IMAGE thingy is used
> but to no avail.
Ho Alexey,
see scripts/pacakge/{builddeb,buildtar,mkspec}. mkspec calls make
image_name, which in turn outputs $KBUILD_IMAGE.
> It looks like for ARC "bootpImage" makes not much
> sense and if you really want to get something useful in .deb/.rpm
> most probably something like below may work much better:
> ------------------------>8--------------------------
> KBUILD_IMAGE := $(boot)/uImage
> ------------------------>8--------------------------
>
> And I don't know context of KBUILD_IMAGE usage but in
> case of ARC our default target is "vmlinux" so I'm not sure then if
> KBUILD_IMAGE may point to non-default target.
Right, this will not work for make rpm-pkg, since it calls make with no
explicit target and expects the file pointed to by KBUILD_IMAGE to exist
afterward. This will work if you also change the 'all' target to depend
on uImage.
> For example in "arch/avr32/Makefile" I see more complicated construction:
> ------------------------>8--------------------------
> KBUILD_IMAGE := $(boot)/uImage
> vmlinux.elf: KBUILD_IMAGE := $(boot)/vmlinux.elf
> vmlinux.cso: KBUILD_IMAGE := $(boot)/vmlinux.cso
> uImage.srec: KBUILD_IMAGE := $(boot)/uImage.srec
> uImage: KBUILD_IMAGE := $(boot)/uImage
> ------------------------>8--------------------------
Right, but the packaging targets will only build and package uImage. The
other redefinitions are there only for the avr32 install rule:
install: vmlinux
$(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) $@
> and may imagine that we need something similar for ARC obviously with
> default being "$(boot)/vmlinux".
What some other architectures do is that the image format is selected
via Kconfig and not on the make command line. E.g. arm and sh do this.
Michal
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 3/6] arc: Use full path in KBUILD_IMAGE definition
2016-11-22 21:34 ` [PATCH 3/6] arc: Use full path in KBUILD_IMAGE definition Michal Marek
2016-11-23 19:40 ` Alexey Brodkin
@ 2017-03-20 13:54 ` Masahiro Yamada
1 sibling, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2017-03-20 13:54 UTC (permalink / raw)
To: linux-snps-arc
2016-11-23 6:34 GMT+09:00 Michal Marek <mmarek at suse.com>:
> The KBUILD_IMAGE variable is used by the rpm and deb-pkg targets, which
> expect it to point to the image file in the build directory. The
> builddeb script has a workaround for architectures which only provide
> the basename, but let's provide a clean interface for packaging tools.
>
> Cc: Vineet Gupta <vgupta at synopsys.com>
> Cc: linux-snps-arc at lists.infradead.org
> Signed-off-by: Michal Marek <mmarek at suse.com>
Applied to linux-kbuild/misc. Thanks!
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-03-20 13:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20161122213434.14788-1-mmarek@suse.com>
2016-11-22 21:34 ` [PATCH 3/6] arc: Use full path in KBUILD_IMAGE definition Michal Marek
2016-11-23 19:40 ` Alexey Brodkin
2016-11-25 14:21 ` Michal Marek
2017-03-20 13:54 ` Masahiro Yamada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox