|
@@ -1151,6 +1151,26 @@ class Wic2(WicTestCase):
|
|
|
out = glob(os.path.join(self.resultdir, "%s-*.direct" % wksname))
|
|
|
self.assertEqual(1, len(out))
|
|
|
|
|
|
+ @skipIfNotArch(['i586', 'i686', 'x86_64', 'aarch64'])
|
|
|
+ def test_uefi_kernel(self):
|
|
|
+ """ Test uefi-kernel in wic """
|
|
|
+ config = 'IMAGE_EFI_BOOT_FILES="/etc/fstab;testfile"\nIMAGE_FSTYPES = "wic"\nWKS_FILE = "test_uefikernel.wks"\nMACHINE_FEATURES:append = " efi"\n'
|
|
|
+ self.append_config(config)
|
|
|
+ bitbake('core-image-minimal')
|
|
|
+ self.remove_config(config)
|
|
|
+
|
|
|
+ img = 'core-image-minimal'
|
|
|
+ with NamedTemporaryFile("w", suffix=".wks") as wks:
|
|
|
+ wks.writelines(['part /boot --source bootimg-efi --sourceparams="loader=uefi-kernel"\n'
|
|
|
+ 'part / --source rootfs --fstype=ext4 --align 1024 --use-uuid\n'\
|
|
|
+ 'bootloader --timeout=0 --append="console=ttyS0,115200n8"\n'])
|
|
|
+ wks.flush()
|
|
|
+ cmd = "wic create %s -e %s -o %s" % (wks.name, img, self.resultdir)
|
|
|
+ runCmd(cmd)
|
|
|
+ wksname = os.path.splitext(os.path.basename(wks.name))[0]
|
|
|
+ out = glob(os.path.join(self.resultdir, "%s-*.direct" % wksname))
|
|
|
+ self.assertEqual(1, len(out))
|
|
|
+
|
|
|
# TODO this test could also work on aarch64
|
|
|
@skipIfNotArch(['i586', 'i686', 'x86_64'])
|
|
|
@OETestTag("runqemu")
|