Using BuildRoot to build Linux file system "Go"

Source: Internet
Author: User

This article was reproduced from: http://blog.csdn.net/metalseed/article/details/45423061

(File system construction, highly recommended direct use of buildroot, official online tutorial is very detailed BuildRoot official website)
File systems typically contain many third-party software, such as Busybox,tslib,qt,vim, cross-compiling tools, and so on, in order to avoid complicated porting efforts. BuildRoot was born. Through the Menuconfig configuration we need to function, do not need to remove the function, and then perform the make command compile, BuildRoot will automatically download the source package from the specified server, automatically compiled, automatically built to build the embedded root file system we need.

1: Get BuildRoot

git clone git://git.buildroot.net/buildroot
We can get BuildRoot source package from BuildRoot official website (http://buildroot.uclibc.org/download.html), BuildRoot is basically updated three months, Here we actually download the source package is buildroot-2015.02.tar.gz

2: Configure BuildRoot
Copy the source package to the/OPT directory and unzip the

tar -xvf buildroot-2015.02.tar.gz
    • 1
    • 1

Go to directory, execute configuration command

cd /opt/buildroot-2015.02make menuconfig
    • 1
    • 2
    • 1
    • 2

The configuration interface is as follows:

2.1: Enter target options

Configure the target Architecture as arm (LITTLT endian), configure the target Architecture variant as CORTEX-A9, configure the target Abi as Eabi, and arm Instruction set is configured as arm and then back to the previous interface

2.2: Enter Toolchain
Configure Toolchaintype as Externaltoolchain, then select the version of the cross-compilation tool in Toolchain, such as Arm 2013.11, select Toolchain to is in Toolchain origin Downloaded andinstalled, after compiling, buildroot will automatically download the corresponding toolchain and install automatically. Select Enable Mmusupport to return to the previous interface

2.3: Enter System configuration
Enter the name of the board in the system hostname column, such as Metal box, where you can enter a welcome language, such as Welcome to metal world, in System banner. Select BusyBox in the init system, select the dynamic using Mdev in the/dev management, that is, the way the device nodes are loaded dynamically using Mdev, and then in path to Thepermission Tables Select the configuration table of the device node, here we must choose System/device_table_dev.txt, otherwise, in the Dev directory will not generate a variety of device nodes. Of course we can also manually configure the file, add the necessary nodes or delete unneeded nodes. Root password is configured to enter the Linux console terminal after the password, empty login without the need for password, the default login user name is root. Select Run Agetty (Login prompt) after boot.

Then go to the Getty options option below:
Configure the TTY port to ttySAC3, configure the baudrate to 115200, and correspond to the printed serial port of the Development Board.

Then go back to the previous interface and set the root filesystem overlay directories to Board/metalboard/exynos4412/rootfs-overlay, This means that all files under this path will unconditionally overwrite the BuildRoot default related path file. While configuring this step, we also copy the relevant files from the Development Board CD to the buildroot corresponding board directory. Returns to the previous interface.

2.4: Enter filesystem images
Select Ext2/3/4root filesystem, then select Ext4 in Ext2/3/4variant, select tar the root filesystem, save the current configuration and exit, and the configuration is complete. You can also be configured according to your actual needs.

In the target packages directory, there are unlimited treasures for everyone to use, and the transplant dog say goodbye

3: Compiling BuildRoot
Simply execute the make command at the root of the buildroot to compile the entire buildroot. The first compilation may cause some bugs to pop up, which is basically not the result of installing some third-party tools. Follow the prompts to install, there are questions asked Niang.
At the beginning of the compilation, BuildRoot will automatically download the relevant source packages needed to automatically compile the installation.

3.1: Download the source package in the BuildRoot root directory of the DL directory

3.2: Compiled files will be placed in the output directory below the BuildRoot directory

3.2.1: The final image file that needs to be burned is in the Output/images directory

3.2.2:output/target directory for the corresponding non-packaged file system, when debugging can be aided by the file in this directory to analyze the reason

4: Compile complete, burn write test.
Burn into the development version with FastBoot

fastboot  flash  system  rootfs.ext4
    • 1
    • 1

Start the Development Board to see printing information

line 9: /proc/sys/kernel/hotplug: No such file or directorymdev: /sys/class: No such file or directory
    • 1
    • 2
    • 3
    • 1
    • 2
    • 3

If the above error is unable to find the HotPlug file, delete the S10mdev file directly on line Nineth. Other situation similar analysis, have questions asked degree Niang. There is usually no big problem.

With BuildRoot, a file system with all the required packages (busy box,vi,qt,ffmpeg, etc.) is done, it is a weapon that allows engineers to focus on the development of core content and avoid tedious repetitive processes. Z

Using BuildRoot to build Linux file system "Go"

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.