[PATCH] Deploy-Dir-Issue-Resolved

10 views
Skip to first unread message

Farhat

unread,
Feb 20, 2018, 5:55:32 AM2/20/18
to efibootg...@googlegroups.com, Farhat-Abbas
From: Farhat-Abbas <Farhat...@mentor.com>

Required artifacts, to be copied, are available in
'DEPLOY_DIR_IMAGE' directory pointed to by 'kernel_dir'. The recipe
efibootguard.bb stages efibootguard bootloader to 'DEPLOY_DIR_IMAGE'.
So, efibootguard should be copied from 'kernel_dir'. OE-Core's script
'oe-core/scripts/lib/wic/plugins/source/bootimg-efi.py' is used as reference.
Also, 'HDDDIR' has been removed from 'WICVARS' & won't be accessible in scripts.
'HDDDIR' was populated ONLY if 'NOHDD=1' but images can be built w/o it, so
it was optional but 'DEPLOY_DIR_IMAGE' is always populated with the required artifacts.

See following commits in 'oe-core' for reference.
https://github.com/openembedded/openembedded-core/commit/afc486b6316f1118c8dcc74a5e217bb217dd1f85
https://github.com/openembedded/openembedded-core/commit/2457ea5338f7309316b474562b4723e8cb09286d
https://github.com/openembedded/openembedded-core/commit/48a5d67d7cafdeac821e6f35bea380521ef017d5

Signed-off-by: Farhat-Abbas <Farhat...@mentor.com>
---
scripts/lib/wic/plugins/source/efibootguard-boot.py | 8 ++++----
scripts/lib/wic/plugins/source/efibootguard-efi.py | 10 +++++-----
2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/scripts/lib/wic/plugins/source/efibootguard-boot.py b/scripts/lib/wic/plugins/source/efibootguard-boot.py
index bad7c27..f4326ae 100644
--- a/scripts/lib/wic/plugins/source/efibootguard-boot.py
+++ b/scripts/lib/wic/plugins/source/efibootguard-boot.py
@@ -82,10 +82,10 @@ class EfibootguardBootPlugin(SourcePlugin):
'prepares' the partition to be incorporated into the image.
In this case, prepare content for an EFI (grub) boot partition.
"""
- if not bootimg_dir:
- bootimg_dir = get_bitbake_var("HDDDIR")
- if not bootimg_dir:
- msger.error("HDDDIR not set, exiting\n")
+ if not kernel_dir:
+ kernel_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
+ if not kernel_dir:
+ msger.error("DEPLOY_DIR_IMAGE not set, exiting\n")
os.exit(1)

staging_kernel_dir = kernel_dir
diff --git a/scripts/lib/wic/plugins/source/efibootguard-efi.py b/scripts/lib/wic/plugins/source/efibootguard-efi.py
index 8a33412..62e283a 100644
--- a/scripts/lib/wic/plugins/source/efibootguard-efi.py
+++ b/scripts/lib/wic/plugins/source/efibootguard-efi.py
@@ -55,10 +55,10 @@ class EfibootguardEFIPlugin(SourcePlugin):
'prepares' the partition to be incorporated into the image.
In this case, prepare content for an EFI (grub) boot partition.
"""
- if not bootimg_dir:
- bootimg_dir = get_bitbake_var("HDDDIR")
- if not bootimg_dir:
- msger.error("HDDDIR not set, exiting\n")
+ if not kernel_dir:
+ kernel_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
+ if not kernel_dir:
+ msger.error("DEPLOY_DIR_IMAGE not set, exiting\n")

staging_kernel_dir = kernel_dir

@@ -67,7 +67,7 @@ class EfibootguardEFIPlugin(SourcePlugin):
install_cmd = "install -d %s/EFI/BOOT" % hdddir
exec_cmd(install_cmd)

- cp_cmd = "cp %s/EFI/BOOT/* %s/EFI/BOOT" % (bootimg_dir, hdddir)
+ cp_cmd = "cp %s/EFI/BOOT/* %s/EFI/BOOT" % (kernel_dir, hdddir)
exec_cmd(cp_cmd, True)

# Calculate the number of extra blocks to be sure that the
--
2.7.4

Jan Kiszka

unread,
Feb 20, 2018, 8:15:36 AM2/20/18
to Farhat, efibootg...@googlegroups.com, Andreas Reichel
Am I right that this commit should go into the pyro and rocko branches,
but not into morty?

Andreas, could you do a review?

Thanks,
Jan

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

Andreas Reichel

unread,
Feb 20, 2018, 10:19:25 AM2/20/18
to Jan Kiszka, Farhat, efibootg...@googlegroups.com
Yes I can, but I am not sure if I can this week.

Andreas

> Thanks,
> 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 Unterföhring
Geschäftsführer: Henrik Klagges, Dr. Robert Dahlke, Gerhard Müller
Sitz: Unterföhring * Amtsgericht München * HRB 135082
signature.asc

Abbas, Farhat

unread,
Feb 20, 2018, 9:56:16 PM2/20/18
to Andreas Reichel, Jan Kiszka, efibootg...@googlegroups.com
Yeah,
This patch, along with my upcoming patches, apply to rocko & latest branches.

Regards,
Farhat Abbas  | Software Development Engineer
Mentor EmbeddedT | 6th Floor, Ali Tower, 105 B2 M. M Alam Road, Gulberg III, Lahore, Pakistan, 54660
P +92-42-3609-9254 | M +92-343-7750571
> > + hdddir)
Reply all
Reply to author
Forward
0 new messages