Browse Source

esp8266/modules: Mount filesystem at root when creating for first time.

pull/3118/head
Damien George 8 years ago
parent
commit
eea584860d
  1. 2
      esp8266/modules/_boot.py
  2. 3
      esp8266/modules/inisetup.py

2
esp8266/modules/_boot.py

@ -8,6 +8,6 @@ try:
uos.mount(bdev, '/')
except OSError:
import inisetup
vfs = inisetup.setup()
inisetup.setup()
gc.collect()

3
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)

Loading…
Cancel
Save