Browse Source

【修改】修改imx6ull-smart中mnt.c的逻辑错误 (#9045)

* Update mnt.c

* Update mnt.c

* Update mnt.c

* Add files via upload

* Update mnt.c

* Update mnt.c
zhuzhuzhu 10 months ago
parent
commit
58e42caea7

+ 9 - 12
bsp/nxp/imx/imx6ull-smart/applications/mnt.c

@@ -22,23 +22,20 @@ int mnt_init(void)
     int part_id = 0;
     int part_id = 0;
     if (dfs_mount("emmc0", "/", "elm", 0, (void *)part_id) != 0)
     if (dfs_mount("emmc0", "/", "elm", 0, (void *)part_id) != 0)
     {
     {
-        rt_kprintf("Dir / emmc mount failed!\n");
-        return -1;
+        if (dfs_mount("sd0", "/", "elm", 0, (void *)part_id) != 0)
+        {
+            rt_kprintf("Dir / mount failed!\n");
+            return -1;
+        }
+        else
+        {
+            rt_kprintf("sd0 file system initialization done!\n");
+        }
     }
     }
     else
     else
     {
     {
         rt_kprintf("emmc file system initialization done!\n");
         rt_kprintf("emmc file system initialization done!\n");
     }
     }
-
-    if (dfs_mount("sd0", "/", "elm", 0, (void *)part_id) != 0)
-    {
-        rt_kprintf("Dir / mount failed!\n");
-        return -1;
-    }
-    else
-    {
-        rt_kprintf("sd0 file system initialization done!\n");
-    }
 #else
 #else
     rt_thread_mdelay(500);
     rt_thread_mdelay(500);
     if (dfs_mount(NULL, "/", "rom", 0, &romfs_root) != 0)
     if (dfs_mount(NULL, "/", "rom", 0, &romfs_root) != 0)

BIN
bsp/nxp/imx/imx6ull-smart/emmc/image/input/u-boot-dtb.imx