diff mbox series

[isar-cip-core,1/1] Deploy efibootguardx64.efi and bg_setenv from .deb package

Message ID 20220214094237.16369-2-ubely@ilbers.de (mailing list archive)
State Handled Elsewhere
Headers show
Series Deploy efibootguardx64.efi and bg_setenv from .deb package | expand

Commit Message

Uladzimir Bely Feb. 14, 2022, 9:42 a.m. UTC
This patch makes efibootguardx64.efi binary to be included in .deb package.
Also, files are now deployed from .deb package, not from ${S} directory.

Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
 recipes-bsp/efibootguard/efibootguard_0.9-git+isar.bb  | 10 ++++++++--
 .../efibootguard/files/debian/efibootguard.install     |  1 +
 2 files changed, 9 insertions(+), 2 deletions(-)

Comments

Quirin Gylstorff Feb. 14, 2022, 4:19 p.m. UTC | #1
On 2/14/22 10:42, Uladzimir Bely via lists.cip-project.org wrote:
> This patch makes efibootguardx64.efi binary to be included in .deb package.
> Also, files are now deployed from .deb package, not from ${S} directory.
> 
> Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
> ---
>   recipes-bsp/efibootguard/efibootguard_0.9-git+isar.bb  | 10 ++++++++--
>   .../efibootguard/files/debian/efibootguard.install     |  1 +
>   2 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/recipes-bsp/efibootguard/efibootguard_0.9-git+isar.bb b/recipes-bsp/efibootguard/efibootguard_0.9-git+isar.bb
> index 2817e5b..2028ac6 100644
> --- a/recipes-bsp/efibootguard/efibootguard_0.9-git+isar.bb
> +++ b/recipes-bsp/efibootguard/efibootguard_0.9-git+isar.bb
> @@ -41,6 +41,12 @@ do_prepare_build() {
>   
>   dpkg_runbuild_append() {
>       install -m 0755 -d ${DEPLOY_DIR_IMAGE}
> -    install -m 0755 ${S}/efibootguardx64.efi ${DEPLOY_DIR_IMAGE}/bootx64.efi
> -    install -m 0755 ${S}/bg_setenv ${DEPLOY_DIR_IMAGE}/bg_setenv
> +    dpkg --fsys-tarfile ${WORKDIR}/${PN}_${PV}_${DISTRO_ARCH}.deb | \
> +        tar xOf - ./usr/lib/efibootguardx64.efi \
> +        > ${DEPLOY_DIR_IMAGE}/bootx64.efi
> +    chmod 755 ${DEPLOY_DIR_IMAGE}/bootx64.efi
> +    dpkg --fsys-tarfile ${WORKDIR}/${PN}_${PV}_${DISTRO_ARCH}.deb | \
> +        tar xOf - ./usr/bin/bg_setenv \
> +        > ${DEPLOY_DIR_IMAGE}/bg_setenv
> +    chmod 755 ${DEPLOY_DIR_IMAGE}/bg_setenv
>   }



This only works if sstate is disabled. As the current sstate 
implementation does not execute any function if a package is already
available.

If sstate is enabled the following error occurs:
```
ERROR: cip-core-image-1.0-r0 do_wic_image: Error executing a python 
function in exec_python_func() autogenerated:
```

I will send a fix to the list.

Quirin

> diff --git a/recipes-bsp/efibootguard/files/debian/efibootguard.install b/recipes-bsp/efibootguard/files/debian/efibootguard.install
> index 8a8d9d3..d0c3ee3 100644
> --- a/recipes-bsp/efibootguard/files/debian/efibootguard.install
> +++ b/recipes-bsp/efibootguard/files/debian/efibootguard.install
> @@ -1,2 +1,3 @@
>   bg_setenv usr/bin
>   bg_printenv usr/bin
> +efibootguardx64.efi usr/lib
> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#7593): https://lists.cip-project.org/g/cip-dev/message/7593
> Mute This Topic: https://lists.cip-project.org/mt/89132786/1753640
> Group Owner: cip-dev+owner@lists.cip-project.org
> Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129121/1753640/1405269326/xyzzy [quirin.gylstorff@siemens.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/recipes-bsp/efibootguard/efibootguard_0.9-git+isar.bb b/recipes-bsp/efibootguard/efibootguard_0.9-git+isar.bb
index 2817e5b..2028ac6 100644
--- a/recipes-bsp/efibootguard/efibootguard_0.9-git+isar.bb
+++ b/recipes-bsp/efibootguard/efibootguard_0.9-git+isar.bb
@@ -41,6 +41,12 @@  do_prepare_build() {
 
 dpkg_runbuild_append() {
     install -m 0755 -d ${DEPLOY_DIR_IMAGE}
-    install -m 0755 ${S}/efibootguardx64.efi ${DEPLOY_DIR_IMAGE}/bootx64.efi
-    install -m 0755 ${S}/bg_setenv ${DEPLOY_DIR_IMAGE}/bg_setenv
+    dpkg --fsys-tarfile ${WORKDIR}/${PN}_${PV}_${DISTRO_ARCH}.deb | \
+        tar xOf - ./usr/lib/efibootguardx64.efi \
+        > ${DEPLOY_DIR_IMAGE}/bootx64.efi
+    chmod 755 ${DEPLOY_DIR_IMAGE}/bootx64.efi
+    dpkg --fsys-tarfile ${WORKDIR}/${PN}_${PV}_${DISTRO_ARCH}.deb | \
+        tar xOf - ./usr/bin/bg_setenv \
+        > ${DEPLOY_DIR_IMAGE}/bg_setenv
+    chmod 755 ${DEPLOY_DIR_IMAGE}/bg_setenv
 }
diff --git a/recipes-bsp/efibootguard/files/debian/efibootguard.install b/recipes-bsp/efibootguard/files/debian/efibootguard.install
index 8a8d9d3..d0c3ee3 100644
--- a/recipes-bsp/efibootguard/files/debian/efibootguard.install
+++ b/recipes-bsp/efibootguard/files/debian/efibootguard.install
@@ -1,2 +1,3 @@ 
 bg_setenv usr/bin
 bg_printenv usr/bin
+efibootguardx64.efi usr/lib