linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kbuild: add ARM support for tar-pkg
@ 2017-05-13 11:31 Sascha Silbe
  2017-05-13 15:22 ` Masahiro Yamada
  0 siblings, 1 reply; 5+ messages in thread
From: Sascha Silbe @ 2017-05-13 11:31 UTC (permalink / raw)
  To: Masahiro Yamada, Michal Marek; +Cc: linux-kbuild, linux-kernel

The fallback code for "unknown" architectures doesn't work on ARM
because for ARM (and a couple of other architectures) KBUILD_IMAGE
contains only the file name, not the full path. Having an explicit
rule also avoids printing the warning for unknown architectures.

Signed-off-by: Sascha Silbe <x-linux@infra-silbe.de>
---
 scripts/package/buildtar | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/scripts/package/buildtar b/scripts/package/buildtar
index e046bff33589..cbcc4496c025 100755
--- a/scripts/package/buildtar
+++ b/scripts/package/buildtar
@@ -108,6 +108,11 @@ case "${ARCH}" in
 			cp -v -- "${objtree}/vmlinux" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}"
 		fi
 		;;
+	arm)
+		if [ -f "${objtree}/arch/${ARCH}/boot/${KBUILD_IMAGE}" ]; then
+			cp -v -- "${objtree}/arch/${ARCH}/boot/${KBUILD_IMAGE}" "${tmpdir}/boot/${KBUILD_IMAGE}-${KERNELRELEASE}"
+		fi
+		;;
 	*)
 		[ -f "${KBUILD_IMAGE}" ] && cp -v -- "${KBUILD_IMAGE}" "${tmpdir}/boot/vmlinux-kbuild-${KERNELRELEASE}"
 		echo "" >&2
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] kbuild: add ARM support for tar-pkg
  2017-05-13 11:31 [PATCH] kbuild: add ARM support for tar-pkg Sascha Silbe
@ 2017-05-13 15:22 ` Masahiro Yamada
  2017-05-14 16:54   ` Sascha Silbe
  2017-05-14 17:09   ` [PATCH v2] kbuild: add explicit " Sascha Silbe
  0 siblings, 2 replies; 5+ messages in thread
From: Masahiro Yamada @ 2017-05-13 15:22 UTC (permalink / raw)
  To: Sascha Silbe
  Cc: Michal Marek, Linux Kbuild mailing list, Linux Kernel Mailing List

2017-05-13 20:31 GMT+09:00 Sascha Silbe <x-linux@infra-silbe.de>:
> The fallback code for "unknown" architectures doesn't work on ARM
> because for ARM (and a couple of other architectures) KBUILD_IMAGE
> contains only the file name, not the full path. Having an explicit
> rule also avoids printing the warning for unknown architectures.
>
> Signed-off-by: Sascha Silbe <x-linux@infra-silbe.de>
> ---

Now KBUILD_IMAGE contains the full path for all architectures.


Please check the following commit.

commit 152e6744ebfc8fa6cc9fff4ba36271f5f1ba2821
Author: Michal Marek <mmarek@suse.com>
Date:   Tue Nov 22 22:34:30 2016 +0100

    arm: Use full path in KBUILD_IMAGE definition



-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] kbuild: add ARM support for tar-pkg
  2017-05-13 15:22 ` Masahiro Yamada
@ 2017-05-14 16:54   ` Sascha Silbe
  2017-05-14 17:09   ` [PATCH v2] kbuild: add explicit " Sascha Silbe
  1 sibling, 0 replies; 5+ messages in thread
From: Sascha Silbe @ 2017-05-14 16:54 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Michal Marek, Linux Kbuild mailing list, Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 1247 bytes --]

Dear Masahiro (is that right?),

Masahiro Yamada <yamada.masahiro@socionext.com> writes:

> 2017-05-13 20:31 GMT+09:00 Sascha Silbe <x-linux@infra-silbe.de>:
>> The fallback code for "unknown" architectures doesn't work on ARM
>> because for ARM (and a couple of other architectures) KBUILD_IMAGE
>> contains only the file name, not the full path. Having an explicit
>> rule also avoids printing the warning for unknown architectures.
>>
>> Signed-off-by: Sascha Silbe <x-linux@infra-silbe.de>
>> ---
>
> Now KBUILD_IMAGE contains the full path for all architectures.
>
>
> Please check the following commit.
>
> commit 152e6744ebfc8fa6cc9fff4ba36271f5f1ba2821
> Author: Michal Marek <mmarek@suse.com>
> Date:   Tue Nov 22 22:34:30 2016 +0100
>
>     arm: Use full path in KBUILD_IMAGE definition

Figures. I'm sitting on this patch for years and when I finally get
around to write a commit message, somebody fixed it elsewhere and that
patch went in just a few days ago. :)

The second part of the rationale (getting rid of the warning) still
applies, so I'll follow up with a v2.

Sascha
-- 
Softwareentwicklung Sascha Silbe, Niederhofenstraße 5/1, 71229 Leonberg
https://se-silbe.de/
USt-IdNr.: DE281696641

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2] kbuild: add explicit ARM support for tar-pkg
  2017-05-13 15:22 ` Masahiro Yamada
  2017-05-14 16:54   ` Sascha Silbe
@ 2017-05-14 17:09   ` Sascha Silbe
  2017-06-05  9:02     ` Masahiro Yamada
  1 sibling, 1 reply; 5+ messages in thread
From: Sascha Silbe @ 2017-05-14 17:09 UTC (permalink / raw)
  To: Masahiro Yamada, Michal Marek; +Cc: linux-kbuild, linux-kernel

buildtar warns when an architecture doesn't have an explicit rule on
what files to copy, even when the generic rule works just fine. Add a
rule for ARM that does the same as the explicit rule, but avoids the
warning.

Signed-off-by: Sascha Silbe <x-linux@infra-silbe.de>
---
v1→v2: rebased on top of todays linus master, including commit 152e6744ebfc

Not duplicating the rule would have been nice from a maintenance point
of view, but doesn't fit the current code structure very well. It also
avoids breakage if the generic rule ever gets adjusted to something
else that doesn't work for ARM.


 scripts/package/buildtar | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/package/buildtar b/scripts/package/buildtar
index e046bff33589..ea84ba67619b 100755
--- a/scripts/package/buildtar
+++ b/scripts/package/buildtar
@@ -108,6 +108,9 @@ case "${ARCH}" in
 			cp -v -- "${objtree}/vmlinux" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}"
 		fi
 		;;
+	arm)
+		[ -f "${KBUILD_IMAGE}" ] && cp -v -- "${KBUILD_IMAGE}" "${tmpdir}/boot/vmlinux-kbuild-${KERNELRELEASE}"
+		;;
 	*)
 		[ -f "${KBUILD_IMAGE}" ] && cp -v -- "${KBUILD_IMAGE}" "${tmpdir}/boot/vmlinux-kbuild-${KERNELRELEASE}"
 		echo "" >&2
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] kbuild: add explicit ARM support for tar-pkg
  2017-05-14 17:09   ` [PATCH v2] kbuild: add explicit " Sascha Silbe
@ 2017-06-05  9:02     ` Masahiro Yamada
  0 siblings, 0 replies; 5+ messages in thread
From: Masahiro Yamada @ 2017-06-05  9:02 UTC (permalink / raw)
  To: Sascha Silbe
  Cc: Michal Marek, Linux Kbuild mailing list, Linux Kernel Mailing List

Hi Sascha,
Sorry for my late reply.

2017-05-15 2:09 GMT+09:00 Sascha Silbe <x-linux@infra-silbe.de>:
> buildtar warns when an architecture doesn't have an explicit rule on
> what files to copy, even when the generic rule works just fine. Add a
> rule for ARM that does the same as the explicit rule, but avoids the
> warning.
>
> Signed-off-by: Sascha Silbe <x-linux@infra-silbe.de>
> ---
> v1→v2: rebased on top of todays linus master, including commit 152e6744ebfc
>
> Not duplicating the rule would have been nice from a maintenance point
> of view, but doesn't fit the current code structure very well. It also
> avoids breakage if the generic rule ever gets adjusted to something
> else that doesn't work for ARM.
>
>
>  scripts/package/buildtar | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/scripts/package/buildtar b/scripts/package/buildtar
> index e046bff33589..ea84ba67619b 100755
> --- a/scripts/package/buildtar
> +++ b/scripts/package/buildtar
> @@ -108,6 +108,9 @@ case "${ARCH}" in
>                         cp -v -- "${objtree}/vmlinux" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}"
>                 fi
>                 ;;
> +       arm)
> +               [ -f "${KBUILD_IMAGE}" ] && cp -v -- "${KBUILD_IMAGE}" "${tmpdir}/boot/vmlinux-kbuild-${KERNELRELEASE}"
> +               ;;
>         *)
>                 [ -f "${KBUILD_IMAGE}" ] && cp -v -- "${KBUILD_IMAGE}" "${tmpdir}/boot/vmlinux-kbuild-${KERNELRELEASE}"
>                 echo "" >&2


I do not get why we need to add a separate entry
to avoid the WARNING.

With KBUILD_IMAGE fixed, mkspec and builddeb now
handle the kernel image in an (almost) arch-agnostic way.

I think the WARNING can be simply removed from the default case.
Also, could you rename vmlinux-kbuild-${KERNELRELEASE}
to vmlinuz-${KERNELRELEASE} in order to align with mkspec/builddeb?
Then, x86|i386|x86_64 can be merged into the default case.


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-06-05  9:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-13 11:31 [PATCH] kbuild: add ARM support for tar-pkg Sascha Silbe
2017-05-13 15:22 ` Masahiro Yamada
2017-05-14 16:54   ` Sascha Silbe
2017-05-14 17:09   ` [PATCH v2] kbuild: add explicit " Sascha Silbe
2017-06-05  9:02     ` Masahiro Yamada

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).