.. | .. |
---|
31 | 31 | #define CONFIG_FASTBOOT_MBR_NAME "mbr" |
---|
32 | 32 | #endif |
---|
33 | 33 | |
---|
| 34 | +#ifndef CONFIG_FASTBOOT_IDBLOCK_NAME |
---|
| 35 | +#define CONFIG_FASTBOOT_IDBLOCK_NAME "idblock" |
---|
| 36 | +#endif |
---|
| 37 | + |
---|
| 38 | +#define CONFIG_FASTBOOT_MMC_BLOCK_SIZE 512 |
---|
| 39 | +#define CONFIG_FASTBOOT_IDBLOCK_SECTOR 64 |
---|
| 40 | +/* idblock sector:64 ~ 64 + 5 * 1024(512K for each MiniloadAll.bin) */ |
---|
| 41 | +#define CONFIG_FASTBOOT_IDBLOCK_SECTOR_SIZE 5184 |
---|
| 42 | + |
---|
34 | 43 | #define BOOT_PARTITION_NAME "boot" |
---|
35 | 44 | #define FASTBOOT_MAX_BLK_WRITE 16384 |
---|
36 | 45 | static ulong timer; |
---|
.. | .. |
---|
363 | 372 | } |
---|
364 | 373 | #endif |
---|
365 | 374 | |
---|
| 375 | + if (strcmp(cmd, CONFIG_FASTBOOT_IDBLOCK_NAME) == 0) { |
---|
| 376 | + printf("%s: updating IDBLOCK\n", __func__); |
---|
| 377 | + info.blksz = CONFIG_FASTBOOT_MMC_BLOCK_SIZE; |
---|
| 378 | + info.start = CONFIG_FASTBOOT_IDBLOCK_SECTOR; |
---|
| 379 | + info.size = CONFIG_FASTBOOT_IDBLOCK_SECTOR_SIZE; |
---|
| 380 | + goto download; |
---|
| 381 | + } |
---|
| 382 | + |
---|
366 | 383 | #ifdef CONFIG_ANDROID_BOOT_IMAGE |
---|
367 | 384 | if (strncasecmp(cmd, "zimage", 6) == 0) { |
---|
368 | 385 | fb_mmc_update_zimage(dev_desc, download_buffer, download_bytes, response); |
---|
.. | .. |
---|
376 | 393 | return; |
---|
377 | 394 | } |
---|
378 | 395 | |
---|
| 396 | +download: |
---|
379 | 397 | if (is_sparse_image(download_buffer)) { |
---|
380 | 398 | struct fb_mmc_sparse sparse_priv; |
---|
381 | 399 | struct sparse_storage sparse; |
---|