mirror of
https://git.yoctoproject.org/poky
synced 2026-07-16 03:47:03 +00:00
wic/bootimg-efi: IMAGE_EFI_BOOT_FILES variable added to separate bootimg-efi and bootimg-partition
Due to recent changes in bootimg-efi to include IMAGE_BOOT_FILES,
when both bootimg-partition and bootimg-efi occur in a single .wks
and IMAGE_BOOT_FILES are defined, files listed in IMAGE_BOOT_FILES
will be duplicated in both partition.
Since IMAGE_BOOT_FILES are crucial for bootimg-partition, but
optional for bootimg-efi, hence allowing bootimg-efi to have the option
to ignore it.
The new variable, IMAGE_EFI_BOOT_FILES, was added to help handle this
issue. Its basic usage is the same as IMAGE_BOOT_FILES.
Usage example:
${IMGDEPLOYDIR}/${IMAGE_BASENAME}-${MACHINE}.ext4;rootfs.img \
This commit is also squashed with the updated testcase to cover for
this change.
[YOCTO #14011]
(From OE-Core rev: 945339e06b273df1935cfd784f548ef57e0b7f4c)
Signed-off-by: Khairul Rohaizzat Jamaluddin <khairul.rohaizzat.jamaluddin@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
a91c7901d0
commit
85574ce0cf
@@ -1,7 +1,7 @@
|
||||
# The WICVARS variable is used to define list of bitbake variables used in wic code
|
||||
# variables from this list is written to <image>.env file
|
||||
WICVARS ?= "\
|
||||
BBLAYERS IMGDEPLOYDIR DEPLOY_DIR_IMAGE FAKEROOTCMD IMAGE_BASENAME IMAGE_BOOT_FILES \
|
||||
BBLAYERS IMGDEPLOYDIR DEPLOY_DIR_IMAGE FAKEROOTCMD IMAGE_BASENAME IMAGE_EFI_BOOT_FILES IMAGE_BOOT_FILES \
|
||||
IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD INITRD_LIVE ISODIR RECIPE_SYSROOT_NATIVE \
|
||||
ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR TARGET_SYS \
|
||||
KERNEL_IMAGETYPE MACHINE INITRAMFS_IMAGE INITRAMFS_IMAGE_BUNDLE INITRAMFS_LINK_NAME APPEND \
|
||||
|
||||
@@ -235,6 +235,17 @@ class Wic(WicTestCase):
|
||||
runCmd(cmd)
|
||||
self.assertEqual(1, len(glob(self.resultdir + "systemd-bootdisk-*direct")))
|
||||
|
||||
def test_efi_bootpart(self):
|
||||
"""Test creation of efi-bootpart image"""
|
||||
cmd = "wic create mkefidisk -e core-image-minimal -o %s" % self.resultdir
|
||||
kimgtype = get_bb_var('KERNEL_IMAGETYPE', 'core-image-minimal')
|
||||
self.append_config('IMAGE_EFI_BOOT_FILES = "%s;kernel"\n' % kimgtype)
|
||||
runCmd(cmd)
|
||||
sysroot = get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools')
|
||||
images = glob(self.resultdir + "mkefidisk-*.direct")
|
||||
result = runCmd("wic ls %s:1/ -n %s" % (images[0], sysroot))
|
||||
self.assertIn("kernel",result.output)
|
||||
|
||||
def test_sdimage_bootpart(self):
|
||||
"""Test creation of sdimage-bootpart image"""
|
||||
cmd = "wic create sdimage-bootpart -e core-image-minimal -o %s" % self.resultdir
|
||||
@@ -689,7 +700,7 @@ class Wic2(WicTestCase):
|
||||
wicvars = wicvars.difference(('DEPLOY_DIR_IMAGE', 'IMAGE_BOOT_FILES',
|
||||
'INITRD', 'INITRD_LIVE', 'ISODIR','INITRAMFS_IMAGE',
|
||||
'INITRAMFS_IMAGE_BUNDLE', 'INITRAMFS_LINK_NAME',
|
||||
'APPEND'))
|
||||
'APPEND', 'IMAGE_EFI_BOOT_FILES'))
|
||||
with open(path) as envfile:
|
||||
content = dict(line.split("=", 1) for line in envfile)
|
||||
# test if variables used by wic present in the .env file
|
||||
|
||||
Reference in New Issue
Block a user