I. Creating a root file system directory and files
1. Create a directory*mkdir/home/arm11/kernel/rootfs*cd/home/arm11/kernel/rootfs*mkdir bin Dev etc lib proc sbin sys usr MNT tmp var*mkdir usr/bin usr/lib usr/sbin lib/modules 2. Create a Device file* CD Rootfs/dev* Mknod-m 666 console C 5 1*mknod-m 666 null C 1 3 3. Join the configuration file*tar xvzf etc.tar.gz*MV etc/*/etc (note here is the ETC directory under the Rootfs directory, not the ETC directory in the root directory) 4. Adding kernel modules*cd/home/arm11/kernel/tin6410_linux/linux-tiny6410 (Enter the kernel source file we want to install into the Development Board)*make modules Arch=arm cross_compile=arm-linux-*make Modules Arch=arm install_mod_path=/home/arm11/kernel/rootfs (Install_mod_path set up where we're going to put the collected kernel modules again, here we make the storage Placed in the directory of the root files we created and saved automatically under/lib/modules)5. Compiling and installing BusyBox--busybox is a software that integrates more than 100 of the most commonly used Linux commands and tools* Tar xvzf busybox-1.13.3.tar.gz* Make Menuconfig--Configure BusyBox* Busybox Settings-->build Options* Check build BusyBox as static binary (no shared Lib)--static link* () Cross Compiler prefix--filled in brackets arm-linux-* Busybox Settings-->build Options* Check Don't use/usr--check this to prevent BusyBox from being installed in the/USR directory of the host system, destroying the host system. * () BusyBox installation prefix--fill in the directory where the production and file system resides* Make--compile* Make install--install to the production and file systemTwo. Mount the root file system to the kernel1. File system type2. Using Initramfs*cd/home/arm11/kernel/rootfs/*ln-s./bin/busybox Init--Create a soft link* Configure the Linux kernel to support Initramfs*make menuconfig arch=arm* Select*--brackets fill in the directory where the created root file system resides. *make uimage arch=arm cross_compile=arm-linux---Compile kernel* Start Uboot*setenv Bootargs noinitrd console=ttysac0,115200--set serial port 0*saveenv--saving environment variables*tftp--Download kernel to memory*bootm addr Boot kernel3. Using the NFS file system * Configure the Linux kernel to support NFS *make menuconfig arch=arm* Uncheck* Select File systems-->network file systems-->root file system on NFS*make uimage arch=arm cross_compile=arm-linux---Compile kernel* Start Uboot*setenv Bootargs noinitrd console=ttysac0,115200 init=/init root=dev/nfs rw nfsroot=192.168.0232:/ Home/arm11/kernel/rootfs,proto=tcp,nfsvers=3 Ip=192.168.0.137:192.168.0.232:192.168.0.1:255.255.255.0::eth0:off *saveenv*tftp--Download kernel to memory*bootm addr Boot kernel -----from porting uboot, to loading the system kernel with uboot, to mounting the filesystem on the kernel, and porting the Linux system to my tiny6410 Development Board. --the road of his choice, in the difficult, kneeling also to go down, fighting!
Root File System Authoring