Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

i try to compiler android kernel source code for samsung note 2 my host is ubuntu 13.04 and i use toolchains 4.8 i choice a defconfig from arch/arm/configs when i compile the kernel using

 make -j4 ARCH=arm CROSS_COMPILE=/home/naimk/lab/ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-

i get this error:

linux-androideabi-
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
  CC      arch/arm/kernel/asm-offsets.s
In file included from arch/arm/kernel/asm-offsets.c:16:0:
/home/naimk/lab/note2/kernel/arch/arm/include/asm/cacheflush.h:19:22: fatal error: mach/smc.h: No such file or directory
 #include <mach/smc.h>
                      ^
compilation terminated.
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2

and for other kernel source like samsung ace GT-S5830i

i get this error :

 HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf -s arch/arm/Kconfig
  CHK     include/linux/version.h
  UPD     include/linux/version.h
  CHK     include/generated/utsrelease.h
  UPD     include/generated/utsrelease.h
  HOSTCC  scripts/genksyms/genksyms.o
  SHIPPED scripts/genksyms/lex.c
  CC      scripts/mod/empty.o
  HOSTCC  scripts/selinux/genheaders/genheaders
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/mod/mk_elfconfig
  MKELF   scripts/mod/elfconfig.h
  HOSTCC  scripts/mod/file2alias.o
  HOSTCC  scripts/selinux/mdp/mdp
  HOSTCC  scripts/mod/modpost.o
  SHIPPED scripts/genksyms/parse.h
  SHIPPED scripts/genksyms/keywords.c
  SHIPPED scripts/genksyms/parse.c
  HOSTCC  scripts/genksyms/lex.o
  HOSTCC  scripts/conmakehash
  Generating include/generated/mach-types.h
  CC      kernel/bounds.s
  GEN     include/generated/bounds.h
  CC      arch/arm/kernel/asm-offsets.s
  HOSTCC  scripts/mod/sumversion.o
  HOSTCC  scripts/genksyms/parse.o
  GEN     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  HOSTLD  scripts/genksyms/genksyms
  HOSTLD  scripts/mod/modpost
  CHK     include/generated/compile.h
  CC      init/do_mounts.o
  CC      init/main.o
  UPD     include/generated/compile.h
  CC      init/do_mounts_rd.o
  HOSTCC  usr/gen_init_cpio
In file included from include/linux/nfs_fs.h:41:0,
                 from init/do_mounts.c:20:
include/linux/pagemap.h: In function 'fault_in_pages_readable':
include/linux/pagemap.h:415:16: warning: variable 'c' set but not used [-Wunused-but-set-variable]
  volatile char c;
                ^
In file included from include/linux/blkdev.h:12:0,
                 from init/do_mounts.h:2,
                 from init/do_mounts_rd.c:12:
include/linux/pagemap.h: In function 'fault_in_pages_readable':
include/linux/pagemap.h:415:16: warning: variable 'c' set but not used [-Wunused-but-set-variable]
  volatile char c;
                ^
In file included from include/linux/mempolicy.h:70:0,
                 from init/main.c:51:
include/linux/pagemap.h: In function 'fault_in_pages_readable':
include/linux/pagemap.h:415:16: warning: variable 'c' set but not used [-Wunused-but-set-variable]
  volatile char c;
                ^
  GEN     usr/initramfs_data.cpio
  AS      usr/initramfs_data.o
  LD      usr/built-in.o
  CC      init/do_mounts_initrd.o
  CC      arch/arm/kernel/compat.o
  CC      init/do_mounts_md.o
In file included from include/linux/blkdev.h:12:0,
                 from init/do_mounts.h:2,
                 from init/do_mounts_initrd.c:11:
include/linux/pagemap.h: In function 'fault_in_pages_readable':
include/linux/pagemap.h:415:16: warning: variable 'c' set but not used [-Wunused-but-set-variable]
  volatile char c;
                ^
  CC      init/initramfs.o
In file included from include/linux/blkdev.h:12:0,
                 from init/do_mounts.h:2,
                 from init/do_mounts_md.c:5:
include/linux/pagemap.h: In function 'fault_in_pages_readable':
include/linux/pagemap.h:415:16: warning: variable 'c' set but not used [-Wunused-but-set-variable]
  volatile char c;
                ^
  CC      init/calibrate.o
  CC      arch/arm/kernel/elf.o
  AS      arch/arm/kernel/entry-armv.o
  AS      arch/arm/kernel/entry-common.o
  CC      arch/arm/kernel/irq.o
  CC      arch/arm/mm/dma-mapping.o
  CC      arch/arm/mm/extable.o
  CC      arch/arm/kernel/process.o
  CC      arch/arm/kernel/ptrace.o
arch/arm/mm/dma-mapping.c: In function '__dma_alloc':
arch/arm/mm/dma-mapping.c:215:25: warning: array subscript is above array bounds [-Warray-bounds]
     pte = consistent_pte[++idx];
                         ^
  CC      init/version.o
arch/arm/mm/dma-mapping.c: In function 'dma_free_coherent':
arch/arm/mm/dma-mapping.c:259:25: warning: array subscript is above array bounds [-Warray-bounds]
    ptep = consistent_pte[++idx];
                         ^
  LD      init/mounts.o
  LD      init/built-in.o
  CC      arch/arm/mm/fault.o
  CC      arch/arm/kernel/return_address.o
  CC      arch/arm/mm/init.o
  CC      arch/arm/kernel/setup.o
  CC      arch/arm/kernel/signal.o
  CC      arch/arm/common/vic.o
arch/arm/kernel/signal.c: In function 'restore_sigframe':
arch/arm/kernel/signal.c:278:30: warning: variable 'aux' set but not used [-Wunused-but-set-variable]
  struct aux_sigframe __user *aux;
                              ^
  CC      arch/arm/common/icst.o
  CC      arch/arm/common/clkdev.o
  CC      arch/arm/mm/iomap.o
  CC      arch/arm/mm/fault-armv.o
  LD      arch/arm/common/built-in.o
  CC      arch/arm/kernel/sys_arm.o
  CC      arch/arm/mach-versatile/core.o
In file included from arch/arm/mm/fault-armv.c:18:0:
include/linux/pagemap.h: In function 'fault_in_pages_readable':
include/linux/pagemap.h:415:16: warning: variable 'c' set but not used [-Wunused-but-set-variable]
  volatile char c;
                ^
  CC      arch/arm/kernel/stacktrace.o
  CC      arch/arm/mm/flush.o
In file included from arch/arm/mm/flush.c:12:0:
include/linux/pagemap.h: In function 'fault_in_pages_readable':
include/linux/pagemap.h:415:16: warning: variable 'c' set but not used [-Wunused-but-set-variable]
  volatile char c;
                ^
  CC      arch/arm/mm/ioremap.o
  CC      arch/arm/kernel/time.o
  CC      arch/arm/mm/mmap.o
  CC      arch/arm/kernel/traps.o
  CC      arch/arm/mach-versatile/versatile_pb.o
  CC      arch/arm/mm/pgd.o
  CC      arch/arm/mm/mmu.o
  CC      arch/arm/plat-versatile/clock.o
  CC      arch/arm/mach-versatile/pci.o
  CC      arch/arm/plat-versatile/timer-sp.o
/home/naimk/lab/ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ld: internal error in relocate_special_relocatable, at /s/ndk-toolchain/src/build/../binutils/binutils-2.23/gold/arm.cc:9901
make[1]: *** [arch/arm/kernel/traps.o] Error 1
make: *** [arch/arm/kernel] Error 2
make: *** Waiting for unfinished jobs....
  CC      arch/arm/plat-versatile/sched-clock.o
  CC      arch/arm/mm/vmregion.o
  LD      arch/arm/plat-versatile/built-in.o
  CC      arch/arm/mm/proc-syms.o
  LD      arch/arm/mach-versatile/built-in.o
  CC      arch/arm/mm/alignment.o
  AS      arch/arm/mm/abort-ev5tj.o
  AS      arch/arm/mm/pabort-legacy.o
  CC      arch/arm/mm/copypage-v4wb.o
  AS      arch/arm/mm/tlb-v4wbi.o
  AS      arch/arm/mm/proc-arm926.o
arch/arm/mm/alignment.c: In function 'do_alignment':
arch/arm/mm/alignment.c:298:15: warning: 'offset.un' may be used uninitialized in this function [-Wmaybe-uninitialized]
   offset.un = -offset.un;
               ^
arch/arm/mm/alignment.c:720:21: note: 'offset.un' was declared here
  union offset_union offset;
                     ^
  LD      arch/arm/mm/built-in.o
/home/naimk/lab/ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ld: internal error in relocate_special_relocatable, at /s/ndk-toolchain/src/build/../binutils/binutils-2.23/gold/arm.cc:9901
make[1]: *** [arch/arm/mm/built-in.o] Error 1
make: *** [arch/arm/mm] Error 2

please if you can help me

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.