# 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中被创建。