Qc amss build system

Source: Internet
Author: User

After all, the AMSS makefile is complete. Compared with Android, the QC makefile is still relatively poor. The architecture is not clear and there are many repeated rules. To add a module, You need to judge it three times, module path, module *. min must be judged once, and the module's OBJ file must be judged once. In addition, the basic target adds a mandatory target as the dependency, causing many targets to be forcibly updated during each compilation, this indirectly leads to a special length of time for each compilation.

AMSS uses make-C to separate and compile qcsbl/oemsbl/pai_data/partition/AMSS/flash_tool, which is much easier to implement than the android modules, however, I personally think this can easily lead to confusion between the parent make and the child make variables, especially when so many export variables are involved. I won't talk much about it. Let's take a look at this set of make ~~

Although the architecture is not clear, this set of make still has a general system structure:

 

First, define some global variables. Most of these variables are paths, and some flags related to chips and compilers. The most important global variable is uses_xxx, this type of variable defines what modules should be compiled into the system at last. After defining these global variables, the following are some compilation options related to the compiler (rvct), such as the CPU structure, time-first or space-First compilation, and some initialized cflags/aflags/lcflags. After the global variables and compiler are selected, the following is the module to be compiled. qc places the module in three parts: the module path and the module local make file *. min. The last one is the OBJ file to be generated by the module. I personally think that this separation results in a very messy module, and the efficiency is still relatively low when everything needs to come three times. After learning about the modules to be compiled, we finally need to generate a series of rules for the final goal, including the generation of. O and final IMG rules. The following is a description of a slightly comparative message:

 

The final goal of AMSS make is DMSs, which is defined in dmss_rules.min. One of its most important dependencies, Boot, is defined in boot_targets_nonsec.min. This boot defines most of the rules generated by IMG:


Except that AMSS. MBN and amsshd. MBN are generated in the DMSs master make, other IMG are generated in the sub-make. Partition. MBN is relatively simple. oemsbl and qcsbl basically adopt the same architecture as DMSs. Here I just drew a simple picture:

 

Because we use Android LK directly, we don't need to. Just comment it out in dmss_rules.min. Basically, this set of make is clear here. Let's take a look at how to determine whether a module is compiled, of course, if we know whether a module is compiled, we can also clearly know how to add and remove a module.

 

 

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.