All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [master/scarthgap/kirkstone][PATCH v2] wic: prevent boot FAT partition mounting under /boot
@ 2024-04-24 22:36 Denys Dmytriyenko
  2024-04-24 22:46 ` [meta-ti] " Jon Cormier
  0 siblings, 1 reply; 4+ messages in thread
From: Denys Dmytriyenko @ 2024-04-24 22:36 UTC (permalink / raw)
  To: meta-ti; +Cc: Denys Dmytriyenko

From: Denys Dmytriyenko <denys@konsulko.com>

Separate FAT boot partition holds SPL, SYSFW and U-boot images, while
rootfs places kernel images and DTBs into /boot directory. So it is not
desirable to mount boot FAT partition into /boot directory of the rootfs
and shadow its original content - adjust corresponding entry in wic
templates.

While at it, remove unused ondisk parameter when using use-uuid, which
takes precedence and is more flexible.

Note: boot FAT partition will be automounted at /run/media/boot-mmcblk0p1/

Signed-off-by: Denys Dmytriyenko <denys@konsulko.com>
---
v2 changes:
* remove <mountpoint> from boot partition to avoid undocumented behavior
* add explicit size specifier to --fixed-size 128M

 meta-ti-bsp/wic/sdimage-2part-efi.wks.in | 3 ++-
 meta-ti-bsp/wic/sdimage-2part.wks        | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/meta-ti-bsp/wic/sdimage-2part-efi.wks.in b/meta-ti-bsp/wic/sdimage-2part-efi.wks.in
index 2213a348..ca042be1 100644
--- a/meta-ti-bsp/wic/sdimage-2part-efi.wks.in
+++ b/meta-ti-bsp/wic/sdimage-2part-efi.wks.in
@@ -2,6 +2,7 @@
 # long-description: Creates a partitioned SD card image for TI platforms that
 # supports EFI.  Boot files are located in the first vfat partition with extra
 # reserved space.  We cannot use a GPT here.
+
 bootloader --timeout=3 --append="rootfstype=ext4"
-part /boot --source bootimg-efi --sourceparams="loader=${EFI_PROVIDER}" --fstype=vfat --label boot --active --align 1024 --use-uuid --fixed-size 128M
+part --source bootimg-efi --sourceparams="loader=${EFI_PROVIDER}" --fstype=vfat --label boot --active --align 1024 --use-uuid --fixed-size 128M
 part / --source rootfs --fstype=ext4 --label root --align 1024 --use-uuid
diff --git a/meta-ti-bsp/wic/sdimage-2part.wks b/meta-ti-bsp/wic/sdimage-2part.wks
index 3eab9407..5073176e 100644
--- a/meta-ti-bsp/wic/sdimage-2part.wks
+++ b/meta-ti-bsp/wic/sdimage-2part.wks
@@ -2,5 +2,5 @@
 # long-description: Creates a partitioned SD card image for TI platforms.
 # Boot files are located in the first vfat partition with extra reserved space.
 
-part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label boot --active --align 1024 --fixed-size 128 --use-uuid
-part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root --align 1024 --use-uuid
+part --source bootimg-partition --fstype=vfat --label boot --active --align 1024 --use-uuid --fixed-size 128M
+part / --source rootfs --fstype=ext4 --label root --align 1024 --use-uuid
-- 
2.25.1



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

* Re: [meta-ti] [master/scarthgap/kirkstone][PATCH v2] wic: prevent boot FAT partition mounting under /boot
  2024-04-24 22:36 [master/scarthgap/kirkstone][PATCH v2] wic: prevent boot FAT partition mounting under /boot Denys Dmytriyenko
@ 2024-04-24 22:46 ` Jon Cormier
  2024-04-26 19:02   ` Denys Dmytriyenko
  0 siblings, 1 reply; 4+ messages in thread
From: Jon Cormier @ 2024-04-24 22:46 UTC (permalink / raw)
  To: Denys Dmytriyenko; +Cc: meta-ti, Denys Dmytriyenko

[-- Attachment #1: Type: text/plain, Size: 3333 bytes --]

Reviewed-by: Jonathan Cormier <jcormier@criticallink.com>

On Wed, Apr 24, 2024, 12:36 PM Denys Dmytriyenko via lists.yoctoproject.org
<denis=denix.org@lists.yoctoproject.org> wrote:

> From: Denys Dmytriyenko <denys@konsulko.com>
>
> Separate FAT boot partition holds SPL, SYSFW and U-boot images, while
> rootfs places kernel images and DTBs into /boot directory. So it is not
> desirable to mount boot FAT partition into /boot directory of the rootfs
> and shadow its original content - adjust corresponding entry in wic
> templates.
>
> While at it, remove unused ondisk parameter when using use-uuid, which
> takes precedence and is more flexible.
>
> Note: boot FAT partition will be automounted at /run/media/boot-mmcblk0p1/
>
> Signed-off-by: Denys Dmytriyenko <denys@konsulko.com>
> ---
> v2 changes:
> * remove <mountpoint> from boot partition to avoid undocumented behavior
> * add explicit size specifier to --fixed-size 128M
>
>  meta-ti-bsp/wic/sdimage-2part-efi.wks.in | 3 ++-
>  meta-ti-bsp/wic/sdimage-2part.wks        | 4 ++--
>  2 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/meta-ti-bsp/wic/sdimage-2part-efi.wks.in b/meta-ti-bsp/wic/
> sdimage-2part-efi.wks.in
> index 2213a348..ca042be1 100644
> --- a/meta-ti-bsp/wic/sdimage-2part-efi.wks.in
> +++ b/meta-ti-bsp/wic/sdimage-2part-efi.wks.in
> @@ -2,6 +2,7 @@
>  # long-description: Creates a partitioned SD card image for TI platforms
> that
>  # supports EFI.  Boot files are located in the first vfat partition with
> extra
>  # reserved space.  We cannot use a GPT here.
> +
>  bootloader --timeout=3 --append="rootfstype=ext4"
> -part /boot --source bootimg-efi --sourceparams="loader=${EFI_PROVIDER}"
> --fstype=vfat --label boot --active --align 1024 --use-uuid --fixed-size
> 128M
> +part --source bootimg-efi --sourceparams="loader=${EFI_PROVIDER}"
> --fstype=vfat --label boot --active --align 1024 --use-uuid --fixed-size
> 128M
>  part / --source rootfs --fstype=ext4 --label root --align 1024 --use-uuid
> diff --git a/meta-ti-bsp/wic/sdimage-2part.wks
> b/meta-ti-bsp/wic/sdimage-2part.wks
> index 3eab9407..5073176e 100644
> --- a/meta-ti-bsp/wic/sdimage-2part.wks
> +++ b/meta-ti-bsp/wic/sdimage-2part.wks
> @@ -2,5 +2,5 @@
>  # long-description: Creates a partitioned SD card image for TI platforms.
>  # Boot files are located in the first vfat partition with extra reserved
> space.
>
> -part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat
> --label boot --active --align 1024 --fixed-size 128 --use-uuid
> -part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root
> --align 1024 --use-uuid
> +part --source bootimg-partition --fstype=vfat --label boot --active
> --align 1024 --use-uuid --fixed-size 128M
> +part / --source rootfs --fstype=ext4 --label root --align 1024 --use-uuid
> --
> 2.25.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#17598):
> https://lists.yoctoproject.org/g/meta-ti/message/17598
> Mute This Topic: https://lists.yoctoproject.org/mt/105720331/7902621
> Group Owner: meta-ti+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub [
> jcormier@criticallink.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>

[-- Attachment #2: Type: text/html, Size: 5121 bytes --]

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

* Re: [meta-ti] [master/scarthgap/kirkstone][PATCH v2] wic: prevent boot FAT partition mounting under /boot
  2024-04-24 22:46 ` [meta-ti] " Jon Cormier
@ 2024-04-26 19:02   ` Denys Dmytriyenko
  2024-04-26 21:07     ` Ryan Eatmon
  0 siblings, 1 reply; 4+ messages in thread
From: Denys Dmytriyenko @ 2024-04-26 19:02 UTC (permalink / raw)
  To: Ryan Eatmon; +Cc: meta-ti

Ryan,

Will you be able to pick up v2 of this? Thanks.


On Wed, Apr 24, 2024 at 12:46:48PM -1000, Jon Cormier wrote:
> Reviewed-by: Jonathan Cormier <jcormier@criticallink.com>
> 
> On Wed, Apr 24, 2024, 12:36 PM Denys Dmytriyenko via lists.yoctoproject.org
> <denis=denix.org@lists.yoctoproject.org> wrote:
> 
> > From: Denys Dmytriyenko <denys@konsulko.com>
> >
> > Separate FAT boot partition holds SPL, SYSFW and U-boot images, while
> > rootfs places kernel images and DTBs into /boot directory. So it is not
> > desirable to mount boot FAT partition into /boot directory of the rootfs
> > and shadow its original content - adjust corresponding entry in wic
> > templates.
> >
> > While at it, remove unused ondisk parameter when using use-uuid, which
> > takes precedence and is more flexible.
> >
> > Note: boot FAT partition will be automounted at /run/media/boot-mmcblk0p1/
> >
> > Signed-off-by: Denys Dmytriyenko <denys@konsulko.com>
> > ---
> > v2 changes:
> > * remove <mountpoint> from boot partition to avoid undocumented behavior
> > * add explicit size specifier to --fixed-size 128M
> >
> >  meta-ti-bsp/wic/sdimage-2part-efi.wks.in | 3 ++-
> >  meta-ti-bsp/wic/sdimage-2part.wks        | 4 ++--
> >  2 files changed, 4 insertions(+), 3 deletions(-)
> >
> > diff --git a/meta-ti-bsp/wic/sdimage-2part-efi.wks.in b/meta-ti-bsp/wic/
> > sdimage-2part-efi.wks.in
> > index 2213a348..ca042be1 100644
> > --- a/meta-ti-bsp/wic/sdimage-2part-efi.wks.in
> > +++ b/meta-ti-bsp/wic/sdimage-2part-efi.wks.in
> > @@ -2,6 +2,7 @@
> >  # long-description: Creates a partitioned SD card image for TI platforms
> > that
> >  # supports EFI.  Boot files are located in the first vfat partition with
> > extra
> >  # reserved space.  We cannot use a GPT here.
> > +
> >  bootloader --timeout=3 --append="rootfstype=ext4"
> > -part /boot --source bootimg-efi --sourceparams="loader=${EFI_PROVIDER}"
> > --fstype=vfat --label boot --active --align 1024 --use-uuid --fixed-size
> > 128M
> > +part --source bootimg-efi --sourceparams="loader=${EFI_PROVIDER}"
> > --fstype=vfat --label boot --active --align 1024 --use-uuid --fixed-size
> > 128M
> >  part / --source rootfs --fstype=ext4 --label root --align 1024 --use-uuid
> > diff --git a/meta-ti-bsp/wic/sdimage-2part.wks
> > b/meta-ti-bsp/wic/sdimage-2part.wks
> > index 3eab9407..5073176e 100644
> > --- a/meta-ti-bsp/wic/sdimage-2part.wks
> > +++ b/meta-ti-bsp/wic/sdimage-2part.wks
> > @@ -2,5 +2,5 @@
> >  # long-description: Creates a partitioned SD card image for TI platforms.
> >  # Boot files are located in the first vfat partition with extra reserved
> > space.
> >
> > -part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat
> > --label boot --active --align 1024 --fixed-size 128 --use-uuid
> > -part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root
> > --align 1024 --use-uuid
> > +part --source bootimg-partition --fstype=vfat --label boot --active
> > --align 1024 --use-uuid --fixed-size 128M
> > +part / --source rootfs --fstype=ext4 --label root --align 1024 --use-uuid
> > --
> > 2.25.1


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

* Re: [meta-ti] [master/scarthgap/kirkstone][PATCH v2] wic: prevent boot FAT partition mounting under /boot
  2024-04-26 19:02   ` Denys Dmytriyenko
@ 2024-04-26 21:07     ` Ryan Eatmon
  0 siblings, 0 replies; 4+ messages in thread
From: Ryan Eatmon @ 2024-04-26 21:07 UTC (permalink / raw)
  To: Denys Dmytriyenko; +Cc: meta-ti


Yes.  I was just finishing up another thing and about to get back to this.


On 4/26/2024 2:02 PM, Denys Dmytriyenko wrote:
> Ryan,
> 
> Will you be able to pick up v2 of this? Thanks.
> 
> 
> On Wed, Apr 24, 2024 at 12:46:48PM -1000, Jon Cormier wrote:
>> Reviewed-by: Jonathan Cormier <jcormier@criticallink.com>
>>
>> On Wed, Apr 24, 2024, 12:36 PM Denys Dmytriyenko via lists.yoctoproject.org
>> <denis=denix.org@lists.yoctoproject.org> wrote:
>>
>>> From: Denys Dmytriyenko <denys@konsulko.com>
>>>
>>> Separate FAT boot partition holds SPL, SYSFW and U-boot images, while
>>> rootfs places kernel images and DTBs into /boot directory. So it is not
>>> desirable to mount boot FAT partition into /boot directory of the rootfs
>>> and shadow its original content - adjust corresponding entry in wic
>>> templates.
>>>
>>> While at it, remove unused ondisk parameter when using use-uuid, which
>>> takes precedence and is more flexible.
>>>
>>> Note: boot FAT partition will be automounted at /run/media/boot-mmcblk0p1/
>>>
>>> Signed-off-by: Denys Dmytriyenko <denys@konsulko.com>
>>> ---
>>> v2 changes:
>>> * remove <mountpoint> from boot partition to avoid undocumented behavior
>>> * add explicit size specifier to --fixed-size 128M
>>>
>>>   meta-ti-bsp/wic/sdimage-2part-efi.wks.in | 3 ++-
>>>   meta-ti-bsp/wic/sdimage-2part.wks        | 4 ++--
>>>   2 files changed, 4 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/meta-ti-bsp/wic/sdimage-2part-efi.wks.in b/meta-ti-bsp/wic/
>>> sdimage-2part-efi.wks.in
>>> index 2213a348..ca042be1 100644
>>> --- a/meta-ti-bsp/wic/sdimage-2part-efi.wks.in
>>> +++ b/meta-ti-bsp/wic/sdimage-2part-efi.wks.in
>>> @@ -2,6 +2,7 @@
>>>   # long-description: Creates a partitioned SD card image for TI platforms
>>> that
>>>   # supports EFI.  Boot files are located in the first vfat partition with
>>> extra
>>>   # reserved space.  We cannot use a GPT here.
>>> +
>>>   bootloader --timeout=3 --append="rootfstype=ext4"
>>> -part /boot --source bootimg-efi --sourceparams="loader=${EFI_PROVIDER}"
>>> --fstype=vfat --label boot --active --align 1024 --use-uuid --fixed-size
>>> 128M
>>> +part --source bootimg-efi --sourceparams="loader=${EFI_PROVIDER}"
>>> --fstype=vfat --label boot --active --align 1024 --use-uuid --fixed-size
>>> 128M
>>>   part / --source rootfs --fstype=ext4 --label root --align 1024 --use-uuid
>>> diff --git a/meta-ti-bsp/wic/sdimage-2part.wks
>>> b/meta-ti-bsp/wic/sdimage-2part.wks
>>> index 3eab9407..5073176e 100644
>>> --- a/meta-ti-bsp/wic/sdimage-2part.wks
>>> +++ b/meta-ti-bsp/wic/sdimage-2part.wks
>>> @@ -2,5 +2,5 @@
>>>   # long-description: Creates a partitioned SD card image for TI platforms.
>>>   # Boot files are located in the first vfat partition with extra reserved
>>> space.
>>>
>>> -part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat
>>> --label boot --active --align 1024 --fixed-size 128 --use-uuid
>>> -part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root
>>> --align 1024 --use-uuid
>>> +part --source bootimg-partition --fstype=vfat --label boot --active
>>> --align 1024 --use-uuid --fixed-size 128M
>>> +part / --source rootfs --fstype=ext4 --label root --align 1024 --use-uuid
>>> --
>>> 2.25.1

-- 
Ryan Eatmon                reatmon@ti.com
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS


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

end of thread, other threads:[~2024-04-26 21:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-24 22:36 [master/scarthgap/kirkstone][PATCH v2] wic: prevent boot FAT partition mounting under /boot Denys Dmytriyenko
2024-04-24 22:46 ` [meta-ti] " Jon Cormier
2024-04-26 19:02   ` Denys Dmytriyenko
2024-04-26 21:07     ` Ryan Eatmon

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.