- The root filesystem needs to be built using BusyBox to compile the required applications for the system files, and then to expand the build root file system.
Here use busybox1.16.0, can in this blog query see if there is upload.
Tar jxvf busybox-1.16.0.tar.bz2-c Your_path
- Configuration: Enter busybox-1.16.0 modify makefile, 164 lines of cross_compile=/xx/xx/4.3.3/bin/arm-linux-, 189 lines Modified arch = arm, and finally input make Menuconfig, here I adopt the default, the main even modify the General configuration option settings, such as enable the history of Save Vi-style and so on. Then exit Save As. config, and finally make;make install. Finally, the _install directory will be generated in the current directory, which will have the necessary applications for the basic ARM architecture, including the first application of the file system to be launched by Uboot to kernel. Bin Linuxrc sbin usr
Build the file system, under busybox-1.16.0 _stall as the blueprint, Cp-r _stall root_fs, build the basic file system ROOT_FS, and then create a new related directory under ROOT_FS
mkdir Dev etc lib mnt opt proc root tmp usr/lib usr/share var
Dev directory:
Since the system initializes the INIT process to use/dev/console and/dev/null, it is manually established in advance
console51null13
May require sudo without permission to establish
5. Etc Directory
Copy the files from the file system embedded in the
6. lib Directory:
Here's a copy of the cross-compilation from the Lib
cp-raf/xx/4.3.3/arm-none-linux-gnueabi/libc/armv4t/usr/lib/. /lib
7. MNT directory:
This establishes the Udisk sddisk two directory to mount the USB stick and SD card, which is configured under/etc/mdev.conf:
SD[A-z]*[0-9]0: 00660@ (Mount -t vfat-o iocharset=cp936/dev/$MDEV/mnt/ Udisk) Sd[a-z]*[0 -9] 0 : 0 0660 * ( Umount/mnt/udisk) Mmcblk[0 -9 ]*p[0 -9 ] 0 : 0 0660 @ (mount-t vfat-o iocharset=cp936/dev/$ MDEV/MNT/SD) Mmcblk[0 -9 ]*p[ 0 -9 ] 0 : 0 0660 * (UMOUNT/MNT/SD)
- Other directories can be empty!
- To make the image, the cross-compilation tool comes with a command for making various file system images, and since we are using YAFFS2, we use mkyaffsimage_2 or mkyaffs2image, which is used for 64M NAND flash Mkyaffsimage_ 2, while 128M and above use Mkyaffs2image, there are two commands because the Linux kernel NAND driver have different processing for different NAND size. My demo board is 256MB NAND so that's mkyaffs2image root_fs root_fs.bin.
- Burning into the NAND, similarly, like burning into the kernel, here is the bootloader of the day embedded with the choice to burn Root_fs.bin into its designated address 0x500000.
Embedded learning Note 300-linux root file system Setup