mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 19:20:22 +01:00
esp8266/modules: Mount filesystem at root when creating for first time.
This commit is contained in:
@@ -8,6 +8,6 @@ try:
|
||||
uos.mount(bdev, '/')
|
||||
except OSError:
|
||||
import inisetup
|
||||
vfs = inisetup.setup()
|
||||
inisetup.setup()
|
||||
|
||||
gc.collect()
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user