diff options
author | Luke Go <sangch.go@gmail.com> | 2020-05-20 17:59:33 +0900 |
---|---|---|
committer | Dongjin Kim <tobetter@gmail.com> | 2020-05-22 14:09:42 +0900 |
commit | a79c92ee9d732c76e2f333d96a7b9a1330b4ce4c (patch) | |
tree | 027af9dc330768076515c18e03b4a4749cee1281 | |
parent | 85cd80f0c23a6a69d4ad1c63ea65be3dad4df800 (diff) | |
download | u-boot-odroid-c1-a79c92ee9d732c76e2f333d96a7b9a1330b4ce4c.tar.gz |
ODROID-COMMON: boot: Chnage ignore_mpt condition.travis/odroidn2-127travis/odroidc4-127
- 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
-rw-r--r-- | common/bootm.c | 12 |
1 files 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); |