编译/安装busybox
来源:互联网 发布:中原工学院网络教育 编辑:程序博客网 时间:2024/06/14 13:02
2、解压源码
# tar xvjf busybox-1.22.1.tar.bz2
3、进入源码修改Makefile
164 CROSS_COMPILE ?= 改成
164 CROSS_COMPILE ?= arm-linux-
190 ARCH ?= $(SUBARCH) 改成
190 ARCH ?= arm
4、make menuconfig配置busybox(借用网络图片)
Busybox Settings--->
General Configuration--->
[ ] Enable options for full-blown desktop systems
使用的是嵌入式系统,如果不取消,在执行 ps 命令时不会显示进程状态。
Build Options--->
(arm-linux-) Cross Compiler prefix
指定交叉编译器前缀
Installation Options ("make install" behavior)--->
(./_install) BusyBox installation prefix (NEW)
指定安装路径(使用的是默认路径)
Init Utilities[ ]--->
[ ]Be _extra_ quiet on boot
取消可以在系统启动时显示 busybox 版本号加载和卸载内核模块
Linux Module Utilities--->
[ ] Simplified modutils
不适应简单的,需要使用 insmod 等工具
[*] insmod
[*] rmmod
[*] lsmod
[*] modprobe
[*] depmod
配置完毕,退出。开始编译
#make -j4
出错:
miscutils/nandwrite.c:49:26: 致命错误:mtd/mtd-user.h:没有那个文件或目录
#include <mtd/mtd-user.h>
^
编译中断。
make[1]: *** [miscutils/nandwrite.o] 错误 1
make: *** [miscutils] 错误 2
解决:cp /usr/include/mtd/ ./include/mtd/ -a
继续make 出错:
networking/inetd.c:178:22: 致命错误:rpc/rpc.h:没有那个文件或目录
# include <rpc/rpc.h>
^
编译中断。
make[1]: *** [networking/inetd.o] 错误 1
make: *** [networking] 错误 2
解决:
交叉工具链缺少rcp.h文件.
原因是在制作交叉编译工具链时编译glibc时未开启rpc选项。
进入glibc-2.18目录,添加rpc选项--enable-obsolete-rpc进行配置
#./configure CC=$TARGET-gcc AR=$TARGET-ar RANLIB=$TARGET-ranlib --host=$TARGET --target=$TARGET --prefix=$TARGET_PREFIX --with-tls --disable-profile --enable-add-ons --enable-obsolete-rpc --with-binutils=$PREFIX/bin --with-headers=$TARGET_PREFIX/include libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes libc_cv_arm_tls=yes
然后编译安装,完成后,在交叉工具链下的rpc文件夹下就有rpc.h文件了。
这时再编译busybox成功。
安装
#make install
完成后在busybox-1.22.1文件夹下生成_install文件夹。
此文夹下的内容即为制作文件系统所需要的东东。
- busybox编译安装
- 编译/安装busybox
- CentOS下编译安装Busybox
- Ubuntu16.04编译安装BusyBox
- Busybox的配置、编译与安装
- 编译和安装busybox到android手机
- Busybox的配置、编译与安装
- 编译和安装BusyBox到Android手机
- Busybox的配置、编译与安装
- busybox的编译、使用及安装
- busybox的编译、使用及安装
- BusyBox编译
- 编译busybox
- busybox编译
- 编译busybox
- busybox编译
- 编译busybox
- 编译Busybox
- POJ 1833 排列
- 1046: [HAOI2007]上升序列
- 几种排序 程序
- lua中有4种方式遍历一个table
- stl 的stack函数
- 编译/安装busybox
- POJ 3264 Balanced Lineup
- swift语言学习笔记
- Java的日期格式化常用方法
- 【翻译自mos文章】注意: ASMB process exiting due to lack of ASM file activity
- cocos2dx 3.1.1学习笔记 中文字符的使用
- uva 591(数学)
- 有些东西你就是记不住——一句话网络
- handler