Error while compiling Roberts Kernel: Compressing ...

Hi,

while copmiling a recent version of Robert Nelsons kernel, I got an
error message, from which I dont know where it comes from:

    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: *** [zImage] Error 2
    make: *** Waiting for unfinished jobs....
    CC arch/arm/oprofile/oprofile.mod.o
    CC crypto/arc4.mod.o
    CC crypto/aes_generic.mod.o
    CC crypto/async_tx/async_memcpy.mod.o
    CC crypto/async_tx/async_pq.mod.o
    CC crypto/async_tx/async_raid6_recov.mod.o
    CC crypto/async_tx/async_tx.mod.o
    CC crypto/authenc.mod.o
    CC crypto/authencesn.mod.o
    CC crypto/cbc.mod.o
    CC crypto/async_tx/async_xor.mod.o
    CC crypto/des_generic.mod.o
    CC crypto/ecb.mod.o
    CC crypto/hmac.mod.o
    CC crypto/md4.mod.o
    ...

(Previously there was no such problem with the same toolchain. I an
using 'crossdev' from GENTOO Linux, on which I had compiled this and
all previous kernels.)

How can I prevent this?

Thank you very much in advance for any help!

Best regards
mcc

Well, without knowing which git repo and which git branch/tag your
building i can't help..

Also, did you change the config? "git diff patches/defconfig"

Regards,

Robert Nelson <robertcnelson@gmail.com> [12-11-25 15:56]:

> Hi,
>
> while copmiling a recent version of Robert Nelsons kernel, I got an
> error message, from which I dont know where it comes from:
>
> 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: *** [zImage] Error 2
> make: *** Waiting for unfinished jobs....
> CC arch/arm/oprofile/oprofile.mod.o
> CC crypto/arc4.mod.o
> CC crypto/aes_generic.mod.o
> CC crypto/async_tx/async_memcpy.mod.o
> CC crypto/async_tx/async_pq.mod.o
> CC crypto/async_tx/async_raid6_recov.mod.o
> CC crypto/async_tx/async_tx.mod.o
> CC crypto/authenc.mod.o
> CC crypto/authencesn.mod.o
> CC crypto/cbc.mod.o
> CC crypto/async_tx/async_xor.mod.o
> CC crypto/des_generic.mod.o
> CC crypto/ecb.mod.o
> CC crypto/hmac.mod.o
> CC crypto/md4.mod.o
> ...
>
> (Previously there was no such problem with the same toolchain. I an
> using 'crossdev' from GENTOO Linux, on which I had compiled this and
> all previous kernels.)
>
> How can I prevent this?
>
> Thank you very much in advance for any help!

Well, without knowing which git repo and which git branch/tag your
building i can't help..

Also, did you change the config? "git diff patches/defconfig"

Regards,

--
Robert Nelson
http://www.rcn-ee.com/

--

Hello Robert,

thanks for your reply!

To circumvent possible influences of my modifications of config I did
now the following:
mv KERNEL KERNEL.mcc
./build_kernel.sh

This also ends with an error:

  LD drivers/video/built-in.o
  LD drivers/usb/built-in.o
  LD drivers/built-in.o
make: *** wait: No child processes. Stop.
[1] 26526 exit 2 ./build_kernel.sh

From the complete compilation process I made a logfile,
which I can sent you, if you want it.

The previously error has gone, nonetheless I would like to know
what has triggered it.

The kernel I made is for the Beaglebone.

'git branch' in the linux-dev directory gave me:
* am33x-v3.2
  master

These are the URLS, git is accessing:
url = GitHub - RobertCNelson/linux-dev
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git

Best regards,
mcc

Hello Robert,

thanks for your reply!

To circumvent possible influences of my modifications of config I did
now the following:
mv KERNEL KERNEL.mcc

./build_kernel.sh

That still doesn't matter.. "./build_kernel.sh" will still use
"patches/defconfig".. so what did you change in "patches/defconfig"??

This also ends with an error:

  LD drivers/video/built-in.o
  LD drivers/usb/built-in.o
  LD drivers/built-in.o
make: *** wait: No child processes. Stop.
[1] 26526 exit 2 ./build_kernel.sh

From the complete compilation process I made a logfile,
which I can sent you, if you want it.

The previously error has gone, nonetheless I would like to know
what has triggered it.

The kernel I made is for the Beaglebone.

'git branch' in the linux-dev directory gave me:
* am33x-v3.2
  master

So, if you actually didn't modify the stock config, i'm blaming your
gcc cross compiler...

Regards,

Robert Nelson <robertcnelson@gmail.com> [12-11-25 16:52]:

> Hello Robert,
>
> thanks for your reply!
>
> To circumvent possible influences of my modifications of config I did
> now the following:
> mv KERNEL KERNEL.mcc
>
> ./build_kernel.sh

That still doesn't matter.. "./build_kernel.sh" will still use
"patches/defconfig".. so what did you change in "patches/defconfig"??

> This also ends with an error:
>
> LD drivers/video/built-in.o
> LD drivers/usb/built-in.o
> LD drivers/built-in.o
> make: *** wait: No child processes. Stop.
> [1] 26526 exit 2 ./build_kernel.sh
>
> From the complete compilation process I made a logfile,
> which I can sent you, if you want it.
>
> The previously error has gone, nonetheless I would like to know
> what has triggered it.
>
> The kernel I made is for the Beaglebone.
>
> 'git branch' in the linux-dev directory gave me:
> * am33x-v3.2
> master

So, if you actually didn't modify the stock config, i'm blaming your
gcc cross compiler...

Regards,

--
Robert Nelson
http://www.rcn-ee.com/

--

The problem is a bug in the gcc and can be fixed by changing in
one of the Makefiles of the kernel.

From
http://lists.linaro.org/pipermail/linaro-dev/2011-August/006752.html

cite:
http://sourceware.org/bugzilla/show_bug.cgi?id=12698

cite:
I have a workaround now by setting in -march=armv7-a in
arch/arm/boot/compressed/Makefile instead of -march=all.

This fixes the problem at least for me (usign:
solfire:/home/mccramer>armv7a-softfp-linux-gnueabi-gcc --version
armv7a-softfp-linux-gnueabi-gcc (Gentoo 4.5.4 p1.0, pie-0.4.7) 4.5.4
Copyright (C) 2010 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.)

Best regards,
mcc