[笔记分享] [SCons] Qualcomm Build System Images

xiaoxiao2021-02-28  111

From:

80-N2077-7_A_Qualcomm Build System Images.pdf


通过AddLibrary()或者其他methods将libarary and/or object files添加到一个tag中, 这些tag会通过InitImageVars()被加入到images。

InitImageVars():

获取多个参数,告诉scons如何build image,下面是各个参数意义: alias_list: image name proc: processor type,从而选择对应的compiler和compiler option. config: 是apps还是modem build. plat: 默认是l4, 可以忽略。 buildpath: 定义之后会覆盖默认的object/library file dir path name, 忽略不写时由alias_list和proc来产生dir path。 build_tags: 哪些tags(library,object等)需要被加到image中。

images对应的名字可以从aliases这个list中看到,第一个值代表image名字,后面的是别名。 像build boot模块的时候images是boot, jsdcc, emmcble, deviceprogram, boot就是sbl1的别名。 boot模块对应的images的文件如下:

./core/bsp/bootloaders/sbl1/build/msm8x26.scons ./core/bsp/tools/emmcbld/build/SConscript ./core/bsp/tools/deviceprogrammer/build/deviceprogrammer.scons ./core/bsp/tools/jsdcc/build/SConscript

LoadImageUnits():

会寻找’${BUILD_ROOT}//bsp//build’下的image定义文件。 函数在./core/bsp/build/tools/ComSConstruct.py被调用。 函数参数:IMAGE_ROOT_DIR_PATTERNS定义在./tools/build/scons/scripts/defaults.py 当不指定参数时,会用IMAGE_DIR_PATTERNS定义的值查找, 默认是[‘*’]。 此函数查找SCRIPT_NAME_PATTERNS定义的文件,默认是[‘SConscript’, ‘*.scons’]。

CheckAlias():

检查当前image是否在build cmd的参数中,也就是说当前是否需要build, 如果不需要则直接返回不执行脚本后面的build动作了。

转载请注明原文地址: https://www.6miu.com/read-66189.html

最新回复(0)