Android eMMC 分区详解

1. fastboot flash boot boot.img

    当使用上述命令写入编译的Image时,fastboot做了些什么?基于那些信息把Image写到哪里呢?

    Android的每一款产品,都有一个partition.xml描述,有关分区的信息。下面是一个例子。

2. eMMC 分区表

Partition#Name#Size#Strat LBA-End LBRDescription#
0MBR & GPT 0x00000000-0x000000FFMaster Boot Record and GUID Partition Table
1x-loader(MLO)256KB0x00000100-0x000001FFFirst stage bootloader
2bootloader(u-boot.bin)384KB0x00000200-0x000005FFSecond stage bootloader
3misc128KB0x00000600-0x000006FFReserved.This partition can be used for internal purpose
4recovery (zImage + recovery-ramdisk.img)8MB0x00000A00-0x000049FFrecovery partition
5boot (boot.img = zImage + ramdisk.img)8MB0x00004A00-0x000089FFPartition contains kernel + ramdisk images.
6system (system.img)256MB0x00008A00-0x000889FFandroid file system
7cache (cache.img)32MB0x00088A00-0x000989FFPartition will be used to store application cache
8userdata (userdata.img)32MB0x00098A00-0x000A89FFPartition contains userdata supplied by oem vendor like configuration files,utilities etc..
9mediaRemaining0x000A8A00-0x00762761Partition contains media files; supplied by oem vendor
 

    这是一个TI芯片的分区表 http://processors.wiki.ti.com/index.php/Android_gingerbread_eMMC_booting

    分区表定义了每个分区的起始地址和大小。Partition 0存放了所有的分区信息。

    不同的硬件可以根据需要调整相应的分区大小。TI和Qcom平台采用的方式不同,但原理相同。

    手机Boot时,BootLoader(LK, uboot)从eMMC的第一个分区读取MBR信息,构建一个分区表。

3. 获取分区信息,烧写Image文件

      有了上一步构建的分区表,fastboot 可以查询 boot分区的起始地址,根据起始地址,fastboot可以调用eMMC写指令把Image文件烧写到相应的eMMC地址。



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值