From: Łukasz Stelmach Date: Fri, 24 Nov 2023 10:55:12 +0000 (+0100) Subject: scripts: add support for "swap" filesystem type X-Git-Tag: accepted/tizen/unified/20231211.095412~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F45%2F301845%2F2;p=platform%2Fkernel%2Fu-boot.git 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 --- diff --git a/scripts/tizen/sd_fusing.py b/scripts/tizen/sd_fusing.py index 3952681..e6b5877 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()