Wednesday, May 8, 2013

Error: selected processor does not support ARM mode smc #0

When compiling kernel for SGH-I717, an error occurs:
Error: selected processor does not support ARM mode smc #0

It happens when
CC   arch/arm/mach-msm/scm.o

So following the post http://blog.csdn.net/gchww/article/details/7571584 and http://wakefang.blogspot.com/2011/08/error-selected-processor-does-not.html,

open scm.c (since this is the file where the compilation error occurs, as shown in the error message above. You should replace it with the appropriate file in you case, of course) and search for "asm", add the following line

asm(".arch_extension sec\n\t");

before every asm instruction.
Re-compile, it works.

P.S. if same error occurs again for another file, do the same operation for that file.

8 comments:

  1. thank you to point this out, i didnt learn c but this help me compile my a820 kernel

    ReplyDelete
    Replies
    1. I'm glad this helps!

      btw. you are the first one who comment on my blog
      Thank you Phuong!

      Delete
  2. Hey man, that did work for me too, thanks a lot

    ReplyDelete
  3. Hi, I'm trying to compile an omap kernel for the maguro and I get the next error

    xx@xp:~/kitchen/jellybean/device/samsung/tuna/omap$ make
    CHK include/linux/version.h
    CHK include/generated/utsrelease.h
    make[1]: `include/generated/mach-types.h' is up to date.
    CALL scripts/checksyscalls.sh
    CHK include/generated/compile.h
    AS arch/arm/mm/proc-v7.o
    arch/arm/mm/proc-v7.S: Assembler messages:
    arch/arm/mm/proc-v7.S:387: Error: selected processor does not support ARM mode `smc #0'
    make[1]: *** [arch/arm/mm/proc-v7.o] Error 1
    make: *** [arch/arm/mm] Error 2


    Could you give me some hints about how to solve it?

    I got the kernel from here

    https://android.googlesource.com/kernel/omap.git/+/android-omap-tuna-3.0-jb-mr1.1

    and after applying two patches it stopped working.

    ReplyDelete
    Replies
    1. did you follow the instructions in this post?

      Delete
    2. I think the file you need to fix is: arch/arm/mm/proc-v7.c
      then find the asm and do as Ning Ding said
      I dont know why we often face with this problem while conpile kernels at the first time

      Delete
  4. Either follow the instructions or move back to linaro 4.6 , the blog is accurate of what needs to happen.

    ReplyDelete