0

I cloned the kernel from

 https://github.com/torvalds/linux.git

Then tried to compile it as follows

#make menuconfig 

menu config screens shows up. Without making any changes I save the config that generated .config file

#make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-

I get the following error. Please advise

In file included from arch/arm/kernel/asm-offsets.c:20:0:
/home/androiddev/linus/linux/arch/arm/include/asm/glue-df.h:107:2: error: #error Unknown data abort handler type
 #error Unknown data abort handler type
  ^
In file included from arch/arm/kernel/asm-offsets.c:21:0:
/home/androiddev/linus/linux/arch/arm/include/asm/glue-pf.h:54:2: error: #error Unknown prefetch abort handler type
 #error Unknown prefetch abort handler type
  ^
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2
codey modey
  • 983
  • 2
  • 10
  • 23

2 Answers2

1

If you do

make menuconfig

then configuration is read for x86 not for ARM. First you need to take default configuartion look @ this

Are kernel headers depend on processor type, vendor etc?

also

hv look @ Just black screen after running Qemu

if you dont know the configuration you can get copy of .config from target rootfs /proc/config.gz

Cross Compiling Linux Arm Kernel with new driver module

Community
  • 1
  • 1
vinay hunachyal
  • 3,781
  • 2
  • 20
  • 31
  • How to build rootfs..could you please look into this..http://stackoverflow.com/questions/22286364/error-while-building-rootfs-for-linux-kernel – codey modey Mar 09 '14 at 18:52
  • I also the method given here, but it didn't work..http://www.linuxforu.com/2011/06/qemu-for-embedded-systems-development-part-1/ – codey modey Mar 09 '14 at 19:28
  • is .dts file for $make ARCH=arm versatile_defconfig located in .../config/versatile_defconfig.dts. I need to include another .dtsi file in it, how should I confirm that it is included #include ? – codey modey Mar 16 '14 at 02:48
1

For some reason ARCH is not a part of the saved configuration. As soon as you run any make command without the ARCH=arm it defaults back to PC architecture. Compiling a kernel configured for Intel with an arm compiler leads to problems.

I usually commit my own local ARCH=arm in the kernel top level makefile to avoid exactly this problem but I really don't understand why it is not a part of the saved configuration it would save a lot of headaches for people working on non-intel based architectures...

slobobaby
  • 696
  • 7
  • 10
  • To keep Top level Makefile generic – vinay hunachyal Mar 09 '14 at 10:21
  • That makes no sense. ARCH could become a configuration parameter like any other and be saved in .config with every other configuration parameter. The only argument could be that the same configuration could be used unchanged on different architectures but since ARCH influences what is possible to configure I don't this can ever work. – slobobaby Mar 09 '14 at 11:35
  • have look @ this http://stackoverflow.com/questions/20763344/just-black-screen-after-running-qemu/20971037#20971037 – vinay hunachyal Mar 09 '14 at 11:52
  • Some people build several targets from one source directory. See the option `O=xxx`; where source and build are in different directories. For people who integrate *sub-systems*, this is very valuable as you do not have to synchronize dozens of trees. Say someone developing the 'mm' sub-system must test that it compiles on all architectures. That said, this is not a bad suggestion for some people; no solution will fit everyone. Another solution is to wrap the command in a script. – artless noise Mar 10 '14 at 16:40