All of lore.kernel.org
 help / color / mirror / Atom feed
* ARCH=hexagon unsupported?
@ 2021-04-22 22:12 Nick Desaulniers
  2021-04-23  9:36 ` Arnd Bergmann
  0 siblings, 1 reply; 15+ messages in thread
From: Nick Desaulniers @ 2021-04-22 22:12 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-hexagon, clang-built-linux, Brian Cain, linux-arch

Arnd,
No one can build ARCH=hexagon and
https://github.com/ClangBuiltLinux/linux/issues/759 has been open for
2 years.

Trying to build
$ ARCH=hexagon CROSS_COMPILE=hexagon-linux-gnu make LLVM=1 LLVM_IAS=1 -j71

shows numerous issues, the latest of which
commit 8320514c91bea ("hexagon: switch to ->regset_get()")
has a very obvious typo which misspells the `struct` keyword and has
been in the tree for almost 1 year.

Why is arch/hexagon/ in the tree if no one can build it?
-- 
Thanks,
~Nick Desaulniers

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

* Re: ARCH=hexagon unsupported?
  2021-04-22 22:12 ARCH=hexagon unsupported? Nick Desaulniers
@ 2021-04-23  9:36 ` Arnd Bergmann
  2021-04-23 17:43   ` Randy Dunlap
  2021-04-23 18:35   ` Brian Cain
  0 siblings, 2 replies; 15+ messages in thread
From: Arnd Bergmann @ 2021-04-23  9:36 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: open list:QUALCOMM HEXAGON...,
	clang-built-linux, Brian Cain, linux-arch, Guenter Roeck

On Fri, Apr 23, 2021 at 12:12 AM 'Nick Desaulniers' via Clang Built
Linux <clang-built-linux@googlegroups.com> wrote:
>
> Arnd,
> No one can build ARCH=hexagon and
> https://github.com/ClangBuiltLinux/linux/issues/759 has been open for
> 2 years.
>
> Trying to build
> $ ARCH=hexagon CROSS_COMPILE=hexagon-linux-gnu make LLVM=1 LLVM_IAS=1 -j71
>
> shows numerous issues, the latest of which
> commit 8320514c91bea ("hexagon: switch to ->regset_get()")
> has a very obvious typo which misspells the `struct` keyword and has
> been in the tree for almost 1 year.

Thank you for looking into it.

> Why is arch/hexagon/ in the tree if no one can build it?

Removing it sounds reasonable to me, it's been broken for too long, and
we did the same thing for unicore32 that was in the same situation
where the gcc port was too old to build the kernel and the clang
port never quite work in mainline.

Guenter also brought up the issue a year ago, and nothing happened.
I see Brian still occasionally sends an Ack to a patch that gets merged
through another tree, but he has not send any patches or pull requests
himself after taking over maintainership from Richard Kuo in 2019,
and the four hexagon pull requests after 2014 only contained build fixes
from developers that don't have access to the hardware (Randy Dunlap,
Viresh Kumar, Mike Frysinger and me).

       Arnd

[1] https://lore.kernel.org/lkml/04ca01d633a8$9abb8070$d0328150$@codeaurora.org/

---
$ git log --grep=linux-hexagon-kernel
commit bb736a5c0e9a2605f11c2bbb60a68f757832da32
Merge: 45979a956b92 18dd1793a340
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Fri Sep 20 11:28:43 2019 -0700

    Merge branch 'for-linus' of
git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux-hexagon-kernel

    Pull Hexagon maintainership update from Richard Kuo:
     "I am leaving QuIC, and Brian Cain will be taking over maintainership
      of the Hexagon port"

    * 'for-linus' of
git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux-hexagon-kernel:
      Hexagon: change maintainer to Brian Cain

commit 72d4c6e5893a122c2fd060ded2b490582a5bb377
Merge: 1d176582c795 5c41aaad409c
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Thu Sep 13 16:33:26 2018 -1000

    Merge branch 'for-linus' of
git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux-hexagon-kernel

    Pull hexagon fixes from Richard Kuo:
     "Some fixes for compile warnings"

    * 'for-linus' of
git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux-hexagon-kernel:
      hexagon: modify ffs() and fls() to return int
      arch/hexagon: fix kernel/dma.c build warning

commit 2d618bdf71635463a4aa4ad0fe46ec852292bc0c
Merge: f2125992e7cb 330e261c35df
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Tue May 1 19:54:22 2018 -0700

    Merge branch 'for-linus' of
git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux-hexagon-kernel

    Pull hexagon fixes from Richard Kuo:
     "Some small fixes for module compilation"

    * 'for-linus' of
git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux-hexagon-kernel:
      hexagon: export csum_partial_copy_nocheck
      hexagon: add memset_io() helper

commit 0cdf5a464070c8a2980a27113c47fb8e71babb9c
Merge: 65c61bc5dbbc 02cc2ccfe771
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Thu Sep 10 16:19:07 2015 -0700

    Merge branch 'for-linus' of
git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux-hexagon-kernel

    Pull hexagon updates from Richard Kuo:
     "Just two fixes -- one for a uapi header and one for a timer interface"

    * 'for-linus' of
git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux-hexagon-kernel:
      Revert "Hexagon: fix signal.c compile error"
      hexagon/time: Migrate to new 'set-state' interface

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

* Re: ARCH=hexagon unsupported?
  2021-04-23  9:36 ` Arnd Bergmann
@ 2021-04-23 17:43   ` Randy Dunlap
  2021-04-23 18:17     ` Arnd Bergmann
  2021-04-23 18:35   ` Brian Cain
  1 sibling, 1 reply; 15+ messages in thread
From: Randy Dunlap @ 2021-04-23 17:43 UTC (permalink / raw)
  To: Arnd Bergmann, Nick Desaulniers
  Cc: open list:QUALCOMM HEXAGON...,
	clang-built-linux, Brian Cain, linux-arch, Guenter Roeck

On 4/23/21 2:36 AM, Arnd Bergmann wrote:
> On Fri, Apr 23, 2021 at 12:12 AM 'Nick Desaulniers' via Clang Built
> Linux <clang-built-linux@googlegroups.com> wrote:
>>
>> Arnd,
>> No one can build ARCH=hexagon and
>> https://github.com/ClangBuiltLinux/linux/issues/759 has been open for
>> 2 years.
>>
>> Trying to build
>> $ ARCH=hexagon CROSS_COMPILE=hexagon-linux-gnu make LLVM=1 LLVM_IAS=1 -j71
>>
>> shows numerous issues, the latest of which
>> commit 8320514c91bea ("hexagon: switch to ->regset_get()")
>> has a very obvious typo which misspells the `struct` keyword and has
>> been in the tree for almost 1 year.
> 
> Thank you for looking into it.
> 
>> Why is arch/hexagon/ in the tree if no one can build it?
> 
> Removing it sounds reasonable to me, it's been broken for too long, and
> we did the same thing for unicore32 that was in the same situation
> where the gcc port was too old to build the kernel and the clang
> port never quite work in mainline.
> 
> Guenter also brought up the issue a year ago, and nothing happened.
> I see Brian still occasionally sends an Ack to a patch that gets merged
> through another tree, but he has not send any patches or pull requests
> himself after taking over maintainership from Richard Kuo in 2019,
> and the four hexagon pull requests after 2014 only contained build fixes
> from developers that don't have access to the hardware (Randy Dunlap,
> Viresh Kumar, Mike Frysinger and me).
> 
>        Arnd
> 
> [1] https://lore.kernel.org/lkml/04ca01d633a8$9abb8070$d0328150$@codeaurora.org/

There is no current gcc C compiler in the 3 locations that I know of to look.
The one I tried is v4.6 and it is too old to work with current makefiles.

-- 
~Randy


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

* Re: ARCH=hexagon unsupported?
  2021-04-23 17:43   ` Randy Dunlap
@ 2021-04-23 18:17     ` Arnd Bergmann
  2021-04-23 18:26       ` Miguel Ojeda
  2021-04-23 19:31       ` Brian Cain
  0 siblings, 2 replies; 15+ messages in thread
From: Arnd Bergmann @ 2021-04-23 18:17 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Nick Desaulniers, open list:QUALCOMM HEXAGON...,
	clang-built-linux, Brian Cain, linux-arch, Guenter Roeck

On Fri, Apr 23, 2021 at 7:43 PM Randy Dunlap <rdunlap@infradead.org> wrote:
> On 4/23/21 2:36 AM, Arnd Bergmann wrote:
> > [1] https://lore.kernel.org/lkml/04ca01d633a8$9abb8070$d0328150$@codeaurora.org/
>
> There is no current gcc C compiler in the 3 locations that I know of to look.
> The one I tried is v4.6 and it is too old to work with current makefiles.

Correct, as I understand it , work on gcc was stopped after the 4.6 release and
any testing internally to Qualcomm was done using a patched clang. A few years
ago this was said to be (almost?) entirely upstream, but as Nick points out
it has never been possible to build an upstream hexagon kernel with an upstream
clang.

       Arnd

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

* Re: ARCH=hexagon unsupported?
  2021-04-23 18:17     ` Arnd Bergmann
@ 2021-04-23 18:26       ` Miguel Ojeda
  2021-04-23 19:31       ` Brian Cain
  1 sibling, 0 replies; 15+ messages in thread
From: Miguel Ojeda @ 2021-04-23 18:26 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Randy Dunlap, Nick Desaulniers, open list:QUALCOMM HEXAGON...,
	clang-built-linux, Brian Cain, linux-arch, Guenter Roeck

On Fri, Apr 23, 2021 at 8:18 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
> Correct, as I understand it , work on gcc was stopped after the 4.6 release and
> any testing internally to Qualcomm was done using a patched clang. A few years
> ago this was said to be (almost?) entirely upstream, but as Nick points out
> it has never been possible to build an upstream hexagon kernel with an upstream
> clang.

It is pretty much dead code then. It would be a good idea to be a bit
more strict on this, i.e. not let archs linger in mainline if not
properly maintained. I would go even as far as requiring some public
CI logs for all architectures building -next/-rc as proof that some
configuration actually builds with some compiler, even if the compiler
is not an upstream one.

Cheers,
Miguel

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

* RE: ARCH=hexagon unsupported?
  2021-04-23  9:36 ` Arnd Bergmann
  2021-04-23 17:43   ` Randy Dunlap
@ 2021-04-23 18:35   ` Brian Cain
  2021-04-23 21:40     ` Nick Desaulniers
  1 sibling, 1 reply; 15+ messages in thread
From: Brian Cain @ 2021-04-23 18:35 UTC (permalink / raw)
  To: 'Arnd Bergmann', 'Nick Desaulniers'
  Cc: 'open list:QUALCOMM HEXAGON...',
	'clang-built-linux', 'linux-arch',
	'Guenter Roeck'

> -----Original Message-----
> From: Arnd Bergmann <arnd@kernel.org>
> Sent: Friday, April 23, 2021 4:37 AM
> To: Nick Desaulniers <ndesaulniers@google.com>
> Cc: open list:QUALCOMM HEXAGON... <linux-hexagon@vger.kernel.org>;
> clang-built-linux <clang-built-linux@googlegroups.com>; Brian Cain
> <bcain@codeaurora.org>; linux-arch <linux-arch@vger.kernel.org>; Guenter
> Roeck <linux@roeck-us.net>
> Subject: Re: ARCH=hexagon unsupported?
> 
> On Fri, Apr 23, 2021 at 12:12 AM 'Nick Desaulniers' via Clang Built Linux
> <clang-built-linux@googlegroups.com> wrote:
> >
> > Arnd,
> > No one can build ARCH=hexagon and
> > https://github.com/ClangBuiltLinux/linux/issues/759 has been open for
> > 2 years.
> >
> > Trying to build
> > $ ARCH=hexagon CROSS_COMPILE=hexagon-linux-gnu make LLVM=1
> LLVM_IAS=1
> > -j71
> >
> > shows numerous issues, the latest of which commit 8320514c91bea
> > ("hexagon: switch to ->regset_get()") has a very obvious typo which
> > misspells the `struct` keyword and has been in the tree for almost 1
> > year.
> 
> Thank you for looking into it.
> 
> > Why is arch/hexagon/ in the tree if no one can build it?
> 
> Removing it sounds reasonable to me, it's been broken for too long, and we
> did the same thing for unicore32 that was in the same situation where the
> gcc port was too old to build the kernel and the clang port never quite work
> in mainline.
> 
> Guenter also brought up the issue a year ago, and nothing happened.
> I see Brian still occasionally sends an Ack to a patch that gets merged through
> another tree, but he has not send any patches or pull requests himself after
> taking over maintainership from Richard Kuo in 2019, and the four hexagon
> pull requests after 2014 only contained build fixes from developers that don't
> have access to the hardware (Randy Dunlap, Viresh Kumar, Mike Frysinger
> and me).

Nick, Arnd,

I can appreciate your frustration, I can see that I have let the community down here.  I would like to keep hexagon in-tree and I am committed to making the changes necessary to do so.  I have a patch under internal review to address the cited build issues and libgcc/compiler-rt content.  In addition, my team has been focusing on developing QEMU system mode support that would mitigate some of the need for having hardware access.  We have landed support for userspace hexagon-linux in upstream QEMU.  My team and I want to make hexagon's open source footprint larger, not smaller.  I realize that not being a good steward of the hexagon kernel has not helped, and we will do what we can to fix it.

-Brian


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

* RE: ARCH=hexagon unsupported?
  2021-04-23 18:17     ` Arnd Bergmann
  2021-04-23 18:26       ` Miguel Ojeda
@ 2021-04-23 19:31       ` Brian Cain
  2021-04-23 20:26           ` Brian Cain
  1 sibling, 1 reply; 15+ messages in thread
From: Brian Cain @ 2021-04-23 19:31 UTC (permalink / raw)
  To: 'Arnd Bergmann', 'Randy Dunlap'
  Cc: 'Nick Desaulniers',
	'open list:QUALCOMM HEXAGON...',
	'clang-built-linux', 'linux-arch',
	'Guenter Roeck'

> -----Original Message-----
> From: Arnd Bergmann <arnd@kernel.org>
...
> > There is no current gcc C compiler in the 3 locations that I know of to look.
> > The one I tried is v4.6 and it is too old to work with current makefiles.
> 
> Correct, as I understand it , work on gcc was stopped after the 4.6 release
> and any testing internally to Qualcomm was done using a patched clang. A
> few years ago this was said to be (almost?) entirely upstream, but as Nick
> points out it has never been possible to build an upstream hexagon kernel
> with an upstream clang.

The critical missing component for a conventional build are implementations for compiler-emitted calls to builtins like __hexagon_memcpy_likely_aligned_min32bytes_mult8bytes, __hexagon_modsi3 -- these are available in the toolchain libraries (LIBGCC=libclang_rt.builtins-hexagon.a) but not in the kernel.  This is easy to mitigate and yet disappointing that I did not do so before.  I will do it.

There is a hexagon cross toolchain used for testing QEMU (userspace) guest code test cases.  This same toolchain can be used to build the kernel.  I will share a reference to that toolchain, standby.

-Brian


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

* RE: ARCH=hexagon unsupported?
  2021-04-23 19:31       ` Brian Cain
@ 2021-04-23 20:26           ` Brian Cain
  0 siblings, 0 replies; 15+ messages in thread
From: Brian Cain @ 2021-04-23 20:26 UTC (permalink / raw)
  To: bcain, 'Arnd Bergmann', 'Randy Dunlap'
  Cc: 'Nick Desaulniers',
	'open list:QUALCOMM HEXAGON...',
	'clang-built-linux', 'linux-arch',
	'Guenter Roeck'

> -----Original Message-----
> From: bcain=codeaurora.org@codeaurora.org
... 
> There is a hexagon cross toolchain used for testing QEMU (userspace) guest
> code test cases.  This same toolchain can be used to build the kernel.  I will
> share a reference to that toolchain, standby.

It's published as a container in the Gitlab Container Registry.  You can use docker/podman to pull "registry.gitlab.com/qemu-project/qemu/qemu/debian-hexagon-cross" in order to use it.

-Brian


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

* RE: ARCH=hexagon unsupported?
@ 2021-04-23 20:26           ` Brian Cain
  0 siblings, 0 replies; 15+ messages in thread
From: Brian Cain @ 2021-04-23 20:26 UTC (permalink / raw)
  To: bcain, 'Arnd Bergmann', 'Randy Dunlap'
  Cc: 'Nick Desaulniers',
	'open list:QUALCOMM HEXAGON...',
	'clang-built-linux', 'linux-arch',
	'Guenter Roeck'

> -----Original Message-----
> From: bcain=codeaurora.org@codeaurora.org
... 
> There is a hexagon cross toolchain used for testing QEMU (userspace) guest
> code test cases.  This same toolchain can be used to build the kernel.  I will
> share a reference to that toolchain, standby.

It's published as a container in the Gitlab Container Registry.  You can use docker/podman to pull "registry.gitlab.com/qemu-project/qemu/qemu/debian-hexagon-cross" in order to use it.

-Brian


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

* Re: ARCH=hexagon unsupported?
  2021-04-23 18:35   ` Brian Cain
@ 2021-04-23 21:40     ` Nick Desaulniers
  2021-04-26 13:13       ` Brian Cain
  0 siblings, 1 reply; 15+ messages in thread
From: Nick Desaulniers @ 2021-04-23 21:40 UTC (permalink / raw)
  To: Brian Cain
  Cc: Arnd Bergmann, open list:QUALCOMM HEXAGON...,
	clang-built-linux, linux-arch, Guenter Roeck, Randy Dunlap,
	Miguel Ojeda

On Fri, Apr 23, 2021 at 11:35 AM Brian Cain <bcain@codeaurora.org> wrote:
>
> > -----Original Message-----
> > From: Arnd Bergmann <arnd@kernel.org>
> > Sent: Friday, April 23, 2021 4:37 AM
> > To: Nick Desaulniers <ndesaulniers@google.com>
> > Cc: open list:QUALCOMM HEXAGON... <linux-hexagon@vger.kernel.org>;
> > clang-built-linux <clang-built-linux@googlegroups.com>; Brian Cain
> > <bcain@codeaurora.org>; linux-arch <linux-arch@vger.kernel.org>; Guenter
> > Roeck <linux@roeck-us.net>
> > Subject: Re: ARCH=hexagon unsupported?
> >
> > On Fri, Apr 23, 2021 at 12:12 AM 'Nick Desaulniers' via Clang Built Linux
> > <clang-built-linux@googlegroups.com> wrote:
> > >
> > > Arnd,
> > > No one can build ARCH=hexagon and
> > > https://github.com/ClangBuiltLinux/linux/issues/759 has been open for
> > > 2 years.
> > >
> > > Trying to build
> > > $ ARCH=hexagon CROSS_COMPILE=hexagon-linux-gnu make LLVM=1
> > LLVM_IAS=1
> > > -j71
> > >
> > > shows numerous issues, the latest of which commit 8320514c91bea
> > > ("hexagon: switch to ->regset_get()") has a very obvious typo which
> > > misspells the `struct` keyword and has been in the tree for almost 1
> > > year.
> >
> > Thank you for looking into it.
> >
> > > Why is arch/hexagon/ in the tree if no one can build it?
> >
> > Removing it sounds reasonable to me, it's been broken for too long, and we
> > did the same thing for unicore32 that was in the same situation where the
> > gcc port was too old to build the kernel and the clang port never quite work
> > in mainline.
> >
> > Guenter also brought up the issue a year ago, and nothing happened.
> > I see Brian still occasionally sends an Ack to a patch that gets merged through
> > another tree, but he has not send any patches or pull requests himself after
> > taking over maintainership from Richard Kuo in 2019, and the four hexagon
> > pull requests after 2014 only contained build fixes from developers that don't
> > have access to the hardware (Randy Dunlap, Viresh Kumar, Mike Frysinger
> > and me).
>
> Nick, Arnd,
>
> I can appreciate your frustration, I can see that I have let the community down here.  I would like to keep hexagon in-tree and I am committed to making the changes necessary to do so.

I'm very happy to hear that.

> I have a patch under internal review to address the cited build issues and libgcc/compiler-rt content.

We'd be first in line to help build test such a patch. Please consider
cc'ing myself and clang-built-linux@googlegroups.com when such a patch
is available externally.  Further, we have the CI ready and waiting to
add new architectures, even if it's just build testing. That would
have caught regressions like 8320514c91bea; we were down to 1 build
failure with https://github.com/ClangBuiltLinux/linux/issues/759 last
I looked which was preventing us from adding Hexagon to any CI, but we
must now dig ourselves out of a slightly deeper hole now.

Is this patch something you suspect will take quite some time to work
through internal review?

> In addition, my team has been focusing on developing QEMU system mode support that would mitigate some of the need for having hardware access.  We have landed support for userspace hexagon-linux in upstream QEMU.

That's also great to hear. QEMU is a critical part of our CI for boot
testing; if there's more info on timelines or what's involved with
booting a hexagon kernel in QEMU, we'd be very happy to know how or
when that's available.

> My team and I want to make hexagon's open source footprint larger, not smaller.  I realize that not being a good steward of the hexagon kernel has not helped, and we will do what we can to fix it.

A worthwhile and appreciated sentiment. I believe you.

Hexagon could be an interesting case for LLVM support in general for
the Linux kernel; a case where each target or driver need not
necessarily have a GCC backend to be acceptable.  But barring anyone
from being able to actually build it (let alone run it), it's not
that; it's less than that. It's dead code that bit rots further and
burdens maintainers who are maintaining something that's already
broken. I'm not sure who derives any benefit.

I think it's in everyone's best interest to see Linux support more
targets than fewer, and 2020 has been a hard year, but I'm curious how
long something has to be broken before folks say "enough." Please
let's support this properly or recognize the situation for what it is.
-- 
Thanks,
~Nick Desaulniers

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

* Re: ARCH=hexagon unsupported?
  2021-04-23 20:26           ` Brian Cain
  (?)
@ 2021-04-23 21:47           ` Randy Dunlap
  2021-04-23 22:25             ` Brian Cain
  -1 siblings, 1 reply; 15+ messages in thread
From: Randy Dunlap @ 2021-04-23 21:47 UTC (permalink / raw)
  To: bcain, 'Arnd Bergmann'
  Cc: 'Nick Desaulniers',
	'open list:QUALCOMM HEXAGON...',
	'clang-built-linux', 'linux-arch',
	'Guenter Roeck'

On 4/23/21 1:26 PM, Brian Cain wrote:
>> -----Original Message-----
>> From: bcain=codeaurora.org@codeaurora.org
> ... 
>> There is a hexagon cross toolchain used for testing QEMU (userspace) guest
>> code test cases.  This same toolchain can be used to build the kernel.  I will
>> share a reference to that toolchain, standby.
> 
> It's published as a container in the Gitlab Container Registry.  You can use docker/podman to pull "registry.gitlab.com/qemu-project/qemu/qemu/debian-hexagon-cross" in order to use it.

Hi Brian,

Maybe that will be useful to someone.

However, I am looking for something like a tarball that I can download
and deploy locally, like one can find at these locations:

https://toolchains.bootlin.com/
https://download.01.org/0day-ci/cross-package/
https://mirrors.edge.kernel.org/pub/tools/crosstool/


thanks.
-- 
~Randy


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

* RE: ARCH=hexagon unsupported?
  2021-04-23 21:47           ` Randy Dunlap
@ 2021-04-23 22:25             ` Brian Cain
  2021-04-23 22:26               ` Randy Dunlap
  0 siblings, 1 reply; 15+ messages in thread
From: Brian Cain @ 2021-04-23 22:25 UTC (permalink / raw)
  To: 'Randy Dunlap', 'Arnd Bergmann'
  Cc: 'Nick Desaulniers',
	'open list:QUALCOMM HEXAGON...',
	'clang-built-linux', 'linux-arch',
	'Guenter Roeck'

> -----Original Message-----
> From: Randy Dunlap <rdunlap@infradead.org>
...
> > It's published as a container in the Gitlab Container Registry.  You can use
> docker/podman to pull "registry.gitlab.com/qemu-
> project/qemu/qemu/debian-hexagon-cross" in order to use it.
> 
> Hi Brian,
> 
> Maybe that will be useful to someone.
> 
> However, I am looking for something like a tarball that I can download and
> deploy locally, like one can find at these locations:
> 
> https://toolchains.bootlin.com/
> https://download.01.org/0day-ci/cross-package/
> https://mirrors.edge.kernel.org/pub/tools/crosstool/

Randy,

	I 100% agree, I would prefer a tarball myself.  I have been working with the team to produce the tarball and we haven't been able to deliver that yet.  No good excuses here, only bad ones: somewhat tied up in process bureaucracy.

I can share the recipe that was used to build the toolchain in the container.  No Dockerfile required, just a shell script w/mostly cmake + make commands.  All of the sources are public, but musl is a downstream-public repo because we haven't landed the hexagon support in upstream musl yet.

-Brian


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

* Re: ARCH=hexagon unsupported?
  2021-04-23 22:25             ` Brian Cain
@ 2021-04-23 22:26               ` Randy Dunlap
  2021-05-19 15:28                 ` Brian Cain
  0 siblings, 1 reply; 15+ messages in thread
From: Randy Dunlap @ 2021-04-23 22:26 UTC (permalink / raw)
  To: bcain, 'Arnd Bergmann'
  Cc: 'Nick Desaulniers',
	'open list:QUALCOMM HEXAGON...',
	'clang-built-linux', 'linux-arch',
	'Guenter Roeck'

On 4/23/21 3:25 PM, Brian Cain wrote:
>> -----Original Message-----
>> From: Randy Dunlap <rdunlap@infradead.org>
> ...
>>> It's published as a container in the Gitlab Container Registry.  You can use
>> docker/podman to pull "registry.gitlab.com/qemu-
>> project/qemu/qemu/debian-hexagon-cross" in order to use it.
>>
>> Hi Brian,
>>
>> Maybe that will be useful to someone.
>>
>> However, I am looking for something like a tarball that I can download and
>> deploy locally, like one can find at these locations:
>>
>> https://toolchains.bootlin.com/
>> https://download.01.org/0day-ci/cross-package/
>> https://mirrors.edge.kernel.org/pub/tools/crosstool/
> 
> Randy,
> 
> 	I 100% agree, I would prefer a tarball myself.  I have been working with the team to produce the tarball and we haven't been able to deliver that yet.  No good excuses here, only bad ones: somewhat tied up in process bureaucracy.
> 
> I can share the recipe that was used to build the toolchain in the container.  No Dockerfile required, just a shell script w/mostly cmake + make commands.  All of the sources are public, but musl is a downstream-public repo because we haven't landed the hexagon support in upstream musl yet.

Hi Brian,
I can wait. :)

Thanks.


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

* RE: ARCH=hexagon unsupported?
  2021-04-23 21:40     ` Nick Desaulniers
@ 2021-04-26 13:13       ` Brian Cain
  0 siblings, 0 replies; 15+ messages in thread
From: Brian Cain @ 2021-04-26 13:13 UTC (permalink / raw)
  To: 'Nick Desaulniers'
  Cc: 'Arnd Bergmann', 'open list:QUALCOMM HEXAGON...',
	'clang-built-linux', 'linux-arch',
	'Guenter Roeck', 'Randy Dunlap',
	'Miguel Ojeda'

> -----Original Message-----
> From: Nick Desaulniers <ndesaulniers@google.com>
> Sent: Friday, April 23, 2021 4:40 PM
> To: Brian Cain <bcain@codeaurora.org>
> Cc: Arnd Bergmann <arnd@kernel.org>; open list:QUALCOMM HEXAGON...
> <linux-hexagon@vger.kernel.org>; clang-built-linux <clang-built-
> linux@googlegroups.com>; linux-arch <linux-arch@vger.kernel.org>; Guenter
> Roeck <linux@roeck-us.net>; Randy Dunlap <rdunlap@infradead.org>; Miguel
> Ojeda <miguel.ojeda.sandonis@gmail.com>
> Subject: Re: ARCH=hexagon unsupported?
> 
> On Fri, Apr 23, 2021 at 11:35 AM Brian Cain <bcain@codeaurora.org> wrote:
> >
> > > -----Original Message-----
> > > From: Arnd Bergmann <arnd@kernel.org>
> > > Sent: Friday, April 23, 2021 4:37 AM
> > > To: Nick Desaulniers <ndesaulniers@google.com>
> > > Cc: open list:QUALCOMM HEXAGON... <linux-hexagon@vger.kernel.org>;
> > > clang-built-linux <clang-built-linux@googlegroups.com>; Brian Cain
> > > <bcain@codeaurora.org>; linux-arch <linux-arch@vger.kernel.org>;
> > > Guenter Roeck <linux@roeck-us.net>
> > > Subject: Re: ARCH=hexagon unsupported?
> > >
> > > On Fri, Apr 23, 2021 at 12:12 AM 'Nick Desaulniers' via Clang Built
> > > Linux <clang-built-linux@googlegroups.com> wrote:
> > > >
> > > > Arnd,
> > > > No one can build ARCH=hexagon and
> > > > https://github.com/ClangBuiltLinux/linux/issues/759 has been open
> > > > for
> > > > 2 years.
> > > >
> > > > Trying to build
> > > > $ ARCH=hexagon CROSS_COMPILE=hexagon-linux-gnu make LLVM=1
> > > LLVM_IAS=1
> > > > -j71
> > > >
> > > > shows numerous issues, the latest of which commit 8320514c91bea
> > > > ("hexagon: switch to ->regset_get()") has a very obvious typo
> > > > which misspells the `struct` keyword and has been in the tree for
> > > > almost 1 year.
> > >
> > > Thank you for looking into it.
> > >
> > > > Why is arch/hexagon/ in the tree if no one can build it?
> > >
> > > Removing it sounds reasonable to me, it's been broken for too long,
> > > and we did the same thing for unicore32 that was in the same
> > > situation where the gcc port was too old to build the kernel and the
> > > clang port never quite work in mainline.
> > >
> > > Guenter also brought up the issue a year ago, and nothing happened.
> > > I see Brian still occasionally sends an Ack to a patch that gets
> > > merged through another tree, but he has not send any patches or pull
> > > requests himself after taking over maintainership from Richard Kuo
> > > in 2019, and the four hexagon pull requests after 2014 only
> > > contained build fixes from developers that don't have access to the
> > > hardware (Randy Dunlap, Viresh Kumar, Mike Frysinger and me).
> >
> > Nick, Arnd,
> >
> > I can appreciate your frustration, I can see that I have let the community
> down here.  I would like to keep hexagon in-tree and I am committed to
> making the changes necessary to do so.
> 
> I'm very happy to hear that.
> 
> > I have a patch under internal review to address the cited build issues and
> libgcc/compiler-rt content.
> 
> We'd be first in line to help build test such a patch. Please consider cc'ing
> myself and clang-built-linux@googlegroups.com when such a patch is
> available externally.  Further, we have the CI ready and waiting to add new
> architectures, even if it's just build testing. That would have caught
> regressions like 8320514c91bea; we were down to 1 build failure with
> https://github.com/ClangBuiltLinux/linux/issues/759 last I looked which was
> preventing us from adding Hexagon to any CI, but we must now dig ourselves
> out of a slightly deeper hole now.
> 
> Is this patch something you suspect will take quite some time to work through
> internal review?

I don't think it should take long, no.  I should have a better idea today of about how long it will take.  We will share it ASAP.

> > In addition, my team has been focusing on developing QEMU system mode
> support that would mitigate some of the need for having hardware access.
> We have landed support for userspace hexagon-linux in upstream QEMU.
> 
> That's also great to hear. QEMU is a critical part of our CI for boot testing; if
> there's more info on timelines or what's involved with booting a hexagon
> kernel in QEMU, we'd be very happy to know how or when that's available.
> 
> > My team and I want to make hexagon's open source footprint larger, not
> smaller.  I realize that not being a good steward of the hexagon kernel has not
> helped, and we will do what we can to fix it.
> 
> A worthwhile and appreciated sentiment. I believe you.
> 
> Hexagon could be an interesting case for LLVM support in general for the
> Linux kernel; a case where each target or driver need not necessarily have a
> GCC backend to be acceptable.  But barring anyone from being able to actually
> build it (let alone run it), it's not that; it's less than that. It's dead code that bit
> rots further and burdens maintainers who are maintaining something that's
> already broken. I'm not sure who derives any benefit.
> 
> I think it's in everyone's best interest to see Linux support more targets than
> fewer, and 2020 has been a hard year, but I'm curious how long something
> has to be broken before folks say "enough." Please let's support this properly
> or recognize the situation for what it is.

I don't think the special circumstances of 2020 are to blame, it's just my failure to give this work the priority it deserves.  Agreed: we will support the target properly.

-Brian


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

* RE: ARCH=hexagon unsupported?
  2021-04-23 22:26               ` Randy Dunlap
@ 2021-05-19 15:28                 ` Brian Cain
  0 siblings, 0 replies; 15+ messages in thread
From: Brian Cain @ 2021-05-19 15:28 UTC (permalink / raw)
  To: 'Randy Dunlap', 'Arnd Bergmann'
  Cc: 'Nick Desaulniers',
	'open list:QUALCOMM HEXAGON...',
	'clang-built-linux', 'linux-arch',
	'Guenter Roeck',
	Sid Manning

> -----Original Message-----
> From: Randy Dunlap <rdunlap@infradead.org>
...
> > Randy,
> >
> > 	I 100% agree, I would prefer a tarball myself.  I have been working with
> the team to produce the tarball and we haven't been able to deliver that yet.
> No good excuses here, only bad ones: somewhat tied up in process
> bureaucracy.
> >
> > I can share the recipe that was used to build the toolchain in the container.
> No Dockerfile required, just a shell script w/mostly cmake + make commands.
> All of the sources are public, but musl is a downstream-public repo because we
> haven't landed the hexagon support in upstream musl yet.
> 
> Hi Brian,
> I can wait. :)

Randy, thanks for your patience.  We don't quite have all the kinks worked out for a release process but I have worked with the Linaro team to produce a clang-based cross toolchain and we can share a link:

https://codelinaro.jfrog.io/artifactory/codelinaro-qemu/2021-05-12/clang+llvm-12.0.0-cross-hexagon-unknown-linux-musl.tar.xz

Contents:
- clang+llvm+lld+libunwind+libcxx+libcxxabi built from `llvmorg-12.0.0` release
- `qemu-hexagon` binary (scalar core only!) built from upstream github.com/qemu/qemu repo `15106f7dc3290ff3254611f265849a314a93eb0e`
- headers from linux kernel 5.6.18
- C library built from github.com/quic/musl commit aff74b395fbf59cd7e93b3691905aa1af6c0778c
- unabridged build details in https://github.com/quic/qemu/tree/d26f3843c794d9d9b17b637550dc3b5a2bacd837/quic/container

Once we're able to produce releases on a more regular basis we should be able to share a hexagon-linux-user QEMU that can do scalar+vector.  And some time after that a sysemu-capable qemu.

Our process for this first run did not include a signature for the build tarball, and that is regrettable.  It will be included next time around.  I have produced the sha256 signature below (post hoc) of the tarball that I tested:

	55c51e8289cc21e6779cfc3b18bb9ad02632fc52d3c3a91bf6fdb4c8f578c84c  clang+llvm-12.0.0-cross-hexagon-unknown-linux-musl.tar.xz

-Brian


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

end of thread, other threads:[~2021-05-19 15:28 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-22 22:12 ARCH=hexagon unsupported? Nick Desaulniers
2021-04-23  9:36 ` Arnd Bergmann
2021-04-23 17:43   ` Randy Dunlap
2021-04-23 18:17     ` Arnd Bergmann
2021-04-23 18:26       ` Miguel Ojeda
2021-04-23 19:31       ` Brian Cain
2021-04-23 20:26         ` Brian Cain
2021-04-23 20:26           ` Brian Cain
2021-04-23 21:47           ` Randy Dunlap
2021-04-23 22:25             ` Brian Cain
2021-04-23 22:26               ` Randy Dunlap
2021-05-19 15:28                 ` Brian Cain
2021-04-23 18:35   ` Brian Cain
2021-04-23 21:40     ` Nick Desaulniers
2021-04-26 13:13       ` Brian Cain

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.