[PATCH 0/7] meta-efibootguard: Rocko support and fetch ebg 0.2

21 views
Skip to first unread message

Andreas J. Reichel

unread,
Jan 10, 2018, 7:11:55 AM1/10/18
to efibootg...@googlegroups.com, Andreas Reichel
From: Andreas Reichel <andreas.r...@siemens.com>

To really support yocto, we must introduce different branches
for used yocto versions. My suggestion is to create the
following two branches from master to apply this patch-set to:

* rocko
* rocko-next

In future there should also be:

* krogoth, krogoth-next
* morthy, morty-next
* pyro, pyro-next

This way, we are compliant with other open source meta-layers and
don't run into problems when using the layer with different yocto
versions.

That said, this patch series adds support for Yocto Rocko.
Tests for older systems are on the way.

Signed-off-by: Andreas Reichel <andreas.r...@siemens.com>

Andreas Reichel (7):
fw_setenv: correct call in python plugin
Explicitely add zlib dependency to efibootguard.bb
Remove --with-gnuefi-lds-dir from config call
Inherit pkgconfig class in recipe
Adapt README.md for rocko branch
Use EFI Boot Guard version to 0.2
Update source plugins to work with newer wic

README.md | 12 +++---------
recipes-bsp/efibootguard/efibootguard.bb | 9 ++++-----
scripts/lib/wic/plugins/source/efibootguard-boot.py | 15 +++++++--------
scripts/lib/wic/plugins/source/efibootguard-efi.py | 12 ++++++------
4 files changed, 20 insertions(+), 28 deletions(-)

--
2.15.1

Andreas J. Reichel

unread,
Jan 10, 2018, 7:11:56 AM1/10/18
to efibootg...@googlegroups.com, Andreas Reichel
From: Andreas Reichel <andreas.r...@siemens.com>

gnu-efi path configuration had been changed so that
linker scripts are expected in the lib folder.

Signed-off-by: Andreas Reichel <andreas.r...@siemens.com>
---
recipes-bsp/efibootguard/efibootguard.bb | 1 -
1 file changed, 1 deletion(-)

diff --git a/recipes-bsp/efibootguard/efibootguard.bb b/recipes-bsp/efibootguard/efibootguard.bb
index 891d33c..01afb3c 100644
--- a/recipes-bsp/efibootguard/efibootguard.bb
+++ b/recipes-bsp/efibootguard/efibootguard.bb
@@ -31,7 +31,6 @@ PACKAGES = "${PN}-tools \

EXTRA_OECONF = "--with-gnuefi-sys-dir=${STAGING_DIR_HOST} \
--with-gnuefi-include-dir=${STAGING_INCDIR}/efi \
- --with-gnuefi-lds-dir=${STAGING_LIBDIR} \
--with-gnuefi-lib-dir=${STAGING_LIBDIR}"

FILES_${PN}-tools = "${bindir}"
--
2.15.1

Andreas J. Reichel

unread,
Jan 10, 2018, 7:11:56 AM1/10/18
to efibootg...@googlegroups.com, Andreas Reichel
From: Andreas Reichel <andreas.r...@siemens.com>

Since yocto pyro, each recipe has its own sysroot
and thus all dependencies MUST be mentioned to
correctly deploy files.

Signed-off-by: Andreas Reichel <andreas.r...@siemens.com>
---
recipes-bsp/efibootguard/efibootguard.bb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/recipes-bsp/efibootguard/efibootguard.bb b/recipes-bsp/efibootguard/efibootguard.bb
index 0682f00..891d33c 100644
--- a/recipes-bsp/efibootguard/efibootguard.bb
+++ b/recipes-bsp/efibootguard/efibootguard.bb
@@ -17,7 +17,7 @@ SRCREV = "e3263ab8132b8d0be3b1e5513afc4a93f287e9e5"

S = "${WORKDIR}/git"

-DEPENDS = "gnu-efi pciutils"
+DEPENDS = "gnu-efi pciutils zlib"

inherit autotools deploy

@@ -46,7 +46,7 @@ do_deploy () {
addtask deploy before do_build after do_compile

BBCLASSEXTEND = "native"
-DEPENDS_class-native = ""
+DEPENDS_class-native = "zlib"

do_compile_class-native () {
oe_runmake bg_setenv
--
2.15.1

Andreas J. Reichel

unread,
Jan 10, 2018, 7:11:56 AM1/10/18
to efibootg...@googlegroups.com, Andreas Reichel
From: Andreas Reichel <andreas.r...@siemens.com>

Some modules of wic have changed place

Signed-off-by: Andreas Reichel <andreas.r...@siemens.com>
---
scripts/lib/wic/plugins/source/efibootguard-boot.py | 13 ++++++-------
scripts/lib/wic/plugins/source/efibootguard-efi.py | 12 ++++++------
2 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/scripts/lib/wic/plugins/source/efibootguard-boot.py b/scripts/lib/wic/plugins/source/efibootguard-boot.py
index e9e0868..bad7c27 100644
--- a/scripts/lib/wic/plugins/source/efibootguard-boot.py
+++ b/scripts/lib/wic/plugins/source/efibootguard-boot.py
@@ -28,12 +28,14 @@

import os
import shutil
+import logging

-from wic import msger
from wic.pluginbase import SourcePlugin
-from wic.utils.misc import get_custom_config
-from wic.utils.oe.misc import exec_cmd, exec_native_cmd, get_bitbake_var, \
- BOOTDD_EXTRA_SPACE
+from wic.engine import get_custom_config
+from wic.misc import exec_cmd, exec_native_cmd, get_bitbake_var, \
+ BOOTDD_EXTRA_SPACE
+
+msger = logging.getLogger('wic')

class EfibootguardBootPlugin(SourcePlugin):
"""
@@ -86,9 +88,6 @@ class EfibootguardBootPlugin(SourcePlugin):
msger.error("HDDDIR not set, exiting\n")
os.exit(1)

- # just so the result notes display it
- creator.set_bootimg_dir(bootimg_dir)
-
staging_kernel_dir = kernel_dir

hdddir = "%s/hdd/%s.%s" % (cr_workdir, part.label, part.lineno)
diff --git a/scripts/lib/wic/plugins/source/efibootguard-efi.py b/scripts/lib/wic/plugins/source/efibootguard-efi.py
index 0ba6b8c..8a33412 100644
--- a/scripts/lib/wic/plugins/source/efibootguard-efi.py
+++ b/scripts/lib/wic/plugins/source/efibootguard-efi.py
@@ -29,12 +29,14 @@
import os
import os.path
import shutil
+import logging

-from wic import msger
from wic.pluginbase import SourcePlugin
-from wic.utils.misc import get_custom_config
-from wic.utils.oe.misc import exec_cmd, exec_native_cmd, get_bitbake_var, \
- BOOTDD_EXTRA_SPACE
+from wic.engine import get_custom_config
+from wic.misc import exec_cmd, exec_native_cmd, get_bitbake_var, \
+ BOOTDD_EXTRA_SPACE
+
+msger = logging.getLogger('wic')

class EfibootguardEFIPlugin(SourcePlugin):
"""
@@ -57,8 +59,6 @@ class EfibootguardEFIPlugin(SourcePlugin):
bootimg_dir = get_bitbake_var("HDDDIR")
if not bootimg_dir:
msger.error("HDDDIR not set, exiting\n")
- # just so the result notes display it
- creator.set_bootimg_dir(bootimg_dir)

staging_kernel_dir = kernel_dir

--
2.15.1

Andreas J. Reichel

unread,
Jan 10, 2018, 7:11:56 AM1/10/18
to efibootg...@googlegroups.com, Andreas Reichel
From: Andreas Reichel <andreas.r...@siemens.com>

Add information that are Poky Rocko specific.

Signed-off-by: Andreas Reichel <andreas.r...@siemens.com>
---
README.md | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/README.md b/README.md
index fce877c..d4c631c 100644
--- a/README.md
+++ b/README.md
@@ -14,24 +14,18 @@ Archive:

Tested with:

-poky (morty): 7d5822bf4cb2089687c3c9a908cf4a4ef4e9a53a
+poky (rocko): 16e22f3e37788afb83044f5089d24187d70094bd
https://git.yoctoproject.org/git/poky

-meta-intel: 6add41510412ca196efb3e4f949d403a8b6f35d7
+meta-intel: aa246ba9855d35d454ddcf041578310cbaa90250
https://git.yoctoproject.org/git/meta-intel

meta-intel-iot-middleware: fc8eabfa4fb54802d3f97123b9d2954450175e33
https://git.yoctoproject.org/git/meta-intel-iot-middleware

-meta-nodejs: eec531e97a17bfd406f3bf76dee4057dcf5286a4
-https://github.com/imyller/meta-nodejs
-
-meta-openembedded: fe5c83312de11e80b85680ef237f8acb04b4b26e
+meta-openembedded: 6e3fc5b8d904d06e3aa77e9ec9968ab37a798188
http://git.openembedded.org/meta-openembedded

-meta-iot2000: 774746e44ee248306881ffae7f02370025fda77e
-https://github.com/siemens/meta-iot2000
-
## project integration ##

Steps:
--
2.15.1

Andreas J. Reichel

unread,
Jan 10, 2018, 7:11:56 AM1/10/18
to efibootg...@googlegroups.com, Andreas Reichel
From: Andreas Reichel <andreas.r...@siemens.com>

Fix missing directory after -f when calling bg_setenv in
efibootguard-boot.py source plugin.

Signed-off-by: Andreas Reichel <andreas.r...@siemens.com>
---
scripts/lib/wic/plugins/source/efibootguard-boot.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lib/wic/plugins/source/efibootguard-boot.py b/scripts/lib/wic/plugins/source/efibootguard-boot.py
index 8db0620..e9e0868 100644
--- a/scripts/lib/wic/plugins/source/efibootguard-boot.py
+++ b/scripts/lib/wic/plugins/source/efibootguard-boot.py
@@ -62,7 +62,7 @@ class EfibootguardBootPlugin(SourcePlugin):

cwd = os.getcwd()
os.chdir(hdddir)
- config_cmd = 'bg_setenv -f -k "C:%s:bzImage" -a "%s" -r %s -w %s' % \
+ config_cmd = 'bg_setenv -f . -k "C:%s:bzImage" -a "%s" -r %s -w %s' % \
(part.label.upper(), \
cmdline.strip(), \
source_params.get("revision", 1), \
--
2.15.1

Andreas J. Reichel

unread,
Jan 10, 2018, 7:11:56 AM1/10/18
to efibootg...@googlegroups.com, Andreas Reichel
From: Andreas Reichel <andreas.r...@siemens.com>

To work with pkgconfig, the correspondig .bbclass
must be inherited in the recipe.

Signed-off-by: Andreas Reichel <andreas.r...@siemens.com>
---
recipes-bsp/efibootguard/efibootguard.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/recipes-bsp/efibootguard/efibootguard.bb b/recipes-bsp/efibootguard/efibootguard.bb
index 01afb3c..605439d 100644
--- a/recipes-bsp/efibootguard/efibootguard.bb
+++ b/recipes-bsp/efibootguard/efibootguard.bb
@@ -19,7 +19,7 @@ S = "${WORKDIR}/git"

DEPENDS = "gnu-efi pciutils zlib"

-inherit autotools deploy
+inherit autotools deploy pkgconfig

COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"

--
2.15.1

Andreas J. Reichel

unread,
Jan 10, 2018, 7:11:56 AM1/10/18
to efibootg...@googlegroups.com, Andreas Reichel
From: Andreas Reichel <andreas.r...@siemens.com>

Change fetch URI to get 0.2 from official repo.

Signed-off-by: Andreas Reichel <andreas.r...@siemens.com>
---
recipes-bsp/efibootguard/efibootguard.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/recipes-bsp/efibootguard/efibootguard.bb b/recipes-bsp/efibootguard/efibootguard.bb
index 605439d..5da0e71 100644
--- a/recipes-bsp/efibootguard/efibootguard.bb
+++ b/recipes-bsp/efibootguard/efibootguard.bb
@@ -13,7 +13,7 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"

SRC_URI = "git://github.com/siemens/efibootguard.git;protocol=https;branch=master"
-SRCREV = "e3263ab8132b8d0be3b1e5513afc4a93f287e9e5"
+SRCREV = "c9b3a5260108706b7d98f4ae91c8463f5356f115"

S = "${WORKDIR}/git"

--
2.15.1

Jan Kiszka

unread,
Jan 10, 2018, 10:11:03 AM1/10/18
to [ext] Andreas J. Reichel, efibootg...@googlegroups.com
On 2018-01-10 13:09, [ext] Andreas J. Reichel wrote:
> From: Andreas Reichel <andreas.r...@siemens.com>
>
> To really support yocto, we must introduce different branches
> for used yocto versions. My suggestion is to create the
> following two branches from master to apply this patch-set to:
>
> * rocko
> * rocko-next

Do Yocto rocko and master already deviate in a relevant degree for us?

>
> In future there should also be:
>
> * krogoth, krogoth-next

krogoth is seriously dead.

> * morthy, morty-next

morty is taking its last breaths.

> * pyro, pyro-next

For pyro, we probably need backports then, right?

>
> This way, we are compliant with other open source meta-layers and
> don't run into problems when using the layer with different yocto
> versions.
>
> That said, this patch series adds support for Yocto Rocko.
> Tests for older systems are on the way.

Ah, ok. Will have a look at the patches soon.

Jan

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

Jan Kiszka

unread,
Jan 10, 2018, 10:40:43 AM1/10/18
to [ext] Andreas J. Reichel, efibootg...@googlegroups.com
On 2018-01-10 13:09, [ext] Andreas J. Reichel wrote:
> From: Andreas Reichel <andreas.r...@siemens.com>
>
> Add information that are Poky Rocko specific.
>
> Signed-off-by: Andreas Reichel <andreas.r...@siemens.com>
> ---
> README.md | 12 +++---------
> 1 file changed, 3 insertions(+), 9 deletions(-)
>
> diff --git a/README.md b/README.md
> index fce877c..d4c631c 100644
> --- a/README.md
> +++ b/README.md
> @@ -14,24 +14,18 @@ Archive:
>
> Tested with:
>
> -poky (morty): 7d5822bf4cb2089687c3c9a908cf4a4ef4e9a53a
> +poky (rocko): 16e22f3e37788afb83044f5089d24187d70094bd
> https://git.yoctoproject.org/git/poky
>
> -meta-intel: 6add41510412ca196efb3e4f949d403a8b6f35d7
> +meta-intel: aa246ba9855d35d454ddcf041578310cbaa90250
> https://git.yoctoproject.org/git/meta-intel
>
> meta-intel-iot-middleware: fc8eabfa4fb54802d3f97123b9d2954450175e33
> https://git.yoctoproject.org/git/meta-intel-iot-middleware

That layer is history in meta-iot2000 with the witch to rocko. But can't
we describe this better with kas?

Jan

>
> -meta-nodejs: eec531e97a17bfd406f3bf76dee4057dcf5286a4
> -https://github.com/imyller/meta-nodejs
> -
> -meta-openembedded: fe5c83312de11e80b85680ef237f8acb04b4b26e
> +meta-openembedded: 6e3fc5b8d904d06e3aa77e9ec9968ab37a798188
> http://git.openembedded.org/meta-openembedded
>
> -meta-iot2000: 774746e44ee248306881ffae7f02370025fda77e
> -https://github.com/siemens/meta-iot2000
> -
> ## project integration ##
>
> Steps:
>


--

Andreas Reichel

unread,
Jan 10, 2018, 10:49:43 AM1/10/18
to Jan Kiszka, efibootg...@googlegroups.com
On Wed, Jan 10, 2018 at 04:11:01PM +0100, Jan Kiszka wrote:
> On 2018-01-10 13:09, [ext] Andreas J. Reichel wrote:
> > From: Andreas Reichel <andreas.r...@siemens.com>
> >
> > To really support yocto, we must introduce different branches
> > for used yocto versions. My suggestion is to create the
> > following two branches from master to apply this patch-set to:
> >
> > * rocko
> > * rocko-next
>
> Do Yocto rocko and master already deviate in a relevant degree for us?
>
Yes. There was a question on the mailing list ago about how to build for
rocko. It turned out that there are quite a few things to change:
- stricter dependency tracking (since Pyro)
- different wic module locations
- some requirements to take into account for using autotools/pkgconfig

> >
> > In future there should also be:
> >
> > * krogoth, krogoth-next
>
> krogoth is seriously dead.
>
> > * morthy, morty-next
>
> morty is taking its last breaths.
>
> > * pyro, pyro-next
>
> For pyro, we probably need backports then, right?
It is also possible that the Rocko version works for Pyro as is
at the moment.

>
> >
> > This way, we are compliant with other open source meta-layers and
> > don't run into problems when using the layer with different yocto
> > versions.
> >
> > That said, this patch series adds support for Yocto Rocko.
> > Tests for older systems are on the way.
>
> Ah, ok. Will have a look at the patches soon.
>
> Jan
>
> --
> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> Corporate Competence Center Embedded Linux

--
Andreas Reichel
Dipl.-Phys. (Univ.)
Software Consultant

Andreas...@tngtech.com, +49-174-3180074
TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterfoehring
Geschaeftsfuehrer: Henrik Klagges, Dr. Robert Dahlke, Gerhard Mueller
Sitz: Unterfoehring * Amtsgericht Muenchen * HRB 135082

Andreas Reichel

unread,
Jan 10, 2018, 10:51:08 AM1/10/18
to Jan Kiszka, efibootg...@googlegroups.com
On Wed, Jan 10, 2018 at 04:40:41PM +0100, Jan Kiszka wrote:
> On 2018-01-10 13:09, [ext] Andreas J. Reichel wrote:
> > From: Andreas Reichel <andreas.r...@siemens.com>
> >
> > Add information that are Poky Rocko specific.
> >
> > Signed-off-by: Andreas Reichel <andreas.r...@siemens.com>
> > ---
> > README.md | 12 +++---------
> > 1 file changed, 3 insertions(+), 9 deletions(-)
> >
> > diff --git a/README.md b/README.md
> > index fce877c..d4c631c 100644
> > --- a/README.md
> > +++ b/README.md
> > @@ -14,24 +14,18 @@ Archive:
> >
> > Tested with:
> >
> > -poky (morty): 7d5822bf4cb2089687c3c9a908cf4a4ef4e9a53a
> > +poky (rocko): 16e22f3e37788afb83044f5089d24187d70094bd
> > https://git.yoctoproject.org/git/poky
> >
> > -meta-intel: 6add41510412ca196efb3e4f949d403a8b6f35d7
> > +meta-intel: aa246ba9855d35d454ddcf041578310cbaa90250
> > https://git.yoctoproject.org/git/meta-intel
> >
> > meta-intel-iot-middleware: fc8eabfa4fb54802d3f97123b9d2954450175e33
> > https://git.yoctoproject.org/git/meta-intel-iot-middleware
>
> That layer is history in meta-iot2000 with the witch to rocko. But can't
> we describe this better with kas?
Surely, all the layers should be included in some kas files with these
refspecs. However, they are originally mentioned in the readme to
clarify the test scenario. We can throw this out of the readme though.

Andreas
>
> Jan
>
> >
> > -meta-nodejs: eec531e97a17bfd406f3bf76dee4057dcf5286a4
> > -https://github.com/imyller/meta-nodejs
> > -
> > -meta-openembedded: fe5c83312de11e80b85680ef237f8acb04b4b26e
> > +meta-openembedded: 6e3fc5b8d904d06e3aa77e9ec9968ab37a798188
> > http://git.openembedded.org/meta-openembedded
> >
> > -meta-iot2000: 774746e44ee248306881ffae7f02370025fda77e
> > -https://github.com/siemens/meta-iot2000
> > -
> > ## project integration ##
> >
> > Steps:
> >
>
>
> --
> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> Corporate Competence Center Embedded Linux

Jan Kiszka

unread,
Jan 10, 2018, 10:51:18 AM1/10/18
to Andreas Reichel, efibootg...@googlegroups.com
On 2018-01-10 16:47, Andreas Reichel wrote:
> On Wed, Jan 10, 2018 at 04:11:01PM +0100, Jan Kiszka wrote:
>> On 2018-01-10 13:09, [ext] Andreas J. Reichel wrote:
>>> From: Andreas Reichel <andreas.r...@siemens.com>
>>>
>>> To really support yocto, we must introduce different branches
>>> for used yocto versions. My suggestion is to create the
>>> following two branches from master to apply this patch-set to:
>>>
>>> * rocko
>>> * rocko-next
>>
>> Do Yocto rocko and master already deviate in a relevant degree for us?
>>
> Yes. There was a question on the mailing list ago about how to build for
> rocko. It turned out that there are quite a few things to change:
> - stricter dependency tracking (since Pyro)
> - different wic module locations
> - some requirements to take into account for using autotools/pkgconfig

With master I meant Yocto master. There is no need for a rocko branch
yet if Yocto master also works with your patches. We would fork off at
the point of introducing a rocko-incompatible patch.

Andreas Reichel

unread,
Jan 10, 2018, 11:04:22 AM1/10/18
to Jan Kiszka, efibootg...@googlegroups.com
Nobody checks out Yocto master. Everybody checks out a version. Master
is the development branch. Look for example at meta-openembedded. There
is a branch for Doro, a branch for Jethro... and so on. We also need
this for meta-efibootguard, no matter how minor these changes are.
Otherwise we get into trouble when some users build it with Krogoth and
some build it with Rocko... etc. This will never work.
>
> Jan
>
> --
> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> Corporate Competence Center Embedded Linux

Matthias Schoepfer

unread,
Jan 11, 2018, 7:57:59 AM1/11/18
to efibootguard-dev@googlegroups.com >> EFI Boot Guard
Hi there,

to give my two cents on it: I strongly agree with Andreas view on
branches etc. and I would strongly benefit from those patches.

Regards,

    Matthias
Reply all
Reply to author
Forward
0 new messages