From: "MOESSBAUER, Felix" <felix.moessbauer@siemens.com>
To: "jan.kiszka@web.de" <jan.kiszka@web.de>,
"cip-dev@lists.cip-project.org" <cip-dev@lists.cip-project.org>,
"Arjunan, Srinu" <srinuvasan.a@siemens.com>
Subject: Re: [isar-cip-core] [PATCH v2] classes/squashfs.bbclass: exclude boot dir for efibootguard bootloader
Date: Thu, 1 Aug 2024 06:33:10 +0000 [thread overview]
Message-ID: <62f86ea16dd812e7e0ea25208c9196c71b4e4bbb.camel@siemens.com> (raw)
In-Reply-To: <12d8317a-9510-431b-b24a-9175192e6378@web.de>
On Wed, 2024-07-31 at 19:01 +0200, Jan Kiszka wrote:
> On 23.07.24 12:06, srinuvasan.a@siemens.com wrote:
> > From: srinuvasan <srinuvasan.a@siemens.com>
> >
> > efibootguard based bootloader boot the system using linux.efi (UKI)
> > and it has
> > the necessary boot files to boot the system, hence we added boot
> > dir as the exclude dir
> > in squashfs root file system to remove the contents from the boot
> > dir.
> >
> > Signed-off-by: srinuvasan <srinuvasan.a@siemens.com>
> > ---
> > classes/squashfs.bbclass | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/classes/squashfs.bbclass b/classes/squashfs.bbclass
> > index b39be0c..2582ce2 100644
> > --- a/classes/squashfs.bbclass
> > +++ b/classes/squashfs.bbclass
> > @@ -23,6 +23,7 @@ def get_free_mem():
> > IMAGER_INSTALL:squashfs += "squashfs-tools"
> >
> > SQUASHFS_EXCLUDE_DIRS ?= ""
> > +SQUASHFS_EXCLUDE_DIRS_EFI ?= "boot"
> > SQUASHFS_CONTENT ?= "${PP_ROOTFS}"
> > SQUASHFS_CREATION_ARGS ?= ""
> >
> > @@ -31,6 +32,8 @@ SQUASHFS_MEMLIMIT ?= "${@int(get_free_mem() *
> > 3/4)}"
> > SQUASHFS_CREATION_LIMITS = "-mem ${SQUASHFS_MEMLIMIT} -processors
> > ${SQUASHFS_THREADS}"
> >
> > python __anonymous() {
> > + if (d.getVar('SWUPDATE_BOOTLOADER') == 'efibootguard'):
> > + d.setVar('SQUASHFS_EXCLUDE_DIRS',
> > '${SQUASHFS_EXCLUDE_DIRS_EFI}')
>
> I still don't get why we should carry this knowledge here. It is also
> mixing up "EFI" with "efibootguard" - there is no efibootguard
> without
> EFI, but the other way around is possible.
I would rather just add the /boot dir to the generic
SQUASHFS_EXCLUDE_DIRS variable. There is no need to dispatch based on
the bootloader (as we can exclude dirs which are not present as well).
>
> And then it is the image recipe or - even closer - the wks file that
> brings it all together, the fact that squashfs is used for rootfs
> (and
> only for that?!?), that there is some boot folder that is not needed
> twice.
I don't know why the squashfs rootfs was modeled as bbclass and not as
part of the wic imaging. This already created problems in the past, as
the fstab in the squashfs is the one from the rootfs and not the
patched one from wic.
Changing this might be a some effort, due to its integration in the
swupdate class, though.
Felix
>
> Jan
>
> > exclude_directories =
> > d.getVar('SQUASHFS_EXCLUDE_DIRS').split()
> > if len(exclude_directories) == 0:
> > return
>
--
Siemens AG, Technology
Linux Expert Center
prev parent reply other threads:[~2024-08-01 11:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-18 10:57 [isar-cip-core] [PATCH] classes/squashfs: exclude boot dir during squshfs image creation srinuvasan.a
2024-07-18 11:30 ` Jan Kiszka
2024-07-18 12:00 ` Arjunan, Srinu
2024-07-19 6:55 ` MOESSBAUER, Felix
2024-07-19 6:57 ` Arjunan, Srinu
2024-07-23 10:06 ` [isar-cip-core] [PATCH v2] classes/squashfs.bbclass: exclude boot dir for efibootguard bootloader srinuvasan.a
2024-07-31 17:01 ` Jan Kiszka
2024-08-01 6:33 ` MOESSBAUER, Felix [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=62f86ea16dd812e7e0ea25208c9196c71b4e4bbb.camel@siemens.com \
--to=felix.moessbauer@siemens.com \
--cc=cip-dev@lists.cip-project.org \
--cc=jan.kiszka@web.de \
--cc=srinuvasan.a@siemens.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox