您的位置:首页 > Web前端

fedora安装busybox过程及出错处理

2015-08-24 13:07 489 查看
Linux fedora安装busybox过程及出错处理


[root@ARM busybox-1.16.0]# uname -r
2.6.35.14-106.fc14.i686

解压busybox:[root@**]#
tar xvfj /mnt/hgfs/src-linux/2.6.30.4/busybox-1.16.0.tar.bz2 -C /





[root@ARM **]# cd /opt/EmbedSky/busybox-1.16.0/

编译:make menuconfig

===========================================================

出错处理:

[root@ARM busybox-1.16.0]# make menuconfig
Makefile:431: *** mixed implicit and normal rules.  Stop.

今天在编译busybox1.16的时候,执行make命令,报错,错误信息:437 “mixed implicit and normal rules”,翻译为中文:混合的和隐含普通规则。起初以为是busybox包的问题,从官网上下载了低版本1.13,报同样的错误,google后发现,是由于我的系统的make工具太新(系统:fedora14),make的旧版规则已经无法兼容新版。按照以下方式,问题得到解决:

cd /opt/EmbedSky/busybox-1.16.0/; vim Makefile;

busybox版本:busybox-1.16.0.tar.bz2,Linux版本不一致,错误行不太一样;

在makefile中将430行代码

config %config: scripts_basic outputmakefile FORCE改:

%config: scripts_basic outputmakefile FORCE

改后为:

 430 #config %config: scripts_basic outputmakefile FORCE

431 %config: scripts_basic outputmakefile FORCE
将1279行代码:

/ %/: prepare scripts FORCE(错)

改为:%/: prepare scripts FORCE(对)

改后为:
1279 #/ %/: prepare scripts FORCE

1280 %/: prepare scripts FORCE
即可编译通过!

继续:
[root@ARM busybox-1.16.0]# make menuconfig
make[2]: *** [scripts/kconfig/lxdialog/checklist.o] Error 1

解决方法:

安装ncurses-devel,这个是红帽或者FC的安装程序,Ubuntu的需要安装libncurses5-dev

[root@ARM busybox-1.16.0]# yum install -y ncurses-devel

继续:
[root@ARM busybox-1.16.0]# make menuconfig

Your display is too small to run Menuconfig!

It must be at least 19 lines by 80 columns.

make[1]: *** [menuconfig] Error 1
如果是在终端窗口执行的话,要保证窗口的大小,如果窗口过小,则会显示出错信息:把你的终端最大化就行了。

继续:
[root@ARM busybox-1.16.0]# make menuconfig
打开终端配置窗口,

Load an Alternate Configration File导入配置,

Save Configration to an Alternate File保存配置(保存为.config后缀的);

继续:
[root@ARM busybox-1.16.0]# make
make编译;

  LINK    busybox_unstripped

Trying libraries: crypt m

Library crypt is not needed, excluding it

Library m is needed, can't exclude it (yet)

Final link with: m

  DOC     busybox.pod

  DOC     BusyBox.txt

  DOC     BusyBox.1

  DOC     BusyBox.html

[root@ARM busybox-1.16.0]# 编译完成;

继续:
[root@ARM busybox-1.16.0]# make install
安装刚刚编译好的busybox,安装后在busybox源码的根目录下会建立一个_install的目录,安装后的busybox就在该目录下。

--------------------------------------------------

You will probably need to make your busybox binary

setuid root to ensure all configured applets will

work properly.

--------------------------------------------------

安装完成。
查看_install目录下内容:

[root@ARM busybox-1.16.0]# ll _install/

total 12

drwxr-xr-x. 2 root root 4096 Mar 11 23:30 bin

lrwxrwxrwx. 1 root root   11 Mar 11 23:30 linuxrc -> bin/busybox

drwxr-xr-x. 2 root root 4096 Mar 11 23:30 sbin

drwxr-xr-x. 4 root root 4096 Mar 11 23:30 usr

转载: http://z515256164.blog.163.com/blog/static/324430292012212114228993/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  u-boot busybox linux