summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorŁukasz Stelmach <l.stelmach@samsung.com>2023-11-24 11:55:12 +0100
committerSeung-Woo Kim <sw0312.kim@samsung.com>2023-11-27 01:53:21 +0000
commitf44dc01eee65c3ed232f4acb2a1ee57c87164b88 (patch)
tree54ee93d97803f0d26d5b2f96e5f8f15de78e0bf3
parent81148d5c8c3d176f8d33b7b8abe2767b9db3fce2 (diff)
downloadu-boot-f44dc01eee65c3ed232f4acb2a1ee57c87164b88.tar.gz
u-boot-f44dc01eee65c3ed232f4acb2a1ee57c87164b88.tar.bz2
u-boot-f44dc01eee65c3ed232f4acb2a1ee57c87164b88.zip
scripts: add support for "swap" filesystem type
Run mkswap(8) for partitions with have their fstype set to "swap". x86 emulator images require swap partition to be present. Change-Id: Ia8e9be666f1f2c587396b8e11bf515d02370a2ad Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
-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()