On Sun, 21 Aug 2011, John Rigby wrote: > I'm having trouble building the Thumb2 kernel on, I actually believe > this same code worked some time ago before a toolchain update. There > are actually two problems described below. I get past the first with > a config change but don't know how to fix the second one. > [...] > AS arch/arm/boot/compressed/head.o > arch/arm/boot/compressed/head.S: Assembler messages: > arch/arm/boot/compressed/head.S:127: Error: selected processor does > not support requested special purpose register -- `mrs r2,cpsr' > arch/arm/boot/compressed/head.S:134: Error: selected processor does > not support requested special purpose register -- `mrs r2,cpsr' > arch/arm/boot/compressed/head.S:136: Error: selected processor does > not support requested special purpose register -- `msr cpsr_c,r2' > make[2]: *** [arch/arm/boot/compressed/head.o] Error 1 > make[1]: *** [arch/arm/boot/compressed/vmlinux] Error 2 > make: *** [uImage] Error 2 > > Here is my gcc version: > > $ arm-linux-gnueabi-gcc --version > arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.6.1-5ubuntu2~ppa1) 4.6.1 > Copyright (C) 2011 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > And as version: > GNU assembler (GNU Binutils for Ubuntu) 2.21.52.20110707 > Copyright 2011 Free Software Foundation, Inc. > This program is free software; you may redistribute it under the terms of > the GNU General Public License version 3 or later. > This program has absolutely no warranty. > This assembler was configured for a target of `arm-linux-gnueabi'.
Looks to me like your assembler is broken, or gcc is not properly telling it about the actual architecture in use. To confirm, please try this: echo -e ".arch armv7-a\n.thumb\nmrs r2, cpsr" | \ arm-linux-gnueabi-as - -o /dev/null If that works then your assembler is fine. In that case the following should fail: echo -e ".thumb\nmrs r2, cpsr" | \ arm-linux-gnueabi-gcc -march=armv7-a -x assembler -o /dev/null -c - If for some reasons this works too, then the kernel build might be wrong. In that case, see the output of: make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- V=1 \ arch/arm/boot/compressed/head.o I have: arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.5.2-8ubuntu3) 4.5.2 GNU assembler (GNU Binutils for Ubuntu) 2.21.0.20110327 And that works for me just fine. Nicolas _______________________________________________ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev