diff options
author | JeongBong Seo <lifeofthanks@gmail.com> | 2022-08-10 08:56:15 +0000 |
---|---|---|
committer | Martin Jansa <martin.jansa@gmail.com> | 2023-09-17 09:17:19 +0200 |
commit | 962685e50a831752d645dd45d1e7383af05e2cc6 (patch) | |
tree | 828ed53c21e4403b732b06ad9b3a1a2f61038523 | |
parent | dba936c2ca4869848ff7ad4f94cc0c99d90886fa (diff) | |
download | openembedded-core-contrib-jansa/dunfell.tar.gz |
wic: add 'none' fstype for custom imagejansa/dunfell
It's not possible to set the label (of gpt entry) normally
when I want to use non-listed fstype as a rawcopy.
Example)
part ? --source rawcopy --ondisk mmcblk0 --label mypart --sourceparams file=mypart.raw
To resolve this problem, this patch addes a 'none' fstype
and ignore do_image_label on rawcopy (that actually set the partition label.)
Signed-off-by: JeongBong Seo <jb.seo@lge.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-rw-r--r-- | scripts/lib/wic/ksparser.py | 3 | ||||
-rw-r--r-- | scripts/lib/wic/plugins/source/rawcopy.py | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py index 452a160232..85048e5b96 100644 --- a/scripts/lib/wic/ksparser.py +++ b/scripts/lib/wic/ksparser.py @@ -157,7 +157,8 @@ class KickStart(): part.add_argument('--fsoptions', dest='fsopts') part.add_argument('--fstype', default='vfat', choices=('ext2', 'ext3', 'ext4', 'btrfs', - 'squashfs', 'vfat', 'msdos', 'swap')) + 'squashfs', 'vfat', 'msdos', + 'swap', 'none')) part.add_argument('--mkfs-extraopts', default='') part.add_argument('--label') part.add_argument('--use-label', action='store_true') diff --git a/scripts/lib/wic/plugins/source/rawcopy.py b/scripts/lib/wic/plugins/source/rawcopy.py index 3c4997d8ba..a71629282d 100644 --- a/scripts/lib/wic/plugins/source/rawcopy.py +++ b/scripts/lib/wic/plugins/source/rawcopy.py @@ -21,6 +21,10 @@ class RawCopyPlugin(SourcePlugin): @staticmethod def do_image_label(fstype, dst, label): + # don't create label when fstype is none + if fstype == 'none': + return + if fstype.startswith('ext'): cmd = 'tune2fs -L %s %s' % (label, dst) elif fstype in ('msdos', 'vfat'): |