diff mbox

[v2,1/1] builddeb: add arm64 in the supported architectures

Message ID CAGNsrLAiK88Lfz1nhZgB8FUgCDO88g462uJG+yKZ139_AZymeA@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Fathi Boudra June 10, 2014, 8:15 a.m. UTC
On 9 June 2014 03:15, Ben Hutchings <ben@decadent.org.uk> wrote:
> On Sun, 2014-04-13 at 14:26 +0100, Ben Hutchings wrote:
>> On Sat, 2014-04-12 at 15:53 +0300, Fathi Boudra wrote:
>> > Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
>>
>> Reviewed-by: Ben Hutchings <ben@decadent.org.uk>
>>
>> > ---
>> >  scripts/package/builddeb | 2 ++
>> >  1 file changed, 2 insertions(+)
>> >
>> > diff --git a/scripts/package/builddeb b/scripts/package/builddeb
>> > index f46e4dd..0bf29a6 100644
>> > --- a/scripts/package/builddeb
>> > +++ b/scripts/package/builddeb
>> > @@ -42,6 +42,8 @@ create_package() {
>> >             debarch=hppa ;;
>> >     mips*)
>> >             debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo el || true) ;;
>> > +   arm64)
>
> Now I'm not so sure.  As we are comparing with the 'machine' name
> ($UTS_MACHINE, not $ARCH or $SRCARCH), shouldn't this actually check for
> aarch64?

not sure. I've seen Ian comment (added to the cc list). He's proposing:

[...]
[...]

I'm taking a closer look now.

> Ben.
>
>> > +           debarch=arm64 ;;
>> >     arm*)
>> >             debarch=arm$(grep -q CONFIG_AEABI=y $KCONFIG_CONFIG && echo el || true) ;;
>> >     *)
>>
>
> --
> Ben Hutchings
> One of the nice things about standards is that there are so many of them.
--
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

Comments

Ian Campbell June 10, 2014, 8:31 a.m. UTC | #1
On Tue, 2014-06-10 at 11:15 +0300, Fathi Boudra wrote:
> On 9 June 2014 03:15, Ben Hutchings <ben@decadent.org.uk> wrote:
> > On Sun, 2014-04-13 at 14:26 +0100, Ben Hutchings wrote:
> >> On Sat, 2014-04-12 at 15:53 +0300, Fathi Boudra wrote:
> >> > Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
> >>
> >> Reviewed-by: Ben Hutchings <ben@decadent.org.uk>
> >>
> >> > ---
> >> >  scripts/package/builddeb | 2 ++
> >> >  1 file changed, 2 insertions(+)
> >> >
> >> > diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> >> > index f46e4dd..0bf29a6 100644
> >> > --- a/scripts/package/builddeb
> >> > +++ b/scripts/package/builddeb
> >> > @@ -42,6 +42,8 @@ create_package() {
> >> >             debarch=hppa ;;
> >> >     mips*)
> >> >             debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo el || true) ;;
> >> > +   arm64)
> >
> > Now I'm not so sure.  As we are comparing with the 'machine' name
> > ($UTS_MACHINE, not $ARCH or $SRCARCH), shouldn't this actually check for
> > aarch64?
> 
> not sure. I've seen Ian comment (added to the cc list).

The patch above produced the right thing when crossbuilt with
ARCH=arm64. e.g. linux-image-3.14.5+_3.14.5+-2_arm64.deb

With just Ben's original patch it produced linux-image-3.14.5+_3.14.5
+-2_arm.deb instead.

I think UTS_MACHINE is correct because:

Makefile:UTS_MACHINE    := $(ARCH)

and there is no override in arch/arm*/Makefile.

So the kernel arch is the correct thing to use here.

Ian.

--
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
Ben Hutchings June 10, 2014, 12:49 p.m. UTC | #2
On Tue, 2014-06-10 at 09:31 +0100, Ian Campbell wrote:
> On Tue, 2014-06-10 at 11:15 +0300, Fathi Boudra wrote:
> > On 9 June 2014 03:15, Ben Hutchings <ben@decadent.org.uk> wrote:
> > > On Sun, 2014-04-13 at 14:26 +0100, Ben Hutchings wrote:
> > >> On Sat, 2014-04-12 at 15:53 +0300, Fathi Boudra wrote:
> > >> > Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
> > >>
> > >> Reviewed-by: Ben Hutchings <ben@decadent.org.uk>
> > >>
> > >> > ---
> > >> >  scripts/package/builddeb | 2 ++
> > >> >  1 file changed, 2 insertions(+)
> > >> >
> > >> > diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> > >> > index f46e4dd..0bf29a6 100644
> > >> > --- a/scripts/package/builddeb
> > >> > +++ b/scripts/package/builddeb
> > >> > @@ -42,6 +42,8 @@ create_package() {
> > >> >             debarch=hppa ;;
> > >> >     mips*)
> > >> >             debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo el || true) ;;
> > >> > +   arm64)
> > >
> > > Now I'm not so sure.  As we are comparing with the 'machine' name
> > > ($UTS_MACHINE, not $ARCH or $SRCARCH), shouldn't this actually check for
> > > aarch64?
> > 
> > not sure. I've seen Ian comment (added to the cc list).
> 
> The patch above produced the right thing when crossbuilt with
> ARCH=arm64. e.g. linux-image-3.14.5+_3.14.5+-2_arm64.deb
> 
> With just Ben's original patch it produced linux-image-3.14.5+_3.14.5
> +-2_arm.deb instead.
> 
> I think UTS_MACHINE is correct because:
> 
> Makefile:UTS_MACHINE    := $(ARCH)
> 
> and there is no override in arch/arm*/Makefile.
> 
> So the kernel arch is the correct thing to use here.

OK, so $UTS_MACHINE is a misnomer for this and some other architectures.
I wonder whether we should be using it at all?

Ben.
diff mbox

Patch

--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -28,7 +28,7 @@  create_package() {
        # Attempt to find the correct Debian architecture
        local forcearch="" debarch=""
        case "$UTS_MACHINE" in
-       i386|ia64|alpha)
+       i386|ia64|alpha|arm64)
                debarch="$UTS_MACHINE" ;;
        x86_64)
                debarch=amd64 ;;