编译内核时出现的问题,请大家来看看。

ikoukou 2016-12-22 09:15:14
我在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

看上去并没有问题啊。请教大家一下。。
...全文
2158 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
G-6318 2019-03-06
  • 打赏
  • 举报
回复
apt-get install make ncurses-dev apt-get install uboot-tools apt-get install build-essential git patch wget unzip apt-get install gettext autoconf cmake libtool nasm luarocks apt-get install libssl-dev libffi-dev libsdl2-dev libc6-dev-i386 xutils-dev apt-get install linux-libc-dev:i386 zlib1g:i386
lucherr 2017-02-14
  • 打赏
  • 举报
回复
楼主问题解决了吗,我现在也遇到同样的问题,请教下
ikoukou 2016-12-26
  • 打赏
  • 举报
回复
没人么,,,

4,441

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 内核源代码研究区
社区管理员
  • 内核源代码研究区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧