Android 系统编译顺序

从我的理解来看,

. build/eventsetup.h 初始化了编译需要的函数。 如:

Invoke ". build/envsetup.sh" from your shell to add the following functions to your environment:
- lunch:   lunch <product_name>-<build_variant>
- tapas:   tapas [<App1> <App2> ...] [arm|x86|mips] [eng|userdebug|user]
- croot:   Changes directory to the top of the tree.
- m:       Makes from the top of the tree.
- mm:      Builds all of the modules in the current directory.
- mmm:     Builds all of the modules in the supplied directories.
- cgrep:   Greps on all local C/C++ files.
- jgrep:   Greps on all local Java files.
- resgrep: Greps on all local res/*.xml files.
- godir:   Go to the directory containing a file.

lunch X-eng

X 是TARGET_PRODUCT

eng是TARGET_BUILD_VARIANT


/build/envsetup.sh中使用

# Execute the contents of any vendorsetup.sh files we can find.
for f in `test -d device && find device -maxdepth 6 -name 'vendorsetup.sh' 2> /dev/null` \
         `test -d vendor && find vendor -maxdepth 6 -name 'vendorsetup.sh' 2> /dev/null`
do
    echo "including $f"
    . $f
done
unset f


将vendor/和device下的envsetup.sh引入。

我们在Vendor/*/vendorsetup.sh中

add_lunch_combo X-eng
add_lunch_combo X-userdebug

将以上build 名称添加到envsetup.sh中。


在make X的时候,

X_base.mk中会引入build下的mk文件执行。

# Superclass
$(call inherit-product, build/target/product/full_base_tablet.mk)

# To get support Location Service
$(call inherit-product, build/target/product/generic_no_telephony.mk)

# product locales configuration
$(call inherit-product, build/target/product/locales_full.mk)

# Include Dalvik Heap Size Configuration
$(call inherit-product, vendor/intel/common/dalvik/tablet-mdpi-1024-dalvik-heap.mk)


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值