MA-14712 change androidboot.storage_type to androidboot.boot_device_root
authorJindong <jindong.yue@nxp.com>
Mon, 13 May 2019 10:10:25 +0000 (18:10 +0800)
committerfaqiang.zhu <faqiang.zhu@nxp.com>
Mon, 15 Jul 2019 07:11:27 +0000 (15:11 +0800)
storage_type is emmc or sd, which is not friendly
for user space, for example android health HAL need access
/sys/block/mmcblkX/stat.

Replace it with mmcblkX named as boot_device_root.
(Keep storage_type for compatibility now)

Change-Id: I7486d522696e9fe3dde8bdc8834ac11d25df7d79
Signed-off-by: Jindong <jindong.yue@nxp.com>
common/image-android.c

index 98d4e14..20b4672 100644 (file)
@@ -146,6 +146,10 @@ int android_image_get_kernel(const struct andr_img_hdr *hdr, int verify,
                strncat(commandline, newbootargs, sizeof(commandline) - strlen(commandline));
        }
 
+       sprintf(newbootargs,
+                       " androidboot.boot_device_root=mmcblk%d", mmc_map_to_kernel_blk(mmc_get_env_dev()));
+       strncat(commandline, newbootargs, sizeof(commandline) - strlen(commandline));
+
        char *storage_type = env_get("storage_type");
        if (storage_type) {
                sprintf(newbootargs,