Android 从源代码生成内核时出错

Android 从源代码生成内核时出错,android,kernel,Android,Kernel,我试图从源代码编译一个三星内核 但它会抛出这些错误 root@kali:~# cd sumax root@kali:~/sumax# ./build_kernel.sh CROSS_COMPILE=/root/toolchain/bin/arm-eabi- clean && make mrproper ccache: error: execv of /root/toolchain/bin/arm-eabi-gcc failed: Exec format error

我试图从源代码编译一个三星内核

但它会抛出这些错误

root@kali:~# cd sumax
root@kali:~/sumax# ./build_kernel.sh
CROSS_COMPILE=/root/toolchain/bin/arm-eabi-
clean && make mrproper
ccache: error: execv of /root/toolchain/bin/arm-eabi-gcc failed: Exec format error                                                              CLEAN   .tmp_versions
ccache: error: execv of /root/toolchain/bin/arm-eabi-gcc failed: Exec format error
  CLEAN   scripts/basic
  CLEAN   scripts/kconfig
  CLEAN   include/config include/generated arch/arm/include/generated
  CLEAN   .config include/generated/uapi/linux/version.h
export ARCH=arm
  HOSTCC  scripts/basic/fixdep                                           HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c                                    SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c                                   HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf                                         arch/arm/mach-exynos/Kconfig:186:warning: choice value used outside its choice group                                                          arch/arm/mach-exynos/Kconfig:189:warning: choice value used outside its choice group                                                          arch/arm/mach-exynos/Kconfig:192:warning: choice value used outside its choice group
drivers/nfc/Kconfig:100:warning: choice value used outside its choice group                                                                   drivers/nfc/Kconfig:102:warning: choice value used outside its choice group                                                                   drivers/nfc/Kconfig:110:warning: choice value used outside its choice group
drivers/nfc/Kconfig:112:warning: choice value used outside its choice group                                                                   drivers/nfc/Kconfig:114:warning: choice value used outside its choice group                                                                   drivers/w1/Kconfig:34:warning: defaults for choice values not supported
drivers/w1/Kconfig:40:warning: defaults for choice values not supporteddrivers/w1/Kconfig:46:warning: defaults for choice values not supported
drivers/w1/Kconfig:52:warning: defaults for choice values not supported#                                                                      # configuration written to .config                                     #
ccache: error: execv of /root/toolchain/bin/arm-eabi-gcc failed: Exec format error                                                            scripts/kconfig/conf --silentoldconfig Kconfig
arch/arm/mach-exynos/Kconfig:186:warning: choice value used outside its choice group
arch/arm/mach-exynos/Kconfig:189:warning: choice value used outside its choice group                                                          arch/arm/mach-exynos/Kconfig:192:warning: choice value used outside its choice group                                                          drivers/nfc/Kconfig:100:warning: choice value used outside its choice group                                                                   drivers/nfc/Kconfig:102:warning: choice value used outside its choice group                                                                   drivers/nfc/Kconfig:110:warning: choice value used outside its choice group                                                                   drivers/nfc/Kconfig:112:warning: choice value used outside its choice group                                                                   drivers/nfc/Kconfig:114:warning: choice value used outside its choice group
drivers/w1/Kconfig:34:warning: defaults for choice values not supported
drivers/w1/Kconfig:40:warning: defaults for choice values not supporteddrivers/w1/Kconfig:46:warning: defaults for choice values not supported
drivers/w1/Kconfig:52:warning: defaults for choice values not supportedccache: error: execv of /root/toolchain/bin/arm-eabi-gcc failed: Exec format error                                                              WRAP    arch/arm/include/generated/asm/auxvec.h
  WRAP    arch/arm/include/generated/asm/bitsperlong.h                   WRAP    arch/arm/include/generated/asm/cputime.h
  WRAP    arch/arm/include/generated/asm/current.h
  WRAP    arch/arm/include/generated/asm/emergency-restart.h             WRAP    arch/arm/include/generated/asm/errno.h                         WRAP    arch/arm/include/generated/asm/exec.h                          WRAP    arch/arm/include/generated/asm/ioctl.h                         WRAP    arch/arm/include/generated/asm/ipcbuf.h                        WRAP    arch/arm/include/generated/asm/irq_regs.h
  WRAP    arch/arm/include/generated/asm/kdebug.h
  WRAP    arch/arm/include/generated/asm/local.h                         WRAP    arch/arm/include/generated/asm/local64.h
  WRAP    arch/arm/include/generated/asm/msgbuf.h                        WRAP    arch/arm/include/generated/asm/param.h
  WRAP    arch/arm/include/generated/asm/parport.h
  WRAP    arch/arm/include/generated/asm/poll.h
  WRAP    arch/arm/include/generated/asm/resource.h                      WRAP    arch/arm/include/generated/asm/sections.h
  WRAP    arch/arm/include/generated/asm/segment.h                       WRAP    arch/arm/include/generated/asm/sembuf.h                        WRAP    arch/arm/include/generated/asm/serial.h                        WRAP    arch/arm/include/generated/asm/shmbuf.h
  WRAP    arch/arm/include/generated/asm/siginfo.h                       WRAP    arch/arm/include/generated/asm/sizes.h                         WRAP    arch/arm/include/generated/asm/socket.h
  WRAP    arch/arm/include/generated/asm/sockios.h
  WRAP    arch/arm/include/generated/asm/termbits.h                      WRAP    arch/arm/include/generated/asm/termios.h
  WRAP    arch/arm/include/generated/asm/timex.h                         WRAP    arch/arm/include/generated/asm/trace_clock.h
  WRAP    arch/arm/include/generated/asm/types.h                         WRAP    arch/arm/include/generated/asm/unaligned.h
  CHK     include/generated/uapi/linux/version.h                         UPD     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h                                 UPD     include/generated/utsrelease.h
  Generating include/generated/mach-types.h                              CC      kernel/bounds.s
ccache: error: execv of /root/toolchain/bin/arm-eabi-gcc failed: Exec format error
/root/sumax/./Kbuild:35: recipe for target 'kernel/bounds.s' failed    make[1]: *** [kernel/bounds.s] Error 1
Makefile:873: recipe for target 'prepare0' failed                      make: *** [prepare0] Error 2
root@kali:~/sumax#
当我一个接一个地发出命令或运行下面的.sh时

#!/bin/bash

cd /root/sumax

echo "CROSS_COMPILE=/root/toolchain/bin/arm-eabi-"
export CROSS_COMPILE=/root/toolchain/bin/arm-eabi-

echo "clean && make mrproper"
make clean && make mrproper

echo "export ARCH=arm"
export ARCH=arm

make Suemax_trelte_Basic_defconfig 

#make trelte_00_defconfig

make
谁能帮我解决这些错误。
谢谢

根据第一条错误消息,您的工具链编译器
/root/toolchain/bin/arm-eabi-gcc
已损坏。您可以手动运行吗?如何手动运行?在终端中运行它,不带参数,并查看其输出。@Tsyvarev当我通过时,使olddefconfig仅显示它/arm/mach exynos/Kconfig:186:警告:在其选择组arch/arm/mach exynos/Kconfig:189:警告:在其选择组arch/arm/mach exynos/Kconfig:192:警告:在其选择组驱动程序外部使用的选择值/nfc/Kconfig:100:警告:在其选择组外部使用的选择值drivers/nfc/Kconfig:102:警告:在其选择组之外使用的选择值drivers/nfc/Kconfig:110:警告:在其选择组之外使用的选择值手动运行,无错误