]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
wic: add 'none' fstype for custom image jansa/dunfell
authorJeongBong Seo <lifeofthanks@gmail.com>
Wed, 10 Aug 2022 08:56:15 +0000 (08:56 +0000)
committerMartin Jansa <martin.jansa@gmail.com>
Tue, 16 Apr 2024 06:56:53 +0000 (08:56 +0200)
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>
scripts/lib/wic/ksparser.py
scripts/lib/wic/plugins/source/rawcopy.py

index 452a160232ced137ae801c134ddcf7fb9c608c1d..85048e5b9668831666a9f8cf4b4f6948f735035b 100644 (file)
@@ -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')
index 3c4997d8ba5e7f09583d9607911e3722da0e9ccd..a71629282d11a0503c0be3ddae279aeb4bbfa07b 100644 (file)
@@ -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'):