ramdisk.img的生成过程

 ramdisk.img是组成boot.img的重要部分,从Android/build/core/Makefile中可以看到ramdisk.img的生成该过程.

    # the ramdisk
    INTERNAL_RAMDISK_FILES := $(filter $(TARGET_ROOT_OUT)/%, \  $(ALL_PREBUILT) \ $(ALL_COPIED_HEADERS) \
     $(ALL_GENERATED_SOURCES)   $(ALL_DEFAULT_INSTALLED_MODULES))

    BUILT_RAMDISK_TARGET := $(PRODUCT_OUT)/ramdisk.img
    INSTALLED_RAMDISK_TARGET := $(BUILT_RAMDISK_TARGET)
    $(INSTALLED_RAMDISK_TARGET): $(MKBOOTFS) $(INTERNAL_RAMDISK_FILES) | $(MINIGZIP)
    ...
     $(hide) $(MKBOOTFS) $(TARGET_ROOT_OUT) | $(MINIGZIP) > $@

    ramdisk.img是用mkbootfs工具从out/target/product/tcc8900/root目录制作得到,

所以,需要把注意力转移到out/target/product/tcc8900/root目录及其内容是如何生成的这一主题上来。

其实,ALL_PREBUILT包含了root目录中的大多数内容,另外的ALL_COPIED_HEADERS,ALL_GENERATED_SOURCES

暂时不予以考虑。以下列表列出了与out/target/product/tcc8900/root生成相关的文件:

    /init.goldfish.rc------------------->Android/system/core/rootdir/etc/init.goldfish.rc
    /init.rc         ------------------->device/telechips/tcc92xx-common/init.rc

如果device/telechips/tcc92xx-common/init.rc不才存在,将使用Android/system/core/rootdir/etc/init.rc文件

    /sbin(create)-------------------------------->Android/system/core/rootdir/Android.mk
    /dev(create)--------------------------------->Android/system/core/rootdir/Android.mk
    /proc(create)-------------------------------->Android/system/core/rootdir/Android.mk
    /sys(create)--------------------------------->Android/system/core/rootdir/Android.mk
    /system(create)------------------------------>Android/system/core/rootdir/Android.mk
    /data(create)-------------------------------->Android/system/core/rootdir/Android.mk
    /sbin/adbd(compile)-------------------------->Android/system/core/adb/Android.mk
    /init(compile)------------------------------->Android/system/core/init/Android.mk
    /sbin/timetest(compile)---------------------->Android/system/core/extras/timeinfo/Android.mk
    /lib/modules/tcc92x_nand.ko(copy)------------>Android/hardware/telechips/nand/Makefile
    /lib/modules/ufsd.ko(copy)------------------->Android/telechips/tcc92xx-common/Android.mk
    /lib/modules/viqe.ko(copy)------------------->Android/telechips/tcc92xx-common/Android.mk

至于其他的诸如/config , /cache, /nand,/inand,/mnt,/mnt/nand,/sata,/scisi,/app-cache等目录都在init.rc中被创建。

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值