/*******************************************************************
* 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-- 1 Qt Qt 98M May 16 15:32 arm-2014.05-29-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
-rw-r--r-- 1 Qt Qt 2.0M May 16 15:33 busybox-1.24.1.tar.bz2
-rw-r--r-- 1 Qt Qt 4.6M May 16 15:36 e2fsprogs-1.42.13.tar.xz
-rw-r--r-- 1 Qt Qt 320K May 16 15:37 fakeroot_1.20.2.orig.tar.bz2
-rw-r--r-- 1 Qt Qt 101K May 16 15:36 genext2fs-1.4.1.tar.gz
-rw-r--r-- 1 Qt Qt 86K May 16 15:35 pkgconf-0.9.12.tar.bz2
打包好的镜像:
Qt@tony:~/buildroot/buildroot-2016.02/output/images$ ls -lh
total 9.3M
-rwxrwxrwx 1 Qt Qt 6.5M May 16 15:37 rootfs.ext2
lrwxrwxrwx 1 Qt Qt 11 May 16 15:37 rootfs.ext4 -> rootfs.ext2
-rwxrwxrwx 1 Qt Qt 4.2M May 16 15:37 rootfs.tar
可以自己打包文件系统,制作成自己需要的压缩格式。
要将文件系统的own和group都改为root,否则会进不了文件系统。
Qt@tony:~/buildroot/buildroot-2016.02/output/target$ ls -l
total 64
drwxr-xr-x 2 root root 4096 May 16 15:37 bin
drwxr-xr-x 4 root root 4096 May 16 15:37 dev
drwxr-xr-x 5 root root 4096 May 16 17:12 etc
drwxr-xr-x 2 root root 4096 May 16 15:37 lib
lrwxrwxrwx 1 Qt Qt 3 May 16 14:51 lib32 -> lib
lrwxrwxrwx 1 Qt Qt 11 May 16 15:34 linuxrc -> bin/busybox
drwxr-xr-x 2 root root 4096 Mar 2 04:47 media
drwxr-xr-x 2 root root 4096 Mar 2 04:47 mnt
drwxr-xr-x 2 root root 4096 Mar 2 04:47 opt
drwxr-xr-x 2 root root 4096 Mar 2 04:47 proc
drwx------ 2 root root 4096 Mar 2 04:47 root
drwxr-xr-x 2 root root 4096 Mar 2 04:47 run
drwxr-xr-x 2 root root 4096 May 16 15:34 sbin
drwxr-xr-x 2 root root 4096 Mar 2 04:47 sys
-rw-r--r-- 1 root root 1336 May 16 15:37 THIS_IS_NOT_YOUR_ROOT_FILESYSTEM
drwxrwxrwt 2 root root 4096 Mar 2 04:47 tmp
drwxr-xr-x 6 root root 4096 May 16 15:34 usr
drwxr-xr-x 4 root root 4096 May 16 15:37 var