From 239abbf15f971b8971ab641ab5a4f7e44c431b88 Mon Sep 17 00:00:00 2001 From: Grazvydas Ignotas Date: Wed, 6 Jul 2016 01:59:26 +0300 Subject: [PATCH] pandora: fix card selection for bootfile scan --- board/pandora/menu.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/board/pandora/menu.c b/board/pandora/menu.c index d14527ba52..d167c2d1fc 100644 --- a/board/pandora/menu.c +++ b/board/pandora/menu.c @@ -197,10 +197,10 @@ static struct menu_item default_menu_items[] = { static void do_mmc(int dev_id) { - static const char *check_format1 = "%sload mmc1 %d:%d ${loadaddr} boot.scr 4"; - static const char *check_format2 = "%sload mmc1 %d:%d ${loadaddr} boot.txt 4"; - static const char *run_format1 = "%sload mmc1 %d:%d ${loadaddr} boot.scr;source ${loadaddr}"; - static const char *run_format2 = "%sload mmc1 %d:%d ${loadaddr} boot.txt;ssource ${loadaddr} ${filesize}"; + static const char *check_format1 = "%sload mmc %d:%d ${loadaddr} boot.scr 4"; + static const char *check_format2 = "%sload mmc %d:%d ${loadaddr} boot.txt 4"; + static const char *run_format1 = "%sload mmc %d:%d ${loadaddr} boot.scr;source ${loadaddr}"; + static const char *run_format2 = "%sload mmc %d:%d ${loadaddr} boot.txt;ssource ${loadaddr} ${filesize}"; disk_partition_t part_info; block_dev_desc_t *dev_desc; char tmp_name[32], tmp_cmd[128]; @@ -253,16 +253,22 @@ static void menu_init(void) menu_items[i] = &default_menu_items[i]; menu_item_count = i; - if (do_cmd("mmc rescan")) + if (do_cmd("mmc dev 0 && mmc rescan")) { /* kill stdout while we search for bootfiles */ setenv("stdout", "nulldev"); - do_mmc(0); + setenv("stdout", "serial"); + } + + if (do_cmd("mmc dev 1 && mmc rescan")) + { + setenv("stdout", "nulldev"); do_mmc(1); + setenv("stdout", "serial"); } - setenv("stdout", "serial"); + do_cmd("mmc dev 0"); if (do_cmd("ubi part boot && ubifsmount boot")) { ulong addr = getenv_ulong("loadaddr", 16, 0); -- 2.39.2