Embedded development Software Environment: Uboot, Kernel, ROOTFS, data layout analysis

Source: Internet
Author: User

Uboot+linux's holistic approach

The datasheet of the Development Board has a detailed partition of the address space, of which the more important two pieces are: DDR address space and flash address space. DDR space is the operating space of the system and application, which is usually used and managed by the Linux system itself; Flash space is the storage space of the system and application carrier, usually need to be divided before use and managed by the application developer.

Simple examples and instructions.

Among them, the overall address space of Flash is: 0X34000000~0X34FFFFFF, a total of 16MB, using nor flash chip. The work that the layout needs to do is:

    • Determine the size of the Uboot binary file, the address range used
    • Determine the size of the Linux kernel image file, the address range used
    • Determine the image file size of the Rootfs root file system, using a range of addresses
    • Estimate the amount of space required for your overall application, and select the range of addresses you can use

After completing the above work, the project layout is as follows:

    • uboot:0x34000000~0x34080000, 512KB
    • kernel:0x34080000~0x34180000, 1MB, file size 952.8KB
    • rootfs:0x34180000~0x34700000, 5.5MB, file size 3.85MB
    • DATA:0X34700000~0X34FFFFFF, 9MB, file size 3.725MB



to this step has completed the logical layout of the address space, followed by the physical layout of storage space implementation, is to partition the Flash, here can be divided into four areas, corresponding to the four pieces of software, can also be divided into three zones:
mtdparts=phys_mapped_flash:0x180000 (boot), 0x580000 (ROOFS70), 0x900000 (data)

Burn the image file
how to download the corresponding image file above or write to the Development Board, but also related to the burning mode of large batch generation

    • JTAG, or a matching burner, plus a matching software suite, such as CCS, to complete uboot burning
    • Dedicated serial-burning tool to complete the burning of Uboot
    • Use TFTP tool in uboot environment to complete kernel image, Rootfs file, app file burning

The main items are: Burner +tftp (Uboot generally not modified)



use of TFTP tools in the Uboot environment
different uboot versions of the command format and the functionality provided will vary, preferably before using the Help or Reference development instruction manual, the main function is to download files from the server and upload files to the server, the common format is:


-Download file: TFTP <addr> <file>
-Upload files: tftp <addr> <size> <file>
If you are using a NAND flash chip, the download process:


-Download file to memory address
-Erase flash on the corresponding file storage address space
-Write the file contents of the memory address to the corresponding address space on Flash
If you are using the nor flash chip, the download process:


-Storage address space for the corresponding file on erase Flash
-Download the file directly into the address space of the corresponding file in Flash: TFTP 0x34180000 rootfs.jffs2
It is also now possible to start the kernel image directly from nor flash without having to load it into memory before booting:
setenv bootcmd "Bootm 0x34080000"



software burning in batch production

For the production stage of the equipment, the software environment can not be burned according to the process of the development stage, so the efficiency is too low and error-prone for large batches. The simpler, the more efficient the single operation, the less prone to error. The best way to do this is to solve it in one step. The recommended way to do this is:

      • Complete the layout and construction of the entire software environment according to the above content and steps
      • Use the TFTP tool to package the entire contents of the flash into the server, to get a whole scheme image
      • Burn the whole image with the burner to complete the software burning construction of batch original equipment

Embedded development Software Environment: Uboot, Kernel, ROOTFS, data layout analysis

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.