我正在为我的智能手机编译自定义内核,目前正在设置三星提供的源代码。我已成功将Cherry从3.10.61选为3.10.108的内核,并修复了所有语法错误。当前,由于缺少使目标“使用”的规则而导致构建失败。
起初,我尝试用Google搜索错误并迅速发现没有相关结果,然后我尝试使用以下方法自己诊断错误:
make -j16 -d >> log
我什至试图在这里找到目标本身: https://elixir.bootlin.com/linux/v3.10.108/ident/use
全部无济于事。
这是我使用“ make -j16 ”得到的第一个错误:
[twilight@twilightlaptop Kernel]$ make -j16
scripts/kconfig/conf --silentoldconfig Kconfig
Kconfig:15:warning: environment variable ANDROID_MAJOR_VERSION undefined
INFO: CC is /home/twilight/android-ndk-r12b/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-gcc
WRAP arch/arm64/include/generated/asm/bug.h
WRAP arch/arm64/include/generated/asm/bugs.h
WRAP arch/arm64/include/generated/asm/clkdev.h
WRAP arch/arm64/include/generated/asm/cputime.h
WRAP arch/arm64/include/generated/asm/current.h
WRAP arch/arm64/include/generated/asm/checksum.h
CHK include/generated/uapi/linux/version.h
WRAP arch/arm64/include/generated/asm/div64.h
WRAP arch/arm64/include/generated/asm/dma.h
WRAP arch/arm64/include/generated/asm/emergency-restart.h
WRAP arch/arm64/include/generated/asm/delay.h
WRAP arch/arm64/include/generated/asm/early_ioremap.h
WRAP arch/arm64/include/generated/asm/errno.h
WRAP arch/arm64/include/generated/asm/ftrace.h
UPD include/generated/uapi/linux/version.h
WRAP arch/arm64/include/generated/asm/ioctl.h
WRAP arch/arm64/include/generated/asm/ioctls.h
WRAP arch/arm64/include/generated/asm/hw_irq.h
make: *** No rule to make target 'use', needed by 'kernel'. Stop.
make: *** Waiting for unfinished jobs....
WRAP arch/arm64/include/generated/asm/irq_regs.h
WRAP arch/arm64/include/generated/asm/kdebug.h
WRAP arch/arm64/include/generated/asm/kmap_types.h
WRAP arch/arm64/include/generated/asm/kvm_para.h
WRAP arch/arm64/include/generated/asm/ipcbuf.h
WRAP arch/arm64/include/generated/asm/local.h
WRAP arch/arm64/include/generated/asm/local64.h
WRAP arch/arm64/include/generated/asm/msgbuf.h
WRAP arch/arm64/include/generated/asm/pci.h
WRAP arch/arm64/include/generated/asm/mman.h
WRAP arch/arm64/include/generated/asm/poll.h
WRAP arch/arm64/include/generated/asm/mutex.h
WRAP arch/arm64/include/generated/asm/resource.h
WRAP arch/arm64/include/generated/asm/scatterlist.h
WRAP arch/arm64/include/generated/asm/posix_types.h
WRAP arch/arm64/include/generated/asm/sections.h
WRAP arch/arm64/include/generated/asm/rwsem.h
WRAP arch/arm64/include/generated/asm/sembuf.h
WRAP arch/arm64/include/generated/asm/serial.h
WRAP arch/arm64/include/generated/asm/shmbuf.h
WRAP arch/arm64/include/generated/asm/segment.h
WRAP arch/arm64/include/generated/asm/simd.h
WRAP arch/arm64/include/generated/asm/sizes.h
WRAP arch/arm64/include/generated/asm/sockios.h
WRAP arch/arm64/include/generated/asm/socket.h
WRAP arch/arm64/include/generated/asm/switch_to.h
WRAP arch/arm64/include/generated/asm/swab.h
WRAP arch/arm64/include/generated/asm/termbits.h
WRAP arch/arm64/include/generated/asm/termios.h
WRAP arch/arm64/include/generated/asm/topology.h
WRAP arch/arm64/include/generated/asm/trace_clock.h
WRAP arch/arm64/include/generated/asm/types.h
WRAP arch/arm64/include/generated/asm/unaligned.h
WRAP arch/arm64/include/generated/asm/user.h
WRAP arch/arm64/include/generated/asm/vga.h
WRAP arch/arm64/include/generated/asm/xor.h
WRAP arch/arm64/include/generated/uapi/asm/kvm_para.h
[twilight@twilightlaptop Kernel]$
这是我再次执行命令时得到的:
[twilight@twilightlaptop Kernel]$ make -j16
INFO: CC is /home/twilight/android-ndk-r12b/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-gcc
CHK include/generated/uapi/linux/version.h
make: *** No rule to make target 'use', needed by 'kernel'. Stop.
make: *** Waiting for unfinished jobs....
[twilight@twilightlaptop Kernel]$
这是“ make -j16 -d >> log ”产生的日志的片段:
Reading makefile '/run/media/twilight/DATA/deving/SM-j700_Source/Second/Kernel/scripts/basic/Makefile' (search path) (no ~ expansion)...
Considering target file 'use'.
File 'use' does not exist.
Trying pattern rule with stem 'scatterlist'.
Found an implicit rule for 'arch/arm64/include/generated/asm/scatterlist.h'.
Looking for an implicit rule for 'use'.
No implicit rule found for 'use'.
Finished prerequisites of target file 'arch/arm64/include/generated/asm/scatterlist.h'.
No need to remake target 'arch/arm64/include/generated/asm/scatterlist.h'.
Finished prerequisites of target file 'use'.
Must remake target 'use'.