From eea584860dc65203dcae407819c2f139c1f71214 Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 26 May 2017 17:05:58 +1000 Subject: [PATCH] esp8266/modules: Mount filesystem at root when creating for first time. --- esp8266/modules/_boot.py | 2 +- esp8266/modules/inisetup.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/esp8266/modules/_boot.py b/esp8266/modules/_boot.py index 52683693d4..81eb20dd63 100644 --- a/esp8266/modules/_boot.py +++ b/esp8266/modules/_boot.py @@ -8,6 +8,6 @@ try: uos.mount(bdev, '/') except OSError: import inisetup - vfs = inisetup.setup() + inisetup.setup() gc.collect() diff --git a/esp8266/modules/inisetup.py b/esp8266/modules/inisetup.py index 29421e7923..af78dfad51 100644 --- a/esp8266/modules/inisetup.py +++ b/esp8266/modules/inisetup.py @@ -38,8 +38,7 @@ def setup(): wifi() uos.VfsFat.mkfs(bdev) vfs = uos.VfsFat(bdev) - uos.mount(vfs, '/flash') - uos.chdir('/flash') + uos.mount(vfs, '/') with open("boot.py", "w") as f: f.write("""\ # This file is executed on every boot (including wake-boot from deepsleep)