编译内核错误:recipe for target 'kernel/timeconst.h' failed kernel/timeconst.h] Error 255

在使用Ubuntu16.04编译Linux-3.4.2内核时遇到编译错误,解决方法是在kernel/timeconst.pl文件中修改第373行,移除defined()函数,仅保留!@val表达式。

在使用ubuntu16.04编译Linux-3.4.2内核时出现这样的错误:

解决办法是:将kernel/timeconst.pl中第373行的defined()去掉,只留下 !@val 就可以了,去掉后如下:

make[1]: Entering directory '/mnt/sda1/haogq/HiChip_D3000/hcrtos.05.03y/components/applications/apps-bootloader/source' "KBUILD_OUTPUT is /mnt/sda1/haogq/HiChip_D3000/hcrtos.05.03y/output-bl/build/apps-bootloader" /mnt/sda1/haogq/HiChip_D3000/hcrtos.05.03y/build/Makefile.build:54: warning: overriding recipe for target 'built-in.o' /mnt/sda1/haogq/HiChip_D3000/hcrtos.05.03y/components/applications/apps-bootloader/source//./Makefile:37: warning: ignoring old recipe for target 'built-in.o' Compiling main.o Compiling cmd/bootm.o Compiling common/bootm.o Compiling lib/display_options.o Compiling cmd/mtdload.o Compiling common/image.o Compiling common/bootm_os.o Compiling cmd/meminfo.o Compiling cmd/showlogo.o /mnt/sda1/haogq/HiChip_D3000/hcrtos.05.03y/components/applications/apps-bootloader/source//cmd/bootm.c:1:10: fatal error: kernel/types.h: No such file or directory #include <kernel/types.h> ^~~~~~~~~~~~~~~~ compilation terminated. /mnt/sda1/haogq/HiChip_D3000/hcrtos.05.03y/build/Makefile.rules:97: recipe for target 'cmd/bootm.o' failed make[4]: *** [cmd/bootm.o] Error 1 make[4]: *** Waiting for unfinished jobs.... Compiling common/image-fdt.o /mnt/sda1/haogq/HiChip_D3000/hcrtos.05.03y/components/applications/apps-bootloader/source//lib/display_options.c:2:10: fatal error: kernel/types.h: No such file or directory #include <kernel/types.h> ^~~~~~~~~~~~~~~~ compilation terminated. /mnt/sda1/haogq/HiChip_D3000/hcrtos.05.03y/build/Makefile.rules:97: recipe for target 'lib/display_options.o' failed make[4]: *** [lib/display_options.o] Error 1 /mnt/sda1/haogq/HiChip_D3000/hcrtos.05.03y/build/Makefile.build:61: recipe for target 'lib' failed make[3]: *** [lib] Error 2 make[3]: *** Waiting for unfinished jobs.... /mnt/sda1/haogq/HiChip_D3000/hcrtos.05.03y/components/applications/apps-bootloader/source//cmd/mtdload.c:5:10: fatal error: kernel/types.h: No such file or directory #include <kernel/types.h> ^~~~~~~~~~~~~~~~ compilation terminated. /mnt/sda1/haogq/HiChip_D3000/hcrtos.05.03y/components/applications/apps-bootloader/source//./main.c:10:10: fatal error: kernel/elog.h: No such file or directory #include <kernel/elog.h> ^~~~~~~~~~~~~~~ 中错误的具体解决方案
06-26
gcc: error: unrecognized argument in option ‘-mabi=aapcs-linux’ gcc: note: valid arguments to ‘-mabi=’ are: ms sysv gcc: error: unrecognized command line option ‘-mlittle-endian’ gcc: error: unrecognized command line option ‘-mno-thumb-interwork’ gcc: error: unrecognized command line option ‘-mfpu=vfp’ scripts/Makefile.build:258: recipe for target 'scripts/mod/empty.o' failed make[2]: *** [scripts/mod/empty.o] Error 1 scripts/Makefile.build:403: recipe for target 'scripts/mod' failed make[1]: *** [scripts/mod] Error 2 make[1]: *** Waiting for unfinished jobs.... HOSTCC scripts/dtc/checks.o HOSTCC scripts/dtc/util.o Generating include/generated/mach-types.h SHIPPED scripts/dtc/dtc-lexer.lex.c SHIPPED scripts/dtc/dtc-parser.tab.h SHIPPED scripts/dtc/dtc-parser.tab.c HOSTCC scripts/dtc/dtc-lexer.lex.o CC kernel/bounds.s gcc: error: unrecognized argument in option ‘-mabi=aapcs-linux’ gcc: note: valid arguments to ‘-mabi=’ are: ms sysv gcc: error: unrecognized command line option ‘-mlittle-endian’ gcc: error: unrecognized command line option ‘-mno-thumb-interwork’ gcc: error: unrecognized command line option ‘-mfpu=vfp’ Kbuild:43: recipe for target 'kernel/bounds.s' failed make[1]: *** [kernel/bounds.s] Error 1 Makefile:990: recipe for target 'prepare0' failed make: *** [prepare0] Error 2 make: *** Waiting for unfinished jobs.... HOSTCC scripts/dtc/dtc-parser.tab.o HOSTLD scripts/dtc/dtc Makefile:555: recipe for target 'scripts' failed make: *** [scripts] Error 2
04-01
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值