< Architectures | ARM(Difference between revisions)
|
|
| Line 1: |
Line 1: |
| − | {{lang|en|zh-cn|page=Architectures/ARM/CrossToolchain}} | + | {{delete}} |
| − | = Fedora/ARM cross toolchain =
| + | |
| − | | + | |
| − | The F12 ARM initiative created ARM cross toolchain packages for i386 and x86_64 that are built from the same sources as the Fedora native toolchain packages (binutils, gcc, gdb, glibc.) Right now these are gcc-4.1 vintage.
| + | |
| − | | + | |
| − | To install this toolchain on your Fedora machine, do:
| + | |
| − | <pre>
| + | |
| − | # cd /etc/yum.repos.d/
| + | |
| − | # wget http://ftp.linux.org.uk/pub/linux/arm/fedora/cross/cross.repo
| + | |
| − | # yum install armv5tel-redhat-linux-gnueabi-gcc
| + | |
| − | </pre>
| + | |
| − | | + | |
| − | This will install everything necessary to run the C compiler and cross-build ARM libraries and binaries that are entirely binary compatible with the native Fedora/ARM libraries and binaries.
| + | |
| − | | + | |
| − | You can find source packages for these if you are interested [http://ftp.linux.org.uk/pub/linux/arm/fedora/cross/latest/source/ here].
| + | |
| − | | + | |
| − | | + | |
| − | == Cross-compiling ARM userland binaries ==
| + | |
| − | | + | |
| − | To cross-compile the canonical Hello World example for ARM, do:
| + | |
| − | <pre>
| + | |
| − | $ armv5tel-redhat-linux-gnueabi-gcc -Wall -o hello hello.c
| + | |
| − | $
| + | |
| − | </pre>
| + | |
| − | | + | |
| − | == Cross-compiling ARM kernels ==
| + | |
| − | | + | |
| − | You can also use the cross-toolchain to cross-build an ARM Linux kernel, by changing these two lines in the top-level Makefile:
| + | |
| − | <pre>
| + | |
| − | ARCH ?= $(SUBARCH)
| + | |
| − | CROSS_COMPILE ?=
| + | |
| − | </pre>
| + | |
| − | to:
| + | |
| − | <pre>
| + | |
| − | ARCH ?= arm
| + | |
| − | CROSS_COMPILE ?= armv5tel-redhat-linux-gnueabi-
| + | |
| − | </pre>
| + | |
| − | and then building your kernel as usual.
| + | |
Latest revision as of 11:47, 23 May 2012
It has been requested that this page be deleted.