[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: <building_local> ICECC[22178] 15:25:46: </building_local: 3ms> CHK include/linux/version.h make[1]: »include/asm-arm/mach-types.h« ist bereits aktualisiert. CHK include/linux/utsrelease.h CC arch/arm/kernel/asm-offsets.s ICECC[22255] 15:25:47: native /var/cache/icecream/native/957f0fa42db6b790e7360d4150fd7305.tar.gz ICECC[22255] 15:25:47: env: x86_64 '/var/cache/icecream/native/957f0fa42db6b790e7360d4150fd7305.tar.gz' ICECC[22255] 15:25:47: arch/arm/kernel/asm-offsets.c compiled 1 times on x86_64 ICECC[22255] 15:25:47: Have to use host 192.168.1.2:10245 - Job ID: 90 - environment: x86_64 got environment: true ICECC[22255] 15:25:47: <create CS channel> ICECC[22255] 15:25:47: </create CS channel: 7ms> ICECC[22255] 15:25:47: <send compile_file> ICECC[22255] 15:25:47: </send compile_file: 0ms> ICECC[22255] 15:25:47: <write_server_cpp from cpp> 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 ICECC[22255] 15:25:47: </write_server_cpp from cpp: 2ms> ICECC[22255] 15:25:47: <wait for cpp> ICECC[22255] 15:25:47: </wait for cpp: 0ms> make[1]: *** [arch/arm/kernel/asm-offsets.s] Fehler 1 make: *** [prepare0] Fehler 2 --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org
participants (1)
-
Jörg Hermsdorf