[gnome-continuous-yocto/gnomeostree-3.28-rocko: 5266/8267] wic: use kernel_dir instead of bootimg_dir
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 5266/8267] wic: use kernel_dir instead of bootimg_dir
- Date: Sun, 17 Dec 2017 03:11:54 +0000 (UTC)
commit 627952a234a844783a6d4ee9aa3f1608a0d537d0
Author: Ed Bartosh <ed bartosh linux intel com>
Date: Wed Mar 22 15:42:27 2017 +0200
wic: use kernel_dir instead of bootimg_dir
bootimg_dir is usually set to the value of STAGING_DATADIR and
kernel_dir - to the value of DEPLOY_DIR_IMAGE, so usage of
kernel_dir is more logical in bootimg-efi, bootimg-partition and
rawcopy plugins.
Replaced usage of bootimg_dir to kernel_dir in 3 above mentioned
plugins that use DEPLOY_DIR_IMAGE as a default artifact location.
(From OE-Core rev: 48a5d67d7cafdeac821e6f35bea380521ef017d5)
Signed-off-by: Ed Bartosh <ed bartosh linux intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
scripts/lib/wic/plugins/source/bootimg-efi.py | 14 +++++++-------
.../lib/wic/plugins/source/bootimg-partition.py | 12 ++++++------
scripts/lib/wic/plugins/source/rawcopy.py | 10 +++++-----
3 files changed, 18 insertions(+), 18 deletions(-)
---
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py
index 2d1c4d4..ff76c2f 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -185,9 +185,9 @@ class BootimgEFIPlugin(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("DEPLOY_DIR_IMAGE")
- if not bootimg_dir:
+ if not kernel_dir:
+ kernel_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
+ if not kernel_dir:
raise WicError("Couldn't find DEPLOY_DIR_IMAGE, exiting")
staging_kernel_dir = kernel_dir
@@ -203,14 +203,14 @@ class BootimgEFIPlugin(SourcePlugin):
if source_params['loader'] == 'grub-efi':
shutil.copyfile("%s/hdd/boot/EFI/BOOT/grub.cfg" % cr_workdir,
"%s/grub.cfg" % cr_workdir)
- for mod in [x for x in os.listdir(bootimg_dir) if x.startswith("grub-efi-")]:
- cp_cmd = "cp %s/%s %s/EFI/BOOT/%s" % (bootimg_dir, mod, hdddir, mod[9:])
+ for mod in [x for x in os.listdir(kernel_dir) if x.startswith("grub-efi-")]:
+ cp_cmd = "cp %s/%s %s/EFI/BOOT/%s" % (kernel_dir, mod, hdddir, mod[9:])
exec_cmd(cp_cmd, True)
shutil.move("%s/grub.cfg" % cr_workdir,
"%s/hdd/boot/EFI/BOOT/grub.cfg" % cr_workdir)
elif source_params['loader'] == 'systemd-boot':
for mod in [x for x in os.listdir(bootimg_dir) if x.startswith("systemd-")]:
- cp_cmd = "cp %s/%s %s/EFI/BOOT/%s" % (bootimg_dir, mod, hdddir, mod[8:])
+ cp_cmd = "cp %s/%s %s/EFI/BOOT/%s" % (kernel_dir, mod, hdddir, mod[8:])
exec_cmd(cp_cmd, True)
else:
raise WicError("unrecognized bootimg-efi loader: %s" %
@@ -218,7 +218,7 @@ class BootimgEFIPlugin(SourcePlugin):
except KeyError:
raise WicError("bootimg-efi requires a loader, none specified")
- startup = os.path.join(bootimg_dir, "startup.nsh")
+ startup = os.path.join(kernel_dir, "startup.nsh")
if os.path.exists(startup):
cp_cmd = "cp %s %s/" % (startup, hdddir)
exec_cmd(cp_cmd, True)
diff --git a/scripts/lib/wic/plugins/source/bootimg-partition.py
b/scripts/lib/wic/plugins/source/bootimg-partition.py
index 373e8d8..4afc8a2 100644
--- a/scripts/lib/wic/plugins/source/bootimg-partition.py
+++ b/scripts/lib/wic/plugins/source/bootimg-partition.py
@@ -78,12 +78,12 @@ class BootimgPartitionPlugin(SourcePlugin):
install_cmd = "install -d %s" % hdddir
exec_cmd(install_cmd)
- if not bootimg_dir:
- bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
- if not bootimg_dir:
+ if not kernel_dir:
+ kernel_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
+ if not kernel_dir:
raise WicError("Couldn't find DEPLOY_DIR_IMAGE, exiting")
- logger.debug('Bootimg dir: %s', bootimg_dir)
+ logger.debug('Kernel dir: %s', bootimg_dir)
boot_files = get_bitbake_var("IMAGE_BOOT_FILES")
@@ -118,7 +118,7 @@ class BootimgPartitionPlugin(SourcePlugin):
os.path.join(dst,
os.path.basename(name))
- srcs = glob(os.path.join(bootimg_dir, src))
+ srcs = glob(os.path.join(kernel_dir, src))
logger.debug('Globbed sources: %s', ', '.join(srcs))
for entry in srcs:
@@ -127,7 +127,7 @@ class BootimgPartitionPlugin(SourcePlugin):
os.path.join(hdddir,
entry_dst_name)))
else:
- install_task = [(os.path.join(bootimg_dir, src),
+ install_task = [(os.path.join(kernel_dir, src),
os.path.join(hdddir, dst))]
for task in install_task:
diff --git a/scripts/lib/wic/plugins/source/rawcopy.py b/scripts/lib/wic/plugins/source/rawcopy.py
index bc71cf6..431afce 100644
--- a/scripts/lib/wic/plugins/source/rawcopy.py
+++ b/scripts/lib/wic/plugins/source/rawcopy.py
@@ -59,17 +59,17 @@ class RawCopyPlugin(SourcePlugin):
Called to do the actual content population for a partition i.e. it
'prepares' the partition to be incorporated into the image.
"""
- if not bootimg_dir:
- bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
- if not bootimg_dir:
+ if not kernel_dir:
+ kernel_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
+ if not kernel_dir:
raise WicError("Couldn't find DEPLOY_DIR_IMAGE, exiting")
- logger.debug('Bootimg dir: %s', bootimg_dir)
+ logger.debug('Kernel dir: %s', kernel_dir)
if 'file' not in source_params:
raise WicError("No file specified")
- src = os.path.join(bootimg_dir, source_params['file'])
+ src = os.path.join(kernel_dir, source_params['file'])
dst = os.path.join(cr_workdir, "%s.%s" % (source_params['file'], part.lineno))
if 'skip' in source_params:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]