All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] builddeb: fix cross-building to arm64 producing host-arch debs
@ 2016-11-04 16:14 Adam Borowski
  2016-11-10  8:24 ` Riku Voipio
  0 siblings, 1 reply; 6+ messages in thread
From: Adam Borowski @ 2016-11-04 16:14 UTC (permalink / raw)
  To: Michal Marek, linux-kbuild; +Cc: Adam Borowski

Both Debian and kernel archs are "arm64" but UTS_MACHINE and gcc say
"aarch64".

Signed-off-by: Adam Borowski <kilobyte@angband.pl>
---
 scripts/package/builddeb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 8ea9fd2..3c575cd0 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -51,7 +51,7 @@ set_debarch() {
 		debarch=hppa ;;
 	mips*)
 		debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo el || true) ;;
-	arm64)
+	aarch64|arm64)
 		debarch=arm64 ;;
 	arm*)
 		if grep -q CONFIG_AEABI=y $KCONFIG_CONFIG; then
-- 
2.10.2


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

* Re: [PATCH] builddeb: fix cross-building to arm64 producing host-arch debs
  2016-11-04 16:14 [PATCH] builddeb: fix cross-building to arm64 producing host-arch debs Adam Borowski
@ 2016-11-10  8:24 ` Riku Voipio
  2016-11-10  8:47   ` Riku Voipio
  0 siblings, 1 reply; 6+ messages in thread
From: Riku Voipio @ 2016-11-10  8:24 UTC (permalink / raw)
  To: Adam Borowski; +Cc: Michal Marek, linux-kbuild

On 4 November 2016 at 18:14, Adam Borowski <kilobyte@angband.pl> wrote:
> Both Debian and kernel archs are "arm64" but UTS_MACHINE and gcc say
> "aarch64".

I cross-compile arm64 kernels all the time and they come out as arm64.deb.
What exact command are you using to build your kernel to see host arch.deb?

Riku

> Signed-off-by: Adam Borowski <kilobyte@angband.pl>
> ---
>  scripts/package/builddeb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> index 8ea9fd2..3c575cd0 100755
> --- a/scripts/package/builddeb
> +++ b/scripts/package/builddeb
> @@ -51,7 +51,7 @@ set_debarch() {
>                 debarch=hppa ;;
>         mips*)
>                 debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo el || true) ;;
> -       arm64)
> +       aarch64|arm64)
>                 debarch=arm64 ;;
>         arm*)
>                 if grep -q CONFIG_AEABI=y $KCONFIG_CONFIG; then
> --
> 2.10.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] builddeb: fix cross-building to arm64 producing host-arch debs
  2016-11-10  8:24 ` Riku Voipio
@ 2016-11-10  8:47   ` Riku Voipio
  2016-11-10 11:04     ` Michal Marek
  0 siblings, 1 reply; 6+ messages in thread
From: Riku Voipio @ 2016-11-10  8:47 UTC (permalink / raw)
  To: Adam Borowski; +Cc: Michal Marek, linux-kbuild, regressions

On 10 November 2016 at 10:24, Riku Voipio <riku.voipio@linaro.org> wrote:
> On 4 November 2016 at 18:14, Adam Borowski <kilobyte@angband.pl> wrote:
>> Both Debian and kernel archs are "arm64" but UTS_MACHINE and gcc say
>> "aarch64".
>
> I cross-compile arm64 kernels all the time and they come out as arm64.deb.
> What exact command are you using to build your kernel to see host arch.deb?

OK, I see. UTS_MACHINE use to incorrect, now it has been fixed:

commit cfa88c79462d15098db29edebe623428c3620a4b
Author: Michal Marek <mmarek@suse.com>
Date:   Tue Aug 30 10:31:35 2016 +0200

    arm64: Set UTS_MACHINE in the Makefile

But that commit caused regression to builddeb since it wasn't updated
at the same time.

The patch below is correct fix,

Acked-by: Riku Voipio <riku.voipio@linaro.org>

>> ---
>>  scripts/package/builddeb | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
>> index 8ea9fd2..3c575cd0 100755
>> --- a/scripts/package/builddeb
>> +++ b/scripts/package/builddeb
>> @@ -51,7 +51,7 @@ set_debarch() {
>>                 debarch=hppa ;;
>>         mips*)
>>                 debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo el || true) ;;
>> -       arm64)
>> +       aarch64|arm64)
>>                 debarch=arm64 ;;
>>         arm*)
>>                 if grep -q CONFIG_AEABI=y $KCONFIG_CONFIG; then
>> --
>> 2.10.2
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] builddeb: fix cross-building to arm64 producing host-arch debs
  2016-11-10  8:47   ` Riku Voipio
@ 2016-11-10 11:04     ` Michal Marek
  2016-11-10 12:17       ` Riku Voipio
  0 siblings, 1 reply; 6+ messages in thread
From: Michal Marek @ 2016-11-10 11:04 UTC (permalink / raw)
  To: Riku Voipio, Adam Borowski; +Cc: linux-kbuild, regressions

On 2016-11-10 09:47, Riku Voipio wrote:
> On 10 November 2016 at 10:24, Riku Voipio <riku.voipio@linaro.org> wrote:
>> On 4 November 2016 at 18:14, Adam Borowski <kilobyte@angband.pl> wrote:
>>> Both Debian and kernel archs are "arm64" but UTS_MACHINE and gcc say
>>> "aarch64".
>>
>> I cross-compile arm64 kernels all the time and they come out as arm64.deb.
>> What exact command are you using to build your kernel to see host arch.deb?
> 
> OK, I see. UTS_MACHINE use to incorrect, now it has been fixed:
> 
> commit cfa88c79462d15098db29edebe623428c3620a4b
> Author: Michal Marek <mmarek@suse.com>
> Date:   Tue Aug 30 10:31:35 2016 +0200
> 
>     arm64: Set UTS_MACHINE in the Makefile
> 
> But that commit caused regression to builddeb since it wasn't updated
> at the same time.

Sorry about that.


> The patch below is correct fix,
> 
> Acked-by: Riku Voipio <riku.voipio@linaro.org>
> 
>>> ---
>>>  scripts/package/builddeb | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
>>> index 8ea9fd2..3c575cd0 100755
>>> --- a/scripts/package/builddeb
>>> +++ b/scripts/package/builddeb
>>> @@ -51,7 +51,7 @@ set_debarch() {
>>>                 debarch=hppa ;;
>>>         mips*)
>>>                 debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo el || true) ;;
>>> -       arm64)
>>> +       aarch64|arm64)
>>>                 debarch=arm64 ;;

UTS_MACHINE is now always aarch64 on this architecture, so maybe stop
matching "arm64" to avoid confusion?

Thanks,
Michal


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

* Re: [PATCH] builddeb: fix cross-building to arm64 producing host-arch debs
  2016-11-10 11:04     ` Michal Marek
@ 2016-11-10 12:17       ` Riku Voipio
  2016-11-11  8:55         ` [PATCH reworded] " Adam Borowski
  0 siblings, 1 reply; 6+ messages in thread
From: Riku Voipio @ 2016-11-10 12:17 UTC (permalink / raw)
  To: Michal Marek; +Cc: Adam Borowski, linux-kbuild, regressions

On 10 November 2016 at 13:04, Michal Marek <mmarek@suse.com> wrote:
> On 2016-11-10 09:47, Riku Voipio wrote:
>> On 10 November 2016 at 10:24, Riku Voipio <riku.voipio@linaro.org> wrote:
>>> On 4 November 2016 at 18:14, Adam Borowski <kilobyte@angband.pl> wrote:
>>>> Both Debian and kernel archs are "arm64" but UTS_MACHINE and gcc say
>>>> "aarch64".
>>>
>>> I cross-compile arm64 kernels all the time and they come out as arm64.deb.
>>> What exact command are you using to build your kernel to see host arch.deb?
>>
>> OK, I see. UTS_MACHINE use to incorrect, now it has been fixed:
>>
>> commit cfa88c79462d15098db29edebe623428c3620a4b
>> Author: Michal Marek <mmarek@suse.com>
>> Date:   Tue Aug 30 10:31:35 2016 +0200
>>
>>     arm64: Set UTS_MACHINE in the Makefile
>>
>> But that commit caused regression to builddeb since it wasn't updated
>> at the same time.
>
> Sorry about that.
>
>
>> The patch below is correct fix,
>>
>> Acked-by: Riku Voipio <riku.voipio@linaro.org>
>>
>>>> ---
>>>>  scripts/package/builddeb | 2 +-
>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
>>>> index 8ea9fd2..3c575cd0 100755
>>>> --- a/scripts/package/builddeb
>>>> +++ b/scripts/package/builddeb
>>>> @@ -51,7 +51,7 @@ set_debarch() {
>>>>                 debarch=hppa ;;
>>>>         mips*)
>>>>                 debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo el || true) ;;
>>>> -       arm64)
>>>> +       aarch64|arm64)
>>>>                 debarch=arm64 ;;
>
> UTS_MACHINE is now always aarch64 on this architecture, so maybe stop
> matching "arm64" to avoid confusion?

I was wondering if it might makes sense to keep the arm64 around for a
while, for example if someone reverts the UTS_MACHINE setting patch
from arch/arm64 for unrelated reasons and still tries to build a deb.
But I guess that's a corner case, and it's indeed cleaner without the
arm64 bit. So either way works for me.

Riku

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

* [PATCH reworded] builddeb: fix cross-building to arm64 producing host-arch debs
  2016-11-10 12:17       ` Riku Voipio
@ 2016-11-11  8:55         ` Adam Borowski
  0 siblings, 0 replies; 6+ messages in thread
From: Adam Borowski @ 2016-11-11  8:55 UTC (permalink / raw)
  To: Michal Marek, linux-kbuild, Riku Voipio; +Cc: Adam Borowski

Both Debian and kernel archs are "arm64" but UTS_MACHINE and gcc say
"aarch64".  Recognizing just the latter should be enough but let's
accept both in case something regresses again or an user sets
UTS_MACHINE=arm64.

Regressed in cfa88c7: arm64: Set UTS_MACHINE in the Makefile.

Signed-off-by: Adam Borowski <kilobyte@angband.pl>
Acked-by: Riku Voipio <riku.voipio@linaro.org>
---
 scripts/package/builddeb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 8ea9fd2..3c575cd0 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -51,7 +51,7 @@ set_debarch() {
 		debarch=hppa ;;
 	mips*)
 		debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo el || true) ;;
-	arm64)
+	aarch64|arm64)
 		debarch=arm64 ;;
 	arm*)
 		if grep -q CONFIG_AEABI=y $KCONFIG_CONFIG; then
-- 
2.10.2

Riku Voipio wrote:
> On 10 November 2016 at 13:04, Michal Marek <mmarek@suse.com> wrote:
> >
> > UTS_MACHINE is now always aarch64 on this architecture, so maybe stop
> matching "arm64" to avoid confusion?
>
> I was wondering if it might makes sense to keep the arm64 around for a
> while, for example if someone reverts the UTS_MACHINE setting patch
> from arch/arm64 for unrelated reasons and still tries to build a deb.
> But I guess that's a corner case, and it's indeed cleaner without the
> arm64 bit. So either way works for me.

I think that it's better to be liberal in what you accept, especially for
something an user might want to override.  It's up to you guys to decide,
though.

Here's a version with no changes but the commit message extended to mention
cfa88c7 and "aarch64" being sufficient.

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

end of thread, other threads:[~2016-11-11  8:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-04 16:14 [PATCH] builddeb: fix cross-building to arm64 producing host-arch debs Adam Borowski
2016-11-10  8:24 ` Riku Voipio
2016-11-10  8:47   ` Riku Voipio
2016-11-10 11:04     ` Michal Marek
2016-11-10 12:17       ` Riku Voipio
2016-11-11  8:55         ` [PATCH reworded] " Adam Borowski

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.