public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] bootimg-efi-isar: add support for squashfs
@ 2022-03-30  7:50 Daniel Machon
  2022-03-30  9:48 ` Henning Schild
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Machon @ 2022-03-30  7:50 UTC (permalink / raw)
  To: isar-users; +Cc: Daniel Machon

This patch adds support for squashfs in grub, when using grub loader
for EFI images. This is needed when the linux- or initrd image is
located in a squashfs filesystem.

Signed-off-by: Daniel Machon <dama@universal-robots.com>
---
 meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
index d971254..78fabb8 100644
--- a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
+++ b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
@@ -355,7 +355,7 @@ class BootimgEFIPlugin(SourcePlugin):
                     grub_cmd += "terminal minicmd test loadenv echo help "
                     grub_cmd += "reboot serial terminfo iso9660 loopback tar "
                     grub_cmd += "memdisk ls search_fs_uuid udf btrfs xfs lvm "
-                    grub_cmd += "reiserfs regexp " + grub_modules
+                    grub_cmd += "reiserfs regexp squash4 " + grub_modules
                     exec_cmd(grub_cmd)
             elif source_params['loader'] == 'systemd-boot':
                 kernel_dir = os.path.join(rootfs_dir['ROOTFS_DIR'], "usr/lib/systemd/boot/efi/")
-- 
2.25.1


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

* Re: [PATCH] bootimg-efi-isar: add support for squashfs
  2022-03-30  7:50 [PATCH] bootimg-efi-isar: add support for squashfs Daniel Machon
@ 2022-03-30  9:48 ` Henning Schild
  2022-04-01  7:24   ` Daniel Machon
  0 siblings, 1 reply; 4+ messages in thread
From: Henning Schild @ 2022-03-30  9:48 UTC (permalink / raw)
  To: Daniel Machon; +Cc: isar-users, Daniel Machon

Am Wed, 30 Mar 2022 09:50:01 +0200
schrieb Daniel Machon <dmachon.dev@gmail.com>:

> This patch adds support for squashfs in grub, when using grub loader
> for EFI images. This is needed when the linux- or initrd image is
> located in a squashfs filesystem.

Out of curiosity, did you try systemd boot as well? And in fact did you
confirm it is actually needed with recent isar?

With
https://github.com/ilbers/isar/commit/9d0a7012be2217c77f85d54ba8aac0839bc847fb
we should have all files living in the EFI partition which IMHO is
always FAT32. But maybe you are using "custom_cfg".

> Signed-off-by: Daniel Machon <dama@universal-robots.com>
> ---
>  meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
> b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py index
> d971254..78fabb8 100644 ---
> a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py +++
> b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py @@ -355,7
> +355,7 @@ class BootimgEFIPlugin(SourcePlugin): grub_cmd += "terminal
> minicmd test loadenv echo help " grub_cmd += "reboot serial terminfo
> iso9660 loopback tar " grub_cmd += "memdisk ls search_fs_uuid udf
> btrfs xfs lvm "
> -                    grub_cmd += "reiserfs regexp " + grub_modules
> +                    grub_cmd += "reiserfs regexp squash4 " +
> grub_modules exec_cmd(grub_cmd)

While it is usually "not allowed" to touch this file without checking
OE first, this is touching our forked bits and therefore fine.

It would be interesting to see if we could drop that list and say "all"
or "all defaults", but that is another topic.

Henning

>              elif source_params['loader'] == 'systemd-boot':
>                  kernel_dir = os.path.join(rootfs_dir['ROOTFS_DIR'],
> "usr/lib/systemd/boot/efi/")


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

* Re: [PATCH] bootimg-efi-isar: add support for squashfs
  2022-03-30  9:48 ` Henning Schild
@ 2022-04-01  7:24   ` Daniel Machon
  2022-04-01  7:33     ` Henning Schild
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Machon @ 2022-04-01  7:24 UTC (permalink / raw)
  To: Henning Schild; +Cc: isar-users, Daniel Machon

On Wed, Mar 30, 2022 at 11:48:21AM +0200, Henning Schild wrote:
> Am Wed, 30 Mar 2022 09:50:01 +0200
> schrieb Daniel Machon <dmachon.dev@gmail.com>:
> 
> > This patch adds support for squashfs in grub, when using grub loader
> > for EFI images. This is needed when the linux- or initrd image is
> > located in a squashfs filesystem.
> 
> Out of curiosity, did you try systemd boot as well? And in fact did you
> confirm it is actually needed with recent isar?
> 
> With
> https://github.com/ilbers/isar/commit/9d0a7012be2217c77f85d54ba8aac0839bc847fb
> we should have all files living in the EFI partition which IMHO is
> always FAT32. But maybe you are using "custom_cfg".
>

I think you have a point here. We recently bumped the isar layer, and I might
have missed this change. I like the consistency of having the boot files in
the EFI partition across all bootloaders.

This should indeed make this patch redundant. Thanks for poitning this out!
 
> > Signed-off-by: Daniel Machon <dama@universal-robots.com>
> > ---
> >  meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
> > b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py index
> > d971254..78fabb8 100644 ---
> > a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py +++
> > b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py @@ -355,7
> > +355,7 @@ class BootimgEFIPlugin(SourcePlugin): grub_cmd += "terminal
> > minicmd test loadenv echo help " grub_cmd += "reboot serial terminfo
> > iso9660 loopback tar " grub_cmd += "memdisk ls search_fs_uuid udf
> > btrfs xfs lvm "
> > -                    grub_cmd += "reiserfs regexp " + grub_modules
> > +                    grub_cmd += "reiserfs regexp squash4 " +
> > grub_modules exec_cmd(grub_cmd)
> 
> While it is usually "not allowed" to touch this file without checking
> OE first, this is touching our forked bits and therefore fine.
> 
> It would be interesting to see if we could drop that list and say "all"
> or "all defaults", but that is another topic.

Agreed.

> 
> Henning
> 
> >              elif source_params['loader'] == 'systemd-boot':
> >                  kernel_dir = os.path.join(rootfs_dir['ROOTFS_DIR'],
> > "usr/lib/systemd/boot/efi/")
> 

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

* Re: [PATCH] bootimg-efi-isar: add support for squashfs
  2022-04-01  7:24   ` Daniel Machon
@ 2022-04-01  7:33     ` Henning Schild
  0 siblings, 0 replies; 4+ messages in thread
From: Henning Schild @ 2022-04-01  7:33 UTC (permalink / raw)
  To: Daniel Machon; +Cc: isar-users, Daniel Machon

Am Fri, 1 Apr 2022 09:24:02 +0200
schrieb Daniel Machon <dmachon.dev@gmail.com>:

> On Wed, Mar 30, 2022 at 11:48:21AM +0200, Henning Schild wrote:
> > Am Wed, 30 Mar 2022 09:50:01 +0200
> > schrieb Daniel Machon <dmachon.dev@gmail.com>:
> >   
> > > This patch adds support for squashfs in grub, when using grub
> > > loader for EFI images. This is needed when the linux- or initrd
> > > image is located in a squashfs filesystem.  
> > 
> > Out of curiosity, did you try systemd boot as well? And in fact did
> > you confirm it is actually needed with recent isar?
> > 
> > With
> > https://github.com/ilbers/isar/commit/9d0a7012be2217c77f85d54ba8aac0839bc847fb
> > we should have all files living in the EFI partition which IMHO is
> > always FAT32. But maybe you are using "custom_cfg".
> >  
> 
> I think you have a point here. We recently bumped the isar layer, and
> I might have missed this change. I like the consistency of having the
> boot files in the EFI partition across all bootloaders.

Thanks, i like that too. It comes at the price of not being able to
install kernel updates with apt-get any longer, which before worked in
some cases but was not consistent.
Fixing that at some point is on the agenda, but not very high to be
honest. We usually OTA update the whole firmware with i.e. swupdate, so
single package updates (including kernel) are not a use-case.

Just saying in case you rely on kernel updates with apt-get. All that
would be needed is a bunch of scripts to maintain bootloader entries.
Should you end up wanting to write those. please get in touch so we can
sync on it.

regards,
Henning

> This should indeed make this patch redundant. Thanks for poitning
> this out! 
> > > Signed-off-by: Daniel Machon <dama@universal-robots.com>
> > > ---
> > >  meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git
> > > a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
> > > b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py index
> > > d971254..78fabb8 100644 ---
> > > a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py +++
> > > b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py @@
> > > -355,7 +355,7 @@ class BootimgEFIPlugin(SourcePlugin): grub_cmd
> > > += "terminal minicmd test loadenv echo help " grub_cmd += "reboot
> > > serial terminfo iso9660 loopback tar " grub_cmd += "memdisk ls
> > > search_fs_uuid udf btrfs xfs lvm "
> > > -                    grub_cmd += "reiserfs regexp " + grub_modules
> > > +                    grub_cmd += "reiserfs regexp squash4 " +
> > > grub_modules exec_cmd(grub_cmd)  
> > 
> > While it is usually "not allowed" to touch this file without
> > checking OE first, this is touching our forked bits and therefore
> > fine.
> > 
> > It would be interesting to see if we could drop that list and say
> > "all" or "all defaults", but that is another topic.  
> 
> Agreed.
> 
> > 
> > Henning
> >   
> > >              elif source_params['loader'] == 'systemd-boot':
> > >                  kernel_dir =
> > > os.path.join(rootfs_dir['ROOTFS_DIR'],
> > > "usr/lib/systemd/boot/efi/")  
> >   


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

end of thread, other threads:[~2022-04-01  7:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-30  7:50 [PATCH] bootimg-efi-isar: add support for squashfs Daniel Machon
2022-03-30  9:48 ` Henning Schild
2022-04-01  7:24   ` Daniel Machon
2022-04-01  7:33     ` Henning Schild

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox