启动总体框架

让init进程启动我自己的小程序
1.准备好自己的运用程序:
1.1 写C程序

1.2 写编译配置(Andrio.mk)

1.3 编译:
source build/envsetup.sh -->lunch---> mmm /.../我的源码路径
2.修改初始化脚本,添加一个自启动服务


3.重新生成boot.img
编译生成最新的镜像,因为我们更改了out/target/product/fspad-733/root目录,
这个目录对应的镜像是ramdisk.img,因此现在需要生成最新的ramdisk.img
source
lunch
make ramdisk ----》生成最新的ramdisk.img
因为ramdisk.img发生变化了,并且boot.img中包括ramdisk.img,
而我们最终要烧写的分区是boot分区,因此我们还需要生成最新的boot.img
source
lunch
make bootimage ----->生成最新的boot.img
4.重新生成system.img
另外,由于我们在第三步编译模块之后,
会在out/target/product/fspad733/system/bin/目录下生成可执行文件Hello,
而out/target/product/fspad-733/system/对应的镜像是system.img,
所以我们还需要重新生成system.img
source
lunch
make snod -----》 生成最新的system.img
5.完工,烧写