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