(iv) Management of Flash and DDR in pre--uboot of Ubuntu Learning

Source: Internet
Author: User

1. Uboot Stage Flash partition

(1) The so-called partition, that is, the flash of the block management.
(2) PC and other products, because everyone is using the hard disk under the operating system, the entire hard drive by the operating system unified management, the operating system will use the file system to help us manage hard disk space. (management ensures that files don't stack with each other), so users don't have to be too concerned about partitioning issues.
(3) There is no operating system in the Uboot, so we have to use the flash (equivalent to hard disk) management must be used in advance partition definition (in fact, there is a partition table in Uboot and kernel, partition table is the overall management of flash when we do the system migration method). With this definition, we deploy the system in accordance with the partitioning method, and Uboot and kernel also work in accordance with this partition definition.
(4) The partitioning method is not certain, not fixed, and can be changed. However, in a transplant must be designed in advance to die, generally in the design system transplant will be set, the standard is:

Uboot:uboot must be stored from the Flash start address (perhaps sector 0, perhaps sector 1, perhaps other, depending on the SOC's boot design), the size of the Uboot partition must be guaranteed to uboot down, The general design is 512KB or 1MB (because the general uboot certainly less than 512KB, to big can actually also work, but waste);
Environment variables: The environment variable partition is usually kept close to the uboot, size 32KB or more.
Kernel:kernel can be stored close to the environment variables, generally 3MB or 5MB or other.
Rootfs:
The rest is the free partition, the general kernel boot after the free partition mount to rootfs use

Summary: The general rule is as follows:
(1) Each partition is connected to each other, and the end of the previous partition is the beginning of the next partition.
(2) The entire flash is fully utilized, from the beginning to the end.
(3) Uboot must be at the beginning of Flash, the relative position of other partitions is variable.
(4) The size of each partition is determined by the system transplant engineer himself, generally set as the appropriate size (not too small, too small easy overflow; not too big, too big wasted space)
(5) Partitions are determined before the system is migrated, using the same partition table in Uboot and kernel. The partitioning method in future system deployment and system code must also be the same.

2. Uboot stage DDR partition

(1) The partition of DDR and the partition of Flash are different, mainly because the flash is a power-down, and the DDR is lost power, so it can be said that the DDR is used every time the system runs.
(2) The memory partition is mainly before the Linux kernel boot up, the kernel memory management module after the Linux kernel boot will take over the entire memory space, then we do not have to control.
(3) Note that the key to memory partitioning is what is used in memory for what to do must be allocated in order to avoid different functions using the same piece of memory caused by the mutual trampling. For example, we tftp 0x23e00000 zimage to download zimage to the memory of the 0x23e00000 error, because this memory is actually the uboot image is located. This will cause the downloaded zimage to flush out the uboot in memory.

(iv) Management of Flash and DDR in pre--uboot of Ubuntu Learning

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.