diff options
-rw-r--r-- | meta/lib/oeqa/selftest/wic.py | 4 | ||||
-rw-r--r-- | scripts/lib/wic/plugins/source/isoimage-isohybrid.py | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py index 6a61ba6868..14109c4b5a 100644 --- a/meta/lib/oeqa/selftest/wic.py +++ b/meta/lib/oeqa/selftest/wic.py | |||
@@ -149,6 +149,10 @@ class Wic(oeSelfTest): | |||
149 | @testcase(1346) | 149 | @testcase(1346) |
150 | def test_iso_image(self): | 150 | def test_iso_image(self): |
151 | """Test creation of hybrid iso image with legacy and EFI boot""" | 151 | """Test creation of hybrid iso image with legacy and EFI boot""" |
152 | config = 'IMAGE_FSTYPES += " hddimg "\nMACHINE_FEATURES_append = " efi"\n' | ||
153 | self.append_config(config) | ||
154 | bitbake('core-image-minimal') | ||
155 | self.remove_config(config) | ||
152 | cmd = "wic create mkhybridiso --image-name core-image-minimal" | 156 | cmd = "wic create mkhybridiso --image-name core-image-minimal" |
153 | self.assertEqual(0, runCmd(cmd).status) | 157 | self.assertEqual(0, runCmd(cmd).status) |
154 | self.assertEqual(1, len(glob(self.resultdir + "HYBRID_ISO_IMG-*.direct"))) | 158 | self.assertEqual(1, len(glob(self.resultdir + "HYBRID_ISO_IMG-*.direct"))) |
diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py index 15fd858d22..a8a5dc0a59 100644 --- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py +++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py | |||
@@ -336,15 +336,12 @@ class IsoImagePlugin(SourcePlugin): | |||
336 | 336 | ||
337 | if not os.path.isfile("%s/EFI/BOOT/%s" \ | 337 | if not os.path.isfile("%s/EFI/BOOT/%s" \ |
338 | % (bootimg_dir, grub_image)): | 338 | % (bootimg_dir, grub_image)): |
339 | grub_path = get_bitbake_var("STAGING_LIBDIR") | 339 | grub_path = get_bitbake_var("STAGING_LIBDIR", "wic-tools") |
340 | if not grub_path: | 340 | if not grub_path: |
341 | msger.error("Couldn't find STAGING_LIBDIR, exiting.\n") | 341 | msger.error("Couldn't find STAGING_LIBDIR, exiting.\n") |
342 | 342 | ||
343 | grub_core = "%s/grub/%s" % (grub_path, grub_target) | 343 | grub_core = "%s/grub/%s" % (grub_path, grub_target) |
344 | if not os.path.exists(grub_core): | 344 | if not os.path.exists(grub_core): |
345 | msger.info("Building grub-efi...\n") | ||
346 | exec_cmd("bitbake grub-efi") | ||
347 | if not os.path.exists(grub_core): | ||
348 | msger.error("Please build grub-efi first\n") | 345 | msger.error("Please build grub-efi first\n") |
349 | 346 | ||
350 | grub_cmd = "grub-mkimage -p '/EFI/BOOT' " | 347 | grub_cmd = "grub-mkimage -p '/EFI/BOOT' " |