Message ID | 20240108102638.2966221-2-Quirin.Gylstorff@siemens.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | Add Bootloader to sw-description | expand |
On 08.01.24 11:25, Quirin Gylstorff wrote: > From: Quirin Gylstorff <quirin.gylstorff@siemens.com> > > This is done in preparations to reduce similar code. > > Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com> > --- > classes/efibootguard.bbclass | 17 +++++++++++++++++ > recipes-core/images/efibootguard.inc | 9 ++------- > 2 files changed, 19 insertions(+), 7 deletions(-) > create mode 100644 classes/efibootguard.bbclass > > diff --git a/classes/efibootguard.bbclass b/classes/efibootguard.bbclass > new file mode 100644 > index 0000000..bc99d3a > --- /dev/null > +++ b/classes/efibootguard.bbclass > @@ -0,0 +1,17 @@ > +# > +# CIP Core, generic profile > +# > +# Copyright (c) Siemens AG, 2024 > +# > +# Authors: > +# Quirin Gylstorff <quirin.gylstorff@siemens.com> > +# > +# SPDX-License-Identifier: MIT > +# > + > +IMAGE_INSTALL:append = " efibootguard libebgenv0" > +IMAGER_INSTALL:wic:append = " efibootguard:${DISTRO_ARCH}" > +WDOG_TIMEOUT ?= "60" > +WICVARS += "WDOG_TIMEOUT KERNEL_IMAGE INITRD_DEPLOY_FILE DTB_FILES EFI_ARCH EFI_LIB_ARCH" EFI_* vars are likely topic for patch 2, right? > +IMAGE_TYPEDEP:swu:append = " wic" > + Extra newline and EOF... > diff --git a/recipes-core/images/efibootguard.inc b/recipes-core/images/efibootguard.inc > index 0f26b7d..f512b3c 100644 > --- a/recipes-core/images/efibootguard.inc > +++ b/recipes-core/images/efibootguard.inc > @@ -1,7 +1,7 @@ > # > # CIP Core, generic profile > # > -# Copyright (c) Siemens AG, 2020 > +# Copyright (c) Siemens AG, 2020, 2024 > # > # Authors: > # Quirin Gylstorff <quirin.gylstorff@siemens.com> > @@ -9,9 +9,4 @@ > # SPDX-License-Identifier: MIT > # > > -IMAGE_INSTALL:append = " efibootguard libebgenv0" > -IMAGER_INSTALL:wic:append = " efibootguard:${DISTRO_ARCH}" > -WDOG_TIMEOUT ?= "60" > -WICVARS += "WDOG_TIMEOUT KERNEL_IMAGE INITRD_DEPLOY_FILE DTB_FILES" > -IMAGE_FSTYPES:append = " wic" > -IMAGE_TYPEDEP:swu:append = " wic" > +inherit efibootguard Jan
On Mon, 2024-01-08 at 14:54 +0100, Jan Kiszka wrote: > On 08.01.24 11:25, Quirin Gylstorff wrote: > > From: Quirin Gylstorff <quirin.gylstorff@siemens.com> > > > > This is done in preparations to reduce similar code. > > > > Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com> > > --- > > classes/efibootguard.bbclass | 17 +++++++++++++++++ > > recipes-core/images/efibootguard.inc | 9 ++------- > > 2 files changed, 19 insertions(+), 7 deletions(-) > > create mode 100644 classes/efibootguard.bbclass > > > > diff --git a/classes/efibootguard.bbclass > > b/classes/efibootguard.bbclass > > new file mode 100644 > > index 0000000..bc99d3a > > --- /dev/null > > +++ b/classes/efibootguard.bbclass > > @@ -0,0 +1,17 @@ > > +# > > +# CIP Core, generic profile > > +# > > +# Copyright (c) Siemens AG, 2024 > > +# > > +# Authors: > > +# Quirin Gylstorff <quirin.gylstorff@siemens.com> > > +# > > +# SPDX-License-Identifier: MIT > > +# > > + > > +IMAGE_INSTALL:append = " efibootguard libebgenv0" > > +IMAGER_INSTALL:wic:append = " efibootguard:${DISTRO_ARCH}" This patch needs to be reverted. We cannot simply add things to IMAGE(ER)_INSTALL in a class, as this logic is executed whenever the class is inherited. As we inherit this class transitively via swupdate.bbclass, which is added to IMAGE_CLASSES, all images now will depend on and install efibootguard. Inheriting the other classes was fine before, as they did not change any image properties except if requested. Maybe we should also remove the IMAGE_CLASSES part from the layer.conf again, as it is too intrusive. Felix > > +WDOG_TIMEOUT ?= "60" > > +WICVARS += "WDOG_TIMEOUT KERNEL_IMAGE INITRD_DEPLOY_FILE DTB_FILES > > EFI_ARCH EFI_LIB_ARCH" > > EFI_* vars are likely topic for patch 2, right? > > > +IMAGE_TYPEDEP:swu:append = " wic" > > + > > Extra newline and EOF... > > > diff --git a/recipes-core/images/efibootguard.inc b/recipes- > > core/images/efibootguard.inc > > index 0f26b7d..f512b3c 100644 > > --- a/recipes-core/images/efibootguard.inc > > +++ b/recipes-core/images/efibootguard.inc > > @@ -1,7 +1,7 @@ > > # > > # CIP Core, generic profile > > # > > -# Copyright (c) Siemens AG, 2020 > > +# Copyright (c) Siemens AG, 2020, 2024 > > # > > # Authors: > > # Quirin Gylstorff <quirin.gylstorff@siemens.com> > > @@ -9,9 +9,4 @@ > > # SPDX-License-Identifier: MIT > > # > > > > -IMAGE_INSTALL:append = " efibootguard libebgenv0" > > -IMAGER_INSTALL:wic:append = " efibootguard:${DISTRO_ARCH}" > > -WDOG_TIMEOUT ?= "60" > > -WICVARS += "WDOG_TIMEOUT KERNEL_IMAGE INITRD_DEPLOY_FILE > > DTB_FILES" > > -IMAGE_FSTYPES:append = " wic" > > -IMAGE_TYPEDEP:swu:append = " wic" > > +inherit efibootguard > > Jan >
diff --git a/classes/efibootguard.bbclass b/classes/efibootguard.bbclass new file mode 100644 index 0000000..bc99d3a --- /dev/null +++ b/classes/efibootguard.bbclass @@ -0,0 +1,17 @@ +# +# CIP Core, generic profile +# +# Copyright (c) Siemens AG, 2024 +# +# Authors: +# Quirin Gylstorff <quirin.gylstorff@siemens.com> +# +# SPDX-License-Identifier: MIT +# + +IMAGE_INSTALL:append = " efibootguard libebgenv0" +IMAGER_INSTALL:wic:append = " efibootguard:${DISTRO_ARCH}" +WDOG_TIMEOUT ?= "60" +WICVARS += "WDOG_TIMEOUT KERNEL_IMAGE INITRD_DEPLOY_FILE DTB_FILES EFI_ARCH EFI_LIB_ARCH" +IMAGE_TYPEDEP:swu:append = " wic" + diff --git a/recipes-core/images/efibootguard.inc b/recipes-core/images/efibootguard.inc index 0f26b7d..f512b3c 100644 --- a/recipes-core/images/efibootguard.inc +++ b/recipes-core/images/efibootguard.inc @@ -1,7 +1,7 @@ # # CIP Core, generic profile # -# Copyright (c) Siemens AG, 2020 +# Copyright (c) Siemens AG, 2020, 2024 # # Authors: # Quirin Gylstorff <quirin.gylstorff@siemens.com> @@ -9,9 +9,4 @@ # SPDX-License-Identifier: MIT # -IMAGE_INSTALL:append = " efibootguard libebgenv0" -IMAGER_INSTALL:wic:append = " efibootguard:${DISTRO_ARCH}" -WDOG_TIMEOUT ?= "60" -WICVARS += "WDOG_TIMEOUT KERNEL_IMAGE INITRD_DEPLOY_FILE DTB_FILES" -IMAGE_FSTYPES:append = " wic" -IMAGE_TYPEDEP:swu:append = " wic" +inherit efibootguard