我是第一次制作android内核,并遇到一些错误(我已经克服了),我得到的错误日志如下:
casual@Casual-PC:/media/casual/USB/android_kernel_yotaphone2-DKernel$
make O=../out -j4
GEN /media/casual/USB/out/Makefile
CHK include/linux/version.h
Using /media/casual/USB/android_kernel_yotaphone2-DKernel as source for kernel
CHK include/generated/utsrelease.h
make[2]: «include/generated/mach-types.h» не требует обновления. (dont need update)
CC arch/arm/kernel/asm-offsets.s
GEN include/generated/asm-offsets.h
CALL /media/casual/USB/android_kernel_yotaphone2- DKernel/scripts/checksyscalls.sh
CC arch/arm/common/vic.o
CC arch/arm/mm/dma-mapping.o
CC init/main.o
CC arch/arm/common/timer-sp.o
AS arch/arm/kernel/entry-armv.o
AS arch/arm/kernel/entry-common.o
LD arch/arm/common/built-in.o
CHK include/generated/compile.h
CC arch/arm/kernel/process.o
CC arch/arm/mm/init.o
LD arch/arm/net/built-in.o
CC arch/arm/kernel/ptrace.o
CC init/do_mounts.o
CC init/do_mounts_rd.o
/media/casual/USB/android_kernel_yotaphone2-DKernel/arch/arm/mm/init.c: In function 'mem_init':
/media/casual/USB/android_kernel_yotaphone2-DKernel/arch/arm/mm/init.c:921:6: warning: format '%d' expects argument of
type 'int', but argument 7 has type 'long int' [-Wformat]
error, forbidden warning: init.c:921
/media/casual/USB/android_kernel_yotaphone2-DKernel/scripts/Makefile.build:307: recipe for target 'arch/arm/mm/init.o' failed
make[2]: *** [arch/arm/mm/init.o] Error 1
/media/casual/USB/android_kernel_yotaphone2-DKernel/Makefile:957: recipe for target 'arch/arm/mm' failed
make[1]: *** [arch/arm/mm] Error 2
make[1]: *** Ожидание завершения заданий…
CC arch/arm/kernel/sched_clock.o
CC init/do_mounts_initrd.o
CC init/do_mounts_md.o
CC arch/arm/kernel/signal.o
CC arch/arm/kernel/armksyms.o
CC arch/arm/kernel/bios32.o
LD init/mounts.o
LD init/built-in.o
CC arch/arm/kernel/isa.o
AS arch/arm/kernel/sleep.o
CC arch/arm/kernel/machine_kexec.o
CC arch/arm/kernel/io.o
CC arch/arm/kernel/crash_dump.o
/media/casual/USB/android_kernel_yotaphone2-DKernel/arch/arm/kernel/io.c: In function '_memcpy_fromio':
/media/casual/USB/android_kernel_yotaphone2-DKernel/arch/arm/kernel/io.c:14:3: error: implicit declaration of function 'nop' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
/media/casual/USB/android_kernel_yotaphone2-DKernel/scripts/Makefile.build:307: recipe for target 'arch/arm/kernel/io.o' failed
make[2]: *** [arch/arm/kernel/io.o] Error 1
make[2]: *** Ожидание завершения заданий…
/media/casual/USB/android_kernel_yotaphone2-DKernel/Makefile:957: recipe for target 'arch/arm/kernel' failed
make[1]: *** [arch/arm/kernel] Error 2
Makefile:130: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
(对错误的代码块表示抱歉) 因此,我发现了类似的问题,但我不明白答案: android kernel build (first time)
当我扔它
`LC_ALL=C make O=../out`
它给了我(破坏者-LC_ALL = C不按照我的想法工作,所以我自己翻译了它(为#)):
casual@Casual-PC:/media/casual/USB/android_kernel_yotaphone2-DKernel$ LC_ALL=C make O=../out
Using /media/casual/USB/android_kernel_yotaphone2-DKernel as source for kernel
GEN /media/casual/USB/out/Makefile
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[2]: «include/generated/mach-types.h» не требует обновления. #dont need updates
CALL /media/casual/USB/android_kernel_yotaphone2-DKernel/scripts/checksyscalls.sh
CHK include/generated/compile.h
CC arch/arm/kernel/io.o
/media/casual/USB/android_kernel_yotaphone2-DKernel/arch/arm/kernel/io.c: In function '_memcpy_fromio':
/media/casual/USB/android_kernel_yotaphone2-DKernel/arch/arm/kernel/io.c:14:3: error: implicit declaration of function 'nop' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
/media/casual/USB/android_kernel_yotaphone2-DKernel/scripts/Makefile.build:307: recipe for target 'arch/arm/kernel/io.o' failed
make[2]: *** [arch/arm/kernel/io.o] Error 1
/media/casual/USB/android_kernel_yotaphone2-DKernel/Makefile:957: recipe for target 'arch/arm/kernel' failed
make[1]: *** [arch/arm/kernel] Error 2
Makefile:130: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2