summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/tizen/sd_fusing.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/tizen/sd_fusing.py b/scripts/tizen/sd_fusing.py
index 3952681402..e6b5877678 100755
--- a/scripts/tizen/sd_fusing.py
+++ b/scripts/tizen/sd_fusing.py
@@ -473,6 +473,15 @@ def mkpart(args, target):
if proc.returncode != 0:
log.error(f"Failed to create ext4 filesystem on {d}")
sys.exit(1)
+ elif part['fstype'] == 'swap':
+ argv = ['mkswap', '-L', part['name'], d]
+ logging.debug(" ".join(argv))
+ proc = subprocess.run(argv,
+ stdin=subprocess.DEVNULL,
+ stdout=None, stderr=None)
+ if proc.returncode != 0:
+ log.error(f"Failed to format swap partition {d}")
+ sys.exit(1)
elif part['fstype'] == 'raw':
pass
target.initialize_parameters()