All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] wic: add 'none' fstype for custom image
@ 2022-08-08  4:57 JeongBong Seo
  2022-08-10  7:48 ` [OE-core] " Alexandre Belloni
  0 siblings, 1 reply; 5+ messages in thread
From: JeongBong Seo @ 2022-08-08  4:57 UTC (permalink / raw)
  To: openembedded-core; +Cc: JeongBong Seo

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>
---
 scripts/lib/wic/ksparser.py               | 2 +-
 scripts/lib/wic/plugins/source/rawcopy.py | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py
index 452a160232..298e593ad4 100644
--- a/scripts/lib/wic/ksparser.py
+++ b/scripts/lib/wic/ksparser.py
@@ -157,7 +157,7 @@ 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'):
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [OE-core] [PATCH] wic: add 'none' fstype for custom image
  2022-08-08  4:57 [PATCH] wic: add 'none' fstype for custom image JeongBong Seo
@ 2022-08-10  7:48 ` Alexandre Belloni
  2022-08-10  8:59   ` lifeofthanks
  0 siblings, 1 reply; 5+ messages in thread
From: Alexandre Belloni @ 2022-08-10  7:48 UTC (permalink / raw)
  To: JeongBong Seo; +Cc: openembedded-core, JeongBong Seo

Hello,

On 08/08/2022 04:57:10+0000, JeongBong Seo wrote:
> 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>
> ---
>  scripts/lib/wic/ksparser.py               | 2 +-
>  scripts/lib/wic/plugins/source/rawcopy.py | 4 ++++
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py
> index 452a160232..298e593ad4 100644
> --- a/scripts/lib/wic/ksparser.py
> +++ b/scripts/lib/wic/ksparser.py
> @@ -157,7 +157,7 @@ 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'))

This doesn't apply on master, can you rebase please?

>          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'):
> -- 
> 2.17.1
> 

> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#169013): https://lists.openembedded.org/g/openembedded-core/message/169013
> Mute This Topic: https://lists.openembedded.org/mt/92886214/3617179
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alexandre.belloni@bootlin.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [OE-core] [PATCH] wic: add 'none' fstype for custom image
  2022-08-10  7:48 ` [OE-core] " Alexandre Belloni
@ 2022-08-10  8:59   ` lifeofthanks
  2022-08-10  9:11     ` Quentin Schulz
  0 siblings, 1 reply; 5+ messages in thread
From: lifeofthanks @ 2022-08-10  8:59 UTC (permalink / raw)
  To: Alexandre Belloni; +Cc: openembedded-core, JeongBong Seo

Thanks!
I resent it after the master rebase.

How can I request to merge this patch to the dunfell branch?

Regards,
JB

> 2022. 8. 10. 오후 4:48, Alexandre Belloni <alexandre.belloni@bootlin.com> 작성:
> 
> Hello,
> 
>> On 08/08/2022 04:57:10+0000, JeongBong Seo wrote:
>> 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>
>> ---
>> scripts/lib/wic/ksparser.py               | 2 +-
>> scripts/lib/wic/plugins/source/rawcopy.py | 4 ++++
>> 2 files changed, 5 insertions(+), 1 deletion(-)
>> 
>> diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py
>> index 452a160232..298e593ad4 100644
>> --- a/scripts/lib/wic/ksparser.py
>> +++ b/scripts/lib/wic/ksparser.py
>> @@ -157,7 +157,7 @@ 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'))
> 
> This doesn't apply on master, can you rebase please?
> 
>>         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'):
>> -- 
>> 2.17.1
>> 
> 
>> 
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#169013): https://lists.openembedded.org/g/openembedded-core/message/169013
>> Mute This Topic: https://lists.openembedded.org/mt/92886214/3617179
>> Group Owner: openembedded-core+owner@lists.openembedded.org
>> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alexandre.belloni@bootlin.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>> 
> 
> 
> -- 
> Alexandre Belloni, co-owner and COO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [OE-core] [PATCH] wic: add 'none' fstype for custom image
  2022-08-10  8:59   ` lifeofthanks
@ 2022-08-10  9:11     ` Quentin Schulz
  0 siblings, 0 replies; 5+ messages in thread
From: Quentin Schulz @ 2022-08-10  9:11 UTC (permalink / raw)
  To: JeongBong Seo, Alexandre Belloni; +Cc: openembedded-core, JeongBong Seo

Hi JB,

On 8/10/22 10:59, JeongBong Seo wrote:
> Thanks!
> I resent it after the master rebase.
> 

If there was a need to rebase (i.e. a git conflict when applying the 
patch on top of latest master), you need to say it's a new version in 
the patchset, this is usually done by passing -v 2 to git format-patch. 
If there was no need for it, a ping on the original mail or a patch with 
the [RESEND] tag would have worked too.

> How can I request to merge this patch to the dunfell branch?
> 

Once **merged** in our master branch, you can request the patch to be 
backported to older still-maintained branches (i.e. dunfell and 
kirkstone) by sending a patch with [dunfell] tag before the [PATCH] tag. 
Your patch needs to fit our backporting criteria (bug or security fix 
usually). This is appreciated by maintainers though not always 
necessary: they usually follow what's going into master and sometimes 
backport interesting patches without requests. Better send a patch if 
you really want/need a patch to be backported though, it helps them :).

Cheers,
Quentin


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] wic: add 'none' fstype for custom image
@ 2022-08-10  8:56 JeongBong Seo
  0 siblings, 0 replies; 5+ messages in thread
From: JeongBong Seo @ 2022-08-10  8:56 UTC (permalink / raw)
  To: openembedded-core; +Cc: JeongBong Seo

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>
---
 scripts/lib/wic/ksparser.py               | 2 +-
 scripts/lib/wic/plugins/source/rawcopy.py | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py
index a49b7b97c4..d1e546b12d 100644
--- a/scripts/lib/wic/ksparser.py
+++ b/scripts/lib/wic/ksparser.py
@@ -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')
diff --git a/scripts/lib/wic/plugins/source/rawcopy.py b/scripts/lib/wic/plugins/source/rawcopy.py
index 7c90cd3cf8..88614e9208 100644
--- a/scripts/lib/wic/plugins/source/rawcopy.py
+++ b/scripts/lib/wic/plugins/source/rawcopy.py
@@ -23,6 +23,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'):
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-08-10  9:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-08  4:57 [PATCH] wic: add 'none' fstype for custom image JeongBong Seo
2022-08-10  7:48 ` [OE-core] " Alexandre Belloni
2022-08-10  8:59   ` lifeofthanks
2022-08-10  9:11     ` Quentin Schulz
2022-08-10  8:56 JeongBong Seo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.