From a79c92ee9d732c76e2f333d96a7b9a1330b4ce4c Mon Sep 17 00:00:00 2001 From: Luke Go Date: Wed, 20 May 2020 17:59:33 +0900 Subject: ODROID-COMMON: boot: Chnage ignore_mpt condition. - Before the patch, u-boot set the ignore_mpt flag by checking the boot media. But if user want to boot the OS with other media that doesn't the fisrt boot media, it cause problem. So check the current read media and set other side media as ignore_mpt. Change-Id: Id151c5bb8d4c08376b096c97c485e92133459d9a --- common/bootm.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/common/bootm.c b/common/bootm.c index 6a3e5d50c6..7ce9420fe0 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -345,20 +345,16 @@ static int get_fdto_totalsize(u32 *tz) #endif #if defined(CONFIG_ODROID_COMMON) -extern int get_boot_device(void); static int bootm_add_ignore_mpt_to_fdt(void *fdth) { char *pathp = NULL; int nodeoffset; int ret; - switch (get_boot_device()) { - case 1: // emmc boot - pathp = "/sd/sd"; - break; - case 4: //sd boot - pathp = "/emmc/emmc"; - break; + if (simple_strtol(getenv("mmc_dev"), NULL, 10) == 0) { // emmc boot + pathp = "/sd/sd"; + } else { // sd boot + pathp = "/emmc/emmc"; } nodeoffset = fdt_path_offset (fdth, pathp); -- cgit v1.2.1