Skip to content

Commit

Permalink
esp32/modules/inisetup.py: Format partition as FAT if its label is ffat.
Browse files Browse the repository at this point in the history
Signed-off-by: Wind-stormger <storm-wind@foxmail.com>
  • Loading branch information
Wind-stormger authored and dpgeorge committed Jun 25, 2023
1 parent 2ede7c6 commit 23fe170
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ports/esp32/modules/inisetup.py
Expand Up @@ -37,8 +37,12 @@ def fs_corrupted():
def setup():
check_bootsec()
print("Performing initial setup")
os.VfsLfs2.mkfs(bdev)
vfs = os.VfsLfs2(bdev)
if bdev.info()[4] == "vfs":
os.VfsLfs2.mkfs(bdev)
vfs = os.VfsLfs2(bdev)
elif bdev.info()[4] == "ffat":
os.VfsFat.mkfs(bdev)
vfs = os.VfsFat(bdev)
os.mount(vfs, "/")
with open("boot.py", "w") as f:
f.write(
Expand Down

0 comments on commit 23fe170

Please sign in to comment.