嵌入式文件系统构建工具 busybox / buildroot / openwrt

1、busybox

busybox最轻量

1) 修改Makefile

CROSS_COMPILE ?= /usr/local/gcc-linaro-arm-linux-gnueabihf/bin/arm-linux-gnueabihf-

ARCH ?= arm

2) 配置make menuconfig

Busybox Settings  --->

[*] Build BusyBox as a static binary (no shared libs)

(/usr/local/gcc-linaro-arm-linux-gnueabihf/bin/arm-linux-gnueabihf-) Cross Compiler prefix

3) 编译,安装

#make

#make install

4) 拷贝Linaro Toolchain依赖的glibc库

https://releases.linaro.org/components/toolchain/binaries/latest/arm-linux-gnueabihf/

下找到sysroot-glibc-linaro-2.25-2017.11-arm-linux-gnueabihf.7z,拷贝usr和lib两个目录到文件系统

5) 制作引导文件

 

2、buildroot

我用的atmel sama5d3,  看这个文档就够了How to build Buildroot for AT91

http://www.at91.com/linux4sam/bin/view/Linux4SAM/BuildRootBuild

这个是定制的buildroot, 通用版用法也类似。

https://buildroot.org/download.html

https://buildroot.org/downloads/

 

3、openwrt

1) 官网

http://archive.openwrt.org/

我的板是atmel sama5d3, 直接有现成配置好的

http://archive.openwrt.org/chaos_calmer/

参考的这个blog

https://blog.csdn.net/flyingcys/article/details/54671614

4)
openwrt编译和开发过程中经常要添加自己的程序进去,一般都是放在package路径下,但是编译调试的时候每次都要make整个固件,特别麻烦,偶尔发现了有人说可以单独编译package下的程序,就像这样:

make package/feeds/packages/xxxxx/compile V=99

xxxxx就是你需要单独编译的程序。编译完成后去bin/ramips/packages里面找到对应的ipk,上传到板子,opkg install就可以了。

 

2) wiki

https://wiki.openwrt.org/zh-cn/doc/howto/buildroot.exigence

3) 在小米路由上运行Node.js

https://cnodejs.org/topic/536a402afa61d57127060d40

4) 单独编译插件,比如nodejs

make package/feeds/packages/node/compile V=99

UBIFS

http://www.linux-mtd.infradead.org/faq/ubifs.html

 

posted @ 2018-04-22 13:06  dong1  阅读(1727)  评论(0编辑  收藏  举报