[PATCH 0/8] Introduces Rocko support to meta-efibootguard

20 views
Skip to first unread message

Andreas J. Reichel

unread,
Jan 24, 2018, 5:26:30 AM1/24/18
to efibootg...@googlegroups.com, Andreas Reichel
From: Andreas Reichel <andreas.r...@siemens.com>

This patch series introduces Poky Rocko support for efibootguard.

Changes:
* Update/Fix python scripts
* Add missing dependencies to recipe
* Adapt recipe to use version 0.2 of efibootguard
* Fix nonsensical PV of recipe
* Update documentation

Note: The last two commits are Rocko specific. They should go into their
own branch - or - if everything gets to master, at least have a tag
named 'rocko'.

Andreas Reichel (8):
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
Use EFI Boot Guard version to 0.2
When creating a dir, wait till finished
Update source plugins to work with newer wic
Adapt README.md for rocko branch

README.md | 15 +++------------
classes/efibootguard.bbclass | 4 +++-
recipes-bsp/efibootguard/efibootguard.bb | 10 +++++-----
scripts/lib/wic/plugins/source/efibootguard-boot.py | 15 +++++++--------
scripts/lib/wic/plugins/source/efibootguard-efi.py | 12 ++++++------
5 files changed, 24 insertions(+), 32 deletions(-)

--
2.16.0

Andreas J. Reichel

unread,
Jan 24, 2018, 5:26:31 AM1/24/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.16.0

Andreas J. Reichel

unread,
Jan 24, 2018, 5:26:31 AM1/24/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.16.0

Andreas J. Reichel

unread,
Jan 24, 2018, 5:26:31 AM1/24/18
to efibootg...@googlegroups.com, Andreas Reichel
From: Andreas Reichel <andreas.r...@siemens.com>

* Change fetch URI to get 0.2 from official repo.
* Make sure the package version PV is the same as the efibootguard
version.
* Add new libcheck dependency.

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

diff --git a/recipes-bsp/efibootguard/efibootguard.bb b/recipes-bsp/efibootguard/efibootguard.bb
index 605439d..a1c504a 100644
--- a/recipes-bsp/efibootguard/efibootguard.bb
+++ b/recipes-bsp/efibootguard/efibootguard.bb
@@ -13,11 +13,12 @@ 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"
+PV = "0.2"

S = "${WORKDIR}/git"

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

inherit autotools deploy pkgconfig

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

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

do_compile_class-native () {
oe_runmake bg_setenv
--
2.16.0

Andreas J. Reichel

unread,
Jan 24, 2018, 5:26:31 AM1/24/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 | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/README.md b/README.md
index fce877c..639bd78 100644
--- a/README.md
+++ b/README.md
@@ -14,24 +14,15 @@ 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: 29a4983d5a4462d8e7b9abcd55bfb3013f578fdd
http://git.openembedded.org/meta-openembedded

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

Steps:
--
2.16.0

Jan Kiszka

unread,
Jan 29, 2018, 8:39:54 AM1/29/18
to [ext] Andreas J. Reichel, efibootg...@googlegroups.com
On 2018-01-24 11:23, [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 | 15 +++------------
> 1 file changed, 3 insertions(+), 12 deletions(-)
>
> diff --git a/README.md b/README.md
> index fce877c..639bd78 100644
> --- a/README.md
> +++ b/README.md
> @@ -14,24 +14,15 @@ 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

As you remove the meta-iot2000 reference below: what role does
meta-intel still play in your test setup?

Jan

>
> -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: 29a4983d5a4462d8e7b9abcd55bfb3013f578fdd
> 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

Andreas Reichel

unread,
Jan 29, 2018, 8:51:25 AM1/29/18
to Jan Kiszka, efibootg...@googlegroups.com
On Mon, Jan 29, 2018 at 02:39:52PM +0100, Jan Kiszka wrote:
> On 2018-01-24 11:23, [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 | 15 +++------------
> > 1 file changed, 3 insertions(+), 12 deletions(-)
> >
> > diff --git a/README.md b/README.md
> > index fce877c..639bd78 100644
> > --- a/README.md
> > +++ b/README.md
> > @@ -14,24 +14,15 @@ 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
>
> As you remove the meta-iot2000 reference below: what role does
> meta-intel still play in your test setup?
>
I had taken the quark machine out of it to still be able to run it
on the iot2000 box.

Andreas
> Jan
>
> >
> > -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: 29a4983d5a4462d8e7b9abcd55bfb3013f578fdd
> > 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

--
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

Jan Kiszka

unread,
Jan 29, 2018, 8:54:32 AM1/29/18
to Andreas Reichel, efibootg...@googlegroups.com
I still don't get it: Is there a direct dependency of this layer or its
dependent ones on meta-intel? Or does that come in via the BSP layer you
choose?

Jan

Andreas Reichel

unread,
Jan 29, 2018, 8:57:57 AM1/29/18
to Jan Kiszka, efibootg...@googlegroups.com
Sorry, to be more exact: I just used the BSP to build my test scenario.
There is no direct dependency. I just documented it for completeness.

Andreas
> Jan

Jan Kiszka

unread,
Jan 29, 2018, 9:15:56 AM1/29/18
to [ext] Andreas J. Reichel, efibootg...@googlegroups.com
On 2018-01-24 11:23, [ext] Andreas J. Reichel wrote:
Thanks, applied all, also the pyro patches, and pushed all branches.

Jan
Reply all
Reply to author
Forward
0 new messages