]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
wic: add 'none' fstype for custom image
authorJeongBong Seo <lifeofthanks@gmail.com>
Wed, 10 Aug 2022 08:56:15 +0000 (08:56 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 12 Aug 2022 18:22:01 +0000 (19:22 +0100)
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 a49b7b97c4eae8980b3a02ec75d26af0cc72a23f..d1e546b12d0bc04f9ae2806813d534a4c08d6c2a 100644 (file)
@@ -159,7 +159,7 @@ class KickStart():
         part.add_argument('--fstype', default='vfat',
                           choices=('ext2', 'ext3', 'ext4', 'btrfs',
                                    'squashfs', 'vfat', 'msdos', 'erofs',
-                                   'swap'))
+                                   'swap', 'none'))
         part.add_argument('--mkfs-extraopts', default='')
         part.add_argument('--label')
         part.add_argument('--use-label', action='store_true')
index 8101efcb28370a0c9a7bef78a0c53579462f998a..ccf332554e5d1a72f4972624dd1a1e1fa8add0de 100644 (file)
@@ -25,6 +25,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'):