/*******************************************************************
* buildroot制作文件系统
* 使用buildroot制作文件系统,比busybox简单许多。虽然以前也使用过buildroot
* 编译内核和文件系统,但是没有自己操作过详细的配置。今天总算体会到它的便捷。
*
* 参考文档:
* http://www.cnblogs.com/zengjfgit/p/5174376.html
*
* Tony Liu, 2016-5-16, Shenzhen
******************************************************************/
编译之后,下载的工具目录,dl:
Qt@tony:~/buildroot/buildroot-2016.02/dl$ ls -lh
total 105M
-rw-r--r-- Qt Qt 98M May : arm-2014.05--arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
-rw-r--r-- Qt Qt 2.0M May : busybox-1.24..tar.bz2
-rw-r--r-- Qt Qt 4.6M May : e2fsprogs-1.42..tar.xz
-rw-r--r-- Qt Qt 320K May : fakeroot_1.20.2.orig.tar.bz2
-rw-r--r-- Qt Qt 101K May : genext2fs-1.4..tar.gz
-rw-r--r-- Qt Qt 86K May : pkgconf-0.9..tar.bz2
打包好的镜像:
Qt@tony:~/buildroot/buildroot-2016.02/output/images$ ls -lh
total 9.3M
-rwxrwxrwx Qt Qt 6.5M May : rootfs.ext2
lrwxrwxrwx Qt Qt May : rootfs.ext4 -> rootfs.ext2
-rwxrwxrwx Qt Qt 4.2M May : rootfs.tar
可以自己打包文件系统,制作成自己需要的压缩格式。
要将文件系统的own和group都改为root,否则会进不了文件系统。
Qt@tony:~/buildroot/buildroot-2016.02/output/target$ ls -l
total
drwxr-xr-x root root May : bin
drwxr-xr-x root root May : dev
drwxr-xr-x root root May : etc
drwxr-xr-x root root May : lib
lrwxrwxrwx Qt Qt May : lib32 -> lib
lrwxrwxrwx Qt Qt May : linuxrc -> bin/busybox
drwxr-xr-x root root Mar : media
drwxr-xr-x root root Mar : mnt
drwxr-xr-x root root Mar : opt
drwxr-xr-x root root Mar : proc
drwx------ root root Mar : root
drwxr-xr-x root root Mar : run
drwxr-xr-x root root May : sbin
drwxr-xr-x root root Mar : sys
-rw-r--r-- root root May : THIS_IS_NOT_YOUR_ROOT_FILESYSTEM
drwxrwxrwt root root Mar : tmp
drwxr-xr-x root root May : usr
drwxr-xr-x root root May : var