Embedded learning Note 300-linux root file system Setup

Source: Internet
Author: User

    1. 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
    2. 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
    3. 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

    4. 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) 
    1. Other directories can be empty!
    2. 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.
    3. 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.