Cross-compiling for ARM
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?
John
Quoted 6 lines · John Morris
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.
Quoted 7 lines
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
Signature · 1 line
Gilles.
Quoted 11 lines · Gilles Chanteperdrix
Quoted 10 lines · John Morris
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.
Quoted 7 lines
Quoted 3 lines
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.
The RCN kernel build scripts (so my scripts as well) will download a known working linaro cross-compiler if you run on an x86 machine and don't point the build scripts to a pre-installed tool chain.
Review the scripts/gcc.sh shell script if you need hints on getting the cross-compiler up and running, but it's pretty straight-forward.
Signature · 10 lines
Charles Steinkuehler [email protected] -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 261 bytes Desc: OpenPGP digital signature URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20140519/9b40e5ae/attachment.sig>