RTEMS ARMv8 Query

Raghav Nayak raghav.nayak at nxp.com
Mon Feb 29 15:42:29 UTC 2016


Hi Joel,

Have you tried building RTEMS with ARMv8 Toolchain?
If yes , have you done any changes in RTEMS to get it enabled?

With Regards
  Raghav

From: Joel Sherrill [mailto:joel at rtems.org]
Sent: Friday, February 26, 2016 2:24 AM
To: Chris Johns
Cc: Raghav Nayak; users at rtems.org
Subject: Re: RTEMS ARMv8 Query

I posted patches to add the aarch64-rtems target.

binutils: https://sourceware.org/ml/binutils/2016-02/msg00404.html
gcc:      https://gcc.gnu.org/ml/gcc-patches/2016-02/msg01754.html

FWIW I also cleaned up the x86_64-rtems target addition patches and
those were submitted also.

BINUTILS: https://sourceware.org/ml/binutils/2016-02/msg00403.html
GCC: https://gcc.gnu.org/ml/gcc-patches/2016-02/msg01752.html

Chris.. Assuming these are in the upstream repositories in the next
couple of days, how should we address getting these targets in the RSB? Tarball
plus patch or just reference git until the next release?

--joel

On Thu, Feb 25, 2016 at 1:34 PM, Joel Sherrill <joel at rtems.org<mailto:joel at rtems.org>> wrote:


On Wed, Feb 24, 2016 at 10:03 PM, Chris Johns <chrisj at rtems.org<mailto:chrisj at rtems.org>> wrote:
On 25/02/2016 14:29, Raghav Nayak wrote:

I am using RSB 4.12 it picks “gcc-6-20160124” which is already
supporting aarch64. Do you see still I have to try building gcc by hand?

Till now couldn’t understand the meaning of this error

"configure: error: GAS does not know what format to use for target
aarch64-unknown-rtems4.12"

You need to teach each component in the build set of tools about the aarch64 arch. It is best to do this by hand and once you have the patches we can come back to the RSB. To quote the second paragraph of the RSB manual (https://docs.rtems.org/rsb/):

 "The RTEMS Source Builder attempts to support any
  host environment that runs Python and you can build
  the package on. It is not some sort of magic that can
  take any piece of source code and make it build. Someone
  at some point in time has figured out how to build that
  package from source and taught this tool."

The parts you need to change are binutils, newlib (I think) and gcc.

For binutils I did:

 $ tar jxf binutils-2.26.tar.bz2
 $ mkdir aarch64
 $ cd aarch64
 $ ../binutils-2.26/configure --target=aarch64-rtems4.12
 $ make

and I got this error:

*** BFD does not support target aarch64-unknown-rtems4.12.
*** Look in bfd/config.bfd for supported targets.
*** Error code 1

Once binutils builds create a patch. You will also need a patch for the git version of binutils which you can post to the binutils list (you may need to submit FSF paper work for this).
I am picking at this now. I have a patch for binutils/gdb git and am working on gcc.
Since you have to have FSF paperwork on file to submit the changes, it is simpler
for an existing contributor to do it. But I am building by hand to get the modifications
ready to be submitted upstream.

Also after some email with the ARM GCC maintainer, I have learned that we haven't
asked enough questions. ARMv8 support can mean two things:

+ new instruction variations in 32-bit mode (arm toolchain with new library variants)
+ 64-bit mode (aarch64 toolchain)

I am assuming you are more interested in the latter.

The aarch64 binutils tools will allow you to build gcc. The RSB builds gcc using a single source tree so when you are ready I can help you create a suitable source tree by hand. You can then start the process of teaching gcc's ARMv8 support about RTEMS.

Once you have the patches posted to the various upstream projects, eg binutils, newlib and gcc, we can accept patches for the specific versions of binutils and gcc the RSB supports for 4.12. We currently place these in the RTEMS Tools repo (https://git.rtems.org/rtems-tools/tree/tools/4.12). We can then create a suitable bset config file with the source packages and patches to build an AArch64 set of tools.
The newlib master is broken at the moment so I can't build gcc/newlib. Once that is resolved,
I hope things will work and I can post patches.

Many thanks for doing this.
It would be nice to have the aarch64 supported.

-joel

Chris


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20160229/6c0a40e1/attachment-0002.html>


More information about the users mailing list