|
|
@ -145,17 +145,24 @@ static void *fit_get_blob(struct blk_desc *dev_desc, |
|
|
|
char *part_name; |
|
|
|
void *fit, *fdt; |
|
|
|
int blk_num; |
|
|
|
int part_id; |
|
|
|
char part_str[8]; |
|
|
|
|
|
|
|
if (rockchip_get_boot_mode() == BOOT_MODE_RECOVERY) |
|
|
|
part_name = PART_RECOVERY; |
|
|
|
else |
|
|
|
part_name = PART_BOOT; |
|
|
|
|
|
|
|
if (part_get_info_by_name(dev_desc, part_name, &part) < 0) { |
|
|
|
if ((part_id = part_get_info_by_name(dev_desc, part_name, &part)) < 0) { |
|
|
|
FIT_I("No %s partition\n", part_name); |
|
|
|
return NULL; |
|
|
|
} |
|
|
|
|
|
|
|
/* {{{: fix distro_bootpart */ |
|
|
|
snprintf(part_str, sizeof (part_str), "%d", part_id); |
|
|
|
env_set("distro_bootpart", part_str); |
|
|
|
/* }}} */ |
|
|
|
|
|
|
|
*out_part = part; |
|
|
|
blk_num = DIV_ROUND_UP(sizeof(struct fdt_header), dev_desc->blksz); |
|
|
|
fdt = memalign(ARCH_DMA_MINALIGN, blk_num * dev_desc->blksz); |
|
|
|