All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: John Morris <john@zultron.com>, xenomai@xenomai.org
Subject: Re: [Xenomai] Cross-compiling for ARM
Date: Sun, 18 May 2014 23:04:38 +0200	[thread overview]
Message-ID: <53792066.5050909@xenomai.org> (raw)
In-Reply-To: <537919DE.50303@zultron.com>

On 05/18/2014 10:36 PM, John Morris wrote:
> My Debian kernel packages are just updated to Xenomai 2.6.3 and Linux 
> 3.8.13 (will ask for testing soon), and I'm starting to look at adding 
> armhf packages using Robert C Nelson's and Charles Steinkuehler's patch 
> sets.  However, I'm brand-new at cross-compiling and would appreciate a 
> pointer.
> 
> Right out of the box, pbuilder can build in a QEMU-emulated chroot by 
> setting --arch=armhf and --debootstrap=qemu-debootstrap.  Super easy. 
> Super slow.
> 
> Is there a way to cross-compile in an x86 native environment so that the 
> (x86 native) compiler/assembler/linker/etc. cross-build for ARM 
> architecture?

You need to install a cross compilation toolchain. You can find 
pre-built ones, for instance for armhf, you can use the linaro 
toolchain. Cross-compilation toolchain programs names begin with a 
string identifying the target architecture. For instance, linaro 
toolchain compiler is arm-linux-gnueabihf-gcc. In order to cross-
compile a kernel for this architecture, you whould use

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-

For the user-space part you need to pass the prefix without the final 
dash to configure's --host option. As in:
./configure --host=arm-linux-gnueabihf

The installation procedure is described in README.INSTALL, see for
instance:
http://www.xenomai.org/documentation/xenomai-2.6/html/README.INSTALL/#arm


-- 
                                                                Gilles.


  reply	other threads:[~2014-05-18 21:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-18 20:36 [Xenomai] Cross-compiling for ARM John Morris
2014-05-18 21:04 ` Gilles Chanteperdrix [this message]
2014-05-19 16:03   ` Charles Steinkuehler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53792066.5050909@xenomai.org \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=john@zultron.com \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.