编译内核时出现的问题,请大家来看看。
我在make时出现以下错误:
scripts/Makefile.build:190: recipe for target 'scripts/mod/empty.o' failed
make[2]: *** [scripts/mod/empty.o] Error 1
scripts/Makefile.build:311: recipe for target 'scripts/mod' failed
make[1]: *** [scripts/mod] Error 2
Makefile:442: recipe for target 'scripts' failed
make: *** [scripts] Error 2
然后我去/scripts/mod目录下make,出现以下错误:
[root@localhost mod]# make
make: *** No rule to make target '/empty.o', needed by '/elfconfig.h'。 停止。
应该是没有生成这个elfconfig.h,查看Makefile
hostprogs-y := modpost mk_elfconfig
always := $(hostprogs-y) empty.o
modpost-objs := modpost.o file2alias.o sumversion.o
# dependencies on generated files need to be listed explicitly
$(obj)/modpost.o $(obj)/file2alias.o $(obj)/sumversion.o: $(obj)/elfconfig.h
quiet_cmd_elfconfig = MKELF $@
cmd_elfconfig = $(obj)/mk_elfconfig $(ARCH) < $< > $@
$(obj)/elfconfig.h: $(obj)/empty.o $(obj)/mk_elfconfig FORCE
$(call if_changed,elfconfig)
#targets += elfconfig.h
看上去并没有问题啊。请教大家一下。。