[opensuse-programming] Cross Compiling for ARM with openSUSE 10.2
Hi all,
I tried to compile a linux kernel for my Palm Tungsten T with openSUSE 10.2
this weekend, but I didn't succeed.
At first I fetched the kernel trunk from Montavista, they also provide
a 'palmtt_defconfig' file to configure the kernel (2.6.20 I think) for the
Tungsten T.
Next I used Yast to search for and install the packages required to build the
kernel for the ARM architecture. Well, I realized, that openSUSE 10.2 just
ships a binutils package (cross-arm-binutils.rpm) for arm, but no
corresponding cross-compiler. I wonder if the cross-arm-binutils package is
of any use without a corresponding cross-compiler? Anyway, I did not want to
compile and setup my own toolchain and hoped, that openSUSE ships a toolchain
out of the box. While searching for this, I recongnized icecream and the fact
that openSUSE 10.2 also ships the cross-arm-gcc-icecream-backend package. It
seems like this was what I wanted. I examined the archive that was placed
in /usr/share/icecream-envs/cross-arm-gcc-icecream-backend_x86_64.tar.gz and
it seems like it holds the complete gcc toolchain to compile software for
arm.
After I installed an configured icecream, I configured the Montavista kernel:
# cd ~/Documents/linux-omap/
# make CC=icecc palmtt_defconfig
I checked the generated Makefile for ARCH and CROSS_COMPILE variables and they
seem to be set correctly:
...
SUBARCH := arm
...
ARCH ?= $(SUBARCH)
CROSS_COMPILE ?= arm-linux-
...
Next I set ICECC_VERSION to the arm toolchain envrionment:
# export
ICECC_VERSION=/usr/share/icecream-envs/cross-arm-gcc-icecream-backend_x86_64.tar.gz
Then I started to compile the kernel using:
# make CC=icecc zImage
But I get the following output:
...
cc1: error: unrecognized command line option "-mlittle-endian"
cc1: error: unrecognized command line option "-mapcs"
cc1: error: unrecognized command line option "-mno-sched-prolog"
cc1: error: unrecognized command line option "-mabi=apcs-gnu"
arch/arm/kernel/asm-offsets.c:0: error: bad value (armv4t) for -march= switch
arch/arm/kernel/asm-offsets.c:0: error: bad value (arm9tdmi) for -mtune=
switch
...
make[1]: *** [arch/arm/kernel/asm-offsets.s] Fehler 1
make: *** [prepare0] Fehler 2
Well, it seems like icecream takes the wrong cross-compiler (cc1). So how do I
tell icecream that it should take the cc1 provided by
the 'cross-arm-gcc-icecream-backend_x86_64.tar.gz' archive to compile the
kernel? Setting it via the envrionment variable ICECC_VERSION does not work.
Kind regards,
Jörg.
------------------------------------------
Here's the full debug output of icecc:
# make CC=icecc zImage
ICECC[22178] 15:25:46:
participants (1)
-
Jörg Hermsdorf