As part of the pyro merge we need to continue to overlay these classes
in order to support vmdk.xz. While upstream has some of the underlying
required changes, we had dropped 'vmdk' as a standalone image type and
now have 'wic.vmdk' there. This was too invasive for pyro however.
This in turn means that we carry vmdk.xz support here.
Another part of this is that in some places we were checking only for
the string vmdk but also need to check for the string vmdk.xz as well.
Update these locations to use bb.utils.contains_any so that we can catch
both easily.
Bug-AGL: SPEC-899, SPEC-775, SPEC-776
Change-Id: I0cc3c06d59c97c0a76819209e313bc6f5495cc31
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/11153
Tested-by: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
ci-image-build: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
ci-image-boot-test: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
- awk "BEGIN { printf \"$(echo ${DISK_SIGNATURE} | fold -w 2 | tac | paste -sd '' | sed 's/\(..\)/\\x&/g')\" }" | \
+ awk "BEGIN { printf \"$(echo ${DISK_SIGNATURE} | sed 's/\(..\)\(..\)\(..\)\(..\)/\\x\4\\x\3\\x\2\\x\1/')\" }" | \
dd of=$IMAGE bs=1 seek=440 conv=notrunc
OFFSET=`expr $END2 / 512`
dd of=$IMAGE bs=1 seek=440 conv=notrunc
OFFSET=`expr $END2 / 512`
python do_bootdirectdisk() {
validate_disk_signature(d)
set_live_vm_vars(d, 'VM')
python do_bootdirectdisk() {
validate_disk_signature(d)
set_live_vm_vars(d, 'VM')
- if d.getVar("PCBIOS", True) == "1":
+ if d.getVar("PCBIOS") == "1":
bb.build.exec_func('build_syslinux_cfg', d)
bb.build.exec_func('build_syslinux_cfg', d)
- if d.getVar("EFI", True) == "1":
+ if d.getVar("EFI") == "1":
bb.build.exec_func('build_efi_cfg', d)
bb.build.exec_func('build_boot_dd', d)
}
bb.build.exec_func('build_efi_cfg', d)
bb.build.exec_func('build_boot_dd', d)
}
def validate_disk_signature(d):
import re
def validate_disk_signature(d):
import re
- disk_signature = d.getVar("DISK_SIGNATURE", True)
+ disk_signature = d.getVar("DISK_SIGNATURE")
if not re.match(r'^[0-9a-fA-F]{8}$', disk_signature):
bb.fatal("DISK_SIGNATURE '%s' must be an 8 digit hex string" % disk_signature)
if not re.match(r'^[0-9a-fA-F]{8}$', disk_signature):
bb.fatal("DISK_SIGNATURE '%s' must be an 8 digit hex string" % disk_signature)
rm_tmp_images = set()
def gen_conversion_cmds(bt):
rm_tmp_images = set()
def gen_conversion_cmds(bt):
- for ctype in ctypes:
- if bt[bt.find('.') + 1:] == ctype:
+ for ctype in sorted(ctypes):
+ if bt.endswith("." + ctype):
type = bt[0:-len(ctype) - 1]
if type.startswith("debugfs_"):
type = type[8:]
type = bt[0:-len(ctype) - 1]
if type.startswith("debugfs_"):
type = type[8:]
# Clean up after applying all conversion commands. Some of them might
# use the same input, therefore we cannot delete sooner without applying
# some complex dependency analysis.
# Clean up after applying all conversion commands. Some of them might
# use the same input, therefore we cannot delete sooner without applying
# some complex dependency analysis.
- for image in rm_tmp_images:
+ for image in sorted(rm_tmp_images):
cmds.append("\trm " + image)
after = 'do_image'
cmds.append("\trm " + image)
after = 'do_image'
packagegroup-agl-devel \
"
packagegroup-agl-devel \
"
-IMAGE_INSTALL_append = "${@bb.utils.contains('IMAGE_FSTYPES', 'vmdk', ' open-vm-tools vboxguestdrivers', '', d)}"
+IMAGE_INSTALL_append = "${@bb.utils.contains_any('IMAGE_FSTYPES', [ 'vmdk', 'vmdk.xz' ], ' open-vm-tools vboxguestdrivers', '', d)}"
# disable install of debug files in SDK
# initial value: SDKIMAGE_FEATURES="dev-pkgs dbg-pkgs staticdev-pkgs"
# disable install of debug files in SDK
# initial value: SDKIMAGE_FEATURES="dev-pkgs dbg-pkgs staticdev-pkgs"
IMAGE_CLASSES += "${@'image_types_uboot' if (d.getVar("KERNEL_IMAGETYPE", True) == "uImage") else ''}"
python () {
IMAGE_CLASSES += "${@'image_types_uboot' if (d.getVar("KERNEL_IMAGETYPE", True) == "uImage") else ''}"
python () {
- if (bb.utils.contains("IMAGE_FSTYPES","live",True,False,d) or bb.utils.contains("IMAGE_FSTYPES","vmdk",True,False,d)):
+ if (bb.utils.contains_any("IMAGE_FSTYPES",["live","vmdk","vmdk.xz"],True,False,d)):
# typical case for Minnowboard Max
d.setVar("INITRD_IMAGE","initramfs-netboot-image")
d.setVar("INITRD_IMAGE_LIVE",d.getVar("INITRD_IMAGE",True))
# typical case for Minnowboard Max
d.setVar("INITRD_IMAGE","initramfs-netboot-image")
d.setVar("INITRD_IMAGE_LIVE",d.getVar("INITRD_IMAGE",True))