From e62235f8c755b270e478f403d8ac75c5192847ba Mon Sep 17 00:00:00 2001
From: Damien George <damien.p.george@gmail.com>
Date: Fri, 10 Mar 2017 17:14:21 +1100
Subject: [PATCH] esp8266: Change default settings to mount flash at root dir.

---
 esp8266/main.c           | 4 ++--
 esp8266/modules/_boot.py | 4 +---
 esp8266/qstrdefsport.h   | 4 ++--
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/esp8266/main.c b/esp8266/main.c
index 888e58970..e3188dfe4 100644
--- a/esp8266/main.c
+++ b/esp8266/main.c
@@ -50,8 +50,8 @@ STATIC void mp_reset(void) {
     mp_init();
     mp_obj_list_init(mp_sys_path, 0);
     mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR_)); // current dir (or base dir of the script)
-    mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_flash_slash_lib));
-    mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_flash));
+    mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_lib));
+    mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_));
     mp_obj_list_init(mp_sys_argv, 0);
     MP_STATE_PORT(term_obj) = MP_OBJ_NULL;
     MP_STATE_PORT(dupterm_arr_obj) = MP_OBJ_NULL;
diff --git a/esp8266/modules/_boot.py b/esp8266/modules/_boot.py
index 954a9ee28..52683693d 100644
--- a/esp8266/modules/_boot.py
+++ b/esp8266/modules/_boot.py
@@ -5,9 +5,7 @@ from flashbdev import bdev
 
 try:
     if bdev:
-        vfs = uos.VfsFat(bdev)
-        uos.mount(vfs, '/flash')
-        uos.chdir('/flash')
+        uos.mount(bdev, '/')
 except OSError:
     import inisetup
     vfs = inisetup.setup()
diff --git a/esp8266/qstrdefsport.h b/esp8266/qstrdefsport.h
index 676b3bae7..7610eb33d 100644
--- a/esp8266/qstrdefsport.h
+++ b/esp8266/qstrdefsport.h
@@ -27,5 +27,5 @@
 // qstrs specific to this port, only needed if they aren't auto-generated
 
 // Entries for sys.path
-Q(/flash)
-Q(/flash/lib)
+Q(/)
+Q(/lib)
-- 
GitLab