我正在尝试为Xperia SP构建内核。
首先,我从这里git克隆了内核源代码:
https://github.com/Tomoms/android_kernel_sony_msm8x60
然后git克隆了这个工具链:https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7
然后我去了:KERNEL_FOLDER /拱/臂/ CONFIGS
并将msm8960_defconfig(因为我认为Xperia SP有msm8960)复制到KERNEL_FOLDER的根目录并将其重命名为.config
然后我打开了KERNEL_FOLDER目录中的终端并输入了
make ARCH=arm CROSS_COMPILE=~/toolchains/arm-eabi-4.7/bin/arm-eabi-
并得到了这个
CHK include/linux/version.h CHK include/generated/utsrelease.h HOSTCC scripts/basic/fixdep make[1]: `include/generated/mach-types.h' is up to date. CC kernel/bounds.s /home/pc/toolchains/arm-eabi-4.7/bin/arm-eabi-gcc -Wp,-MD,kernel/.bounds.s.d -nostdinc -isystem /home/pc/toolchains/arm-eabi-4.7/bin/arm-eabi-gcc -print-file-name=include [Errno 8] Exec format error -I/home/pc/android/kernel/android_kernel_sony_msm8x60/arch/arm/include -Iarch/arm/include/generated -Iinclude -include /home/pc/android/kernel/android_kernel_sony_msm8x60/include/linux/kconfig.h -D__KERNEL__ -mlittle-endian -Iarch/arm/mach-msm/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Wno-format-security -fno-delete-null-pointer-checks -Os -fstack-protector -mabi=aapcs-linux -mno-thumb-interwork -funwind-tables -D__LINUX_ARM_ARCH__=7 -march=armv7-a -msoft-float -Uarm -fomit-frame-pointer -g -mtune=cortex-a7 -mfpu=neon-vfpv4 -fgraphite -floop-parallelize-all -ftree-loop-linear -floop-interchange -floop-strip-mine -floop-block -DKBUILD_STR(s)=#s -DKBUILD_BASENAME=KBUILD_STR(bounds) -DKBUILD_MODNAME=KBUILD_STR(bounds) -fverbose-asm -S -o kernel/bounds.s kernel/bounds.c [Errno 8] Exec format error make[1]: *** [kernel/bounds.s] Error 8 make: *** [prepare0] Error 2
答案 0 :(得分:0)
在32位系统上构建时,人们常常会遇到此错误。确保您使用的是64位Linux。