common: boot_rkimg: append boot media type to bootargs

Android need this property for bring up.

Change-Id: I0fb5367221079e3bfcf36db4e5b58fc994848dcd
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
This commit is contained in:
Joseph Chen 2018-01-03 17:34:09 +08:00
parent 817007c143
commit ec82a6c959
1 changed files with 13 additions and 1 deletions

View File

@ -147,23 +147,35 @@ err:
int get_bootdev_type(void)
{
int type = 0;
char *boot_media = NULL;
static int appended;
#ifdef CONFIG_EMMC_BOOT
type = IF_TYPE_MMC;
boot_media = "storagemedia=emmc";
#endif /* CONFIG_EMMC_BOOT */
#ifdef CONFIG_QSPI_BOOT
type = IF_TYPE_SPI_NAND;
boot_media = "storagemedia=nand";
#endif /* CONFIG_QSPI_BOOT */
#ifdef CONFIG_NAND_BOOT
type = IF_TYPE_RKNAND;
boot_media = "storagemedia=nand";
#endif /* CONFIG_NAND_BOOT */
#ifdef CONFIG_NOR_BOOT
type = IF_TYPE_SPI_NOR;
#endif /* CONFIG_NOR_BOOT */
/* For current use(Only EMMC support!) */
if (!type)
if (!type) {
type = IF_TYPE_MMC;
boot_media = "storagemedia=emmc";
}
if (!appended && boot_media) {
appended = 1;
env_update("bootargs", boot_media);
}
return type;
}