esp32/modules/inisetup.py: Format partition as FAT if its label is ffat.
Signed-off-by: Wind-stormger <storm-wind@foxmail.com>
This commit is contained in:
parent
2ede7c6c21
commit
23fe170da4
@ -37,8 +37,12 @@ by firmware programming).
|
||||
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(
|
||||
|
Loading…
Reference in New Issue
Block a user