1. Android 系统分区结构
partition | size | fs |
-----------+----------+--------+---------------------------------
mtdblk0p1 | 8MiB | none | bootloader
mtdcblk0p2 | 16MiB | vfat | recovery system (kernel/initrd)
mtdblk0p3 | 1024MiB | << extended >>
mtdblk0p5 | 8MiB | vfat | normal kernel, splash, sound
mtdblk0p6 | 64MiB |squashfs| rootfs
mtdblk0p7 | 256MiB | ext3 | android cache
mtdblk0p8 | 256MiB | ext3 | android data
-----------+----------+--------+---------------------------------
zImage Kernel /dev/mtdblk0p2 (FAT); recovery kernel
/dev/mtdblk0p5 (FAT); android kernel
rootfs.sqfs rootfs /dev/mtdblk0p2 (FAT, initrd.img); recovery
/dev/mtdblk0p6 (SquashFS); android rootfs
data /dev/mtdblk0p8 (ext3) android data
2. 烧写 recovery kernel/rootfs
bootload启动后先烧写bootload 和 recovery system(kernel/rootfs) 到mtdblk0p1 ~ mtdblk0p2 分区
3. 进入recovery linux 系统,烧写 andorid 系统
3.1 添加扩展分区mtdblk0p3 和逻辑分区mtdblk0p5 ~ mtdblk0p8
# fdisk /dev/mtdblk0
<这里添加android分区>
mtdblk0p3 | 1024MiB | << extended >>
mtdblk0p5 | 8MiB | vfat | normal kernel, splash, sound
mtdblk0p6 | 64MiB |squashfs| rootfs
mtdblk0p7 | 256MiB | ext3 | application cache
mtdblk0p8 | 256MiB | ext3 | application data
3.2 格式化android data / cache 分区
# mkfs.ext3 /dev/mtdblk0p7
# tune2fs -i0 -c0 /dev/mtdblk0p7
# mkfs.ext3 /dev/mtdblk0p8
# tune2fs -i0 -c0 /dev/mtdblk0p8
3.3 烧写 android kernel 和 rootfs
bootload启动后,烧写android system(kernel/rootfs) 到mtdblk0p5 ~ mtdblk0p6 分区
4.最后设置bootload 从normal模式启动andorid
Android donut 成功不依赖于NFS启动啦!
PS:
制作android rootfs的时候,需要在
先手动mkdir cache 和 data
rootfs/init.rc中需在
# mount mtd partitions 下方添加将ext3 分区挂在到 /cache 和 /data目录
mount ext3 /dev/block/mtdblk0p7 /cache
mount ext3 /dev/block/mtdblk0p8 /data
另外当前我的做法是 直接将android donut 下编译出来的system 目录直接拷贝到rootfs,一并压缩成sqfs 格式。将system单独做成一个分区,然后启动的时候mount 可能是更好的选择.